v2.2.5 2022-11-3

1.优化部分代码
2.去掉微信未开放功能
This commit is contained in:
2022-11-03 22:49:14 +08:00
parent bb7d4ae74a
commit c994fcca33
7 changed files with 84 additions and 30 deletions
+11 -7
View File
@@ -1,10 +1,10 @@
<template>
<view class="container">
<view class="top-block"></view>
<textarea class="ms-input" placeholder="输入内容自动识别" maxlength="-1" @input="inputValue">
<textarea class="ms-input" :placeholder="tip" maxlength="-1" v-model="text">
<button class="ms-share" open-type="share"></button>
</textarea>
<text class="ms-output" @longtap="copyOutCode()">{{outcode?outcode:"长按复制"}}</text>
<text class="ms-output" @longtap="copyOutCode()">{{outcode?outcode:"长按复制"}}</text>
</view>
@@ -15,14 +15,16 @@
export default {
data() {
return {
outcode: ''
outcode: '',
text: "",
tip: `输入内容自动识别 编码:支持字母、数字、空格 解码:支持.-\\`,
}
},
methods: {
inputValue(e) {
watch: {
text(value){
const that = this;
// 获取到input的值
const value = e.detail.value + ' .';
value += ' .';
var operate = 'encode';
if (value.indexOf('-') >= 0) {
operate = 'decode';
@@ -42,7 +44,9 @@
})
}
});
},
}
},
methods: {
copyOutCode() {
const that = this;
if(that.outcode=='')return;