Commit f40a3215 by 无尘

fix: 修改标签编辑

parent d3920f23
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-09-01 17:16:25
* @LastEditors: 无尘
* @LastEditTime: 2020-09-14 11:32:39
* @LastEditTime: 2020-09-15 11:38:44
-->
<!--
......@@ -102,7 +102,7 @@ export default {
tagId: '',
tagName: '',
linkId: '',
categoryId: this.currentCategoryId,
categoryId: '',
tagValueDTOList: []
},
rules: {
......@@ -122,11 +122,14 @@ export default {
};
},
// 生命周期 - 挂载完成(访问DOM元素)
mounted() {
beforeMount() {
const that = this;
if (that.brandId) {
that.getClassifyList();
}
},
mounted() {
const that = this;
if (Object.keys(that.editRow).length) {
that.form = JSON.parse(JSON.stringify(that.editRow));
}
......@@ -247,9 +250,10 @@ export default {
getTagClassify(para)
.then(res => {
that.tagsClassifyData = res.result || [];
that.currentCategoryId ? that.form.categoryId = that.currentCategoryId : '';
})
.catch(function(error) {
that.currentCategoryId ? that.form.categoryId = that.currentCategoryId : '';
});
}
},
......@@ -257,7 +261,9 @@ export default {
editRow(val) {
const that = this;
if (Object.keys(val).length) {
that.form = JSON.parse(JSON.stringify(val));
that.$nextTick(()=>{
that.form = JSON.parse(JSON.stringify(val));
});
}
},
brandId(val) {
......
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