<template>
  <div>
    <div v-for="(item,index) in items"
         :key="index">
       <div class="cItem" @click="onClickItem(item.name)">{{item.name}}</div>
    </div>
  </div>
</template>

<script>

import YxStr from "../../../../utils/str-opt/index"

export default {
  data () {
    return {
      items:[
        {name:'encode'},
        {name:'decode'},
      ],
    }
  },

  components: {

  },

  methods: {
    onClickItem (name) {
       if(name == 'encode'){
          var info = YxStr.base64Encode("zhangwei")
          console.log(info)
       }else if(name == 'decode'){
          var info = "emhhbmd3ZWk="
          var tt = YxStr.base64Decode(info)
          console.log(tt)
       }
    },
  },

  created () {
    // let app = getApp()
  }
}
</script>

<style scoped>
  .cItem{
     width: 100%;
     line-height: 40px;
     padding-left: 10px;
     border-bottom: solid 1px #959595;
  }
</style>
