Commit c561c247 by zhangmeng

fix:文本组件bug

parent 730076f0
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.e529d9a4669f8784b4fcb4045027197b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.b52e32600f8f7c7becf9.js></script><script type=text/javascript src=/marketing/static/js/app.7b165f103d2e73c29747.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/marketing/static/css/app.bdcb848080e2964316129cb49114d17c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/marketing/static/js/manifest.0a85049e489e85ac5f0a.js></script><script type=text/javascript src=/marketing/static/js/vendor.b52e32600f8f7c7becf9.js></script><script type=text/javascript src=/marketing/static/js/app.266119c8e1f95146f9ce.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -102,24 +102,17 @@ export default {
},
textInput(v,e){ // 控制微信文本的文字
this.computedTextLength();
// var textContent = this.$refs.myTextarea.innerText;
// console.log(textContent);
// this.textLength = textContent.length;
// console.log(this.getTextValue().length,textContent.length);
// if(this.textLength >= 300){
// this.$message.error('最多300个字符');
// }
},
// 获取内容
getTextValue() {
const reg = /<(?!(a|\/a|div|\/div|br)).*?>/img ; // 只保留a 和 div 标签
let text = this.$refs.myTextarea.innerHTML.replace(reg,"");
text = text.replace(/<\/div>|&nbsp;/g,"").replace(/<((div)).*?>/g,"<br>").split('<br>').filter(v=>v).join('<br>');
this.textarea = text;
this.$emit('update:value',text);
return text;
},
getUrlInfo(obj) {
console.log(obj)
// console.log(obj)
this.hasATag(this.textarea,flag => {
if (flag) {
if (obj.isWxApp) {
......@@ -138,6 +131,7 @@ export default {
hasATag(text,cb) {
if(hrefReg.test(text)){
var hrefArr = text.match(hrefReg);
debugger
if(hrefArr.length >= 1){
this.$message({type:'warning',message:'只能添加一个链接'});
cb && cb(false);
......
......@@ -39,8 +39,7 @@ const initForm = {
shelfIds:[],
verificationType:0,
cardDenomination:0,
proNoList:[],
storeMode:0
proNoList:[]
}
const sale_limit = { fee:0,goods:'',flag:false,type:0}; //最低消费
const goods = {ok:'',no:'',flag:false};
......@@ -81,7 +80,8 @@ export default {
isEdit:this.$route.meta.type === 'edit',
isInfo:this.$route.meta.type === 'info',
isCopy:this.$route.meta.type === 'copy',
isAdd:this.$route.meta.type === 'add'
isAdd:this.$route.meta.type === 'add',
storeMode:0
}
},
watch:{
......@@ -156,7 +156,7 @@ export default {
this.startDayOptions = Object.keys(dicMap).map(key => ({label:dicMap[key].dictName=='0'?'当天':'第'+dicMap[key].dictName+'天',value:parseInt(dicMap[key].dictName)}))
if(res.result.card) {
const card = res.result.card;
this.form.storeMode = card.storeMode === 0 ? 0 : 1;
this.storeMode = card.storeMode === 0 ? 0 : 1;
this.form.coupCardId = this.isCopy?'':card.coupCardId;
this.form.cardType = card.cardType;
this.form.cardName = card.cardName || '';
......@@ -454,7 +454,7 @@ export default {
card.checkSource = 0;
card.applicableMode = 0;
card.storeProMode = 0;
card.storeMode = this.form.storeMode;
card.storeMode = this.storeMode;
card.storeWidgetKey = this.uuid;
// 这里判断部分门店是否为空
......
......@@ -132,9 +132,9 @@
</el-form-item>
<el-form-item label="适用门店">
<el-radio v-model="form.storeMode" :label="0">所有门店</el-radio>
<el-radio v-model="form.storeMode" :label="1">部分门店</el-radio>
<vue-gic-store-card class="pt10" v-show="form.storeMode" ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
<el-radio v-model="storeMode" :label="0">所有门店</el-radio>
<el-radio v-model="storeMode" :label="1">部分门店</el-radio>
<vue-gic-store-card class="pt10" v-show="storeMode" ref="storeCard" :uuid.sync="uuid"></vue-gic-store-card>
<!-- <vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage> -->
</el-form-item>
......
......@@ -241,7 +241,6 @@
</el-dialog>
</el-form>
</template>
<script>
import {getEcmInfo,saveEcmInfo} from '@/service/api/ecmApi.js';
import {listTemplateVariables} from '@/service/api/msgApi.js';
......
......@@ -283,6 +283,7 @@
.dm-text__wrap{
width: 500px;
margin-left: 10px;
line-height: 2;
}
.dm-image__item__wrap{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment