Commit 822b7c45 authored by 黄奎's avatar 黄奎

页面修改

parent 68f18fcf
......@@ -280,7 +280,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowDialog = false">取 消</el-button>
<el-button size="small" @click="isShowDialog = false,clearAddmsg()">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('addMsg')">提交</el-button>
</span>
</el-dialog>
......@@ -370,13 +370,14 @@
IsActive: false
}
],
isAdd: true, //是否新加标签
addMsg: {
TagId: 0, //标签Id
TenantId: 0, //商户Id
MallBaseId: 0, //小程序Id
TagName: '',
DefaultIcon: '', //默认图片
CheckedIcon: '', //激活状态图片
DefaultIcon: '1', //默认图片
CheckedIcon: '1', //激活状态图片
DefaultColor: 'rgb(136, 136, 136)', //默认字体颜色
CheckedColor: 'rgb(255, 69, 68)', //激活字体颜色
TagLink: "", //链接地址
......@@ -448,13 +449,26 @@
},
//点击添加图标
addIconList() {
this.isAdd = true;
this.isShowDialog = true;
var item = JSON.parse(JSON.stringify(this.addMsg))
this.mallMsg.BottomTagList.push(item);
this.EditInfo(item);
this.clearAddmsg();
},
clearAddmsg() {
this.addMsg.TagId = 0;
this.addMsg.TenantId = 0;
this.addMsg.MallBaseId = 0;
this.addMsg.TagName = '';
this.addMsg.DefaultIcon = '1';
this.addMsg.CheckedIcon = '1';
this.addMsg.DefaultColor = 'rgb(136, 136, 136)';
this.addMsg.CheckedColor = 'rgb(255, 69, 68)';
this.addMsg.TagLink = '';
this.addMsg.TagSort = 1;
this.addMsg.IsActive = false;
},
//点击编辑
EditInfo(item) {
this.isAdd = false;
this.addMsg = item;
this.isShowDialog = true;
},
......@@ -463,7 +477,12 @@
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.isShowDialog=false;
if (this.isAdd) {
this.mallMsg.BottomTagList.push(JSON.parse(JSON.stringify(this.addMsg)));
this.clearAddmsg();
}
this.isShowDialog = false;
} else {
return false;
}
......
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