Commit 80905387 by 无尘

fix: 修改标签编辑

parent fb04b780
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-09-01 17:16:25
* @LastEditors: 无尘
* @LastEditTime: 2020-09-15 13:43:32
* @LastEditTime: 2020-09-15 13:53:05
-->
<!--
......@@ -121,21 +121,13 @@ export default {
loadingBtn: false
};
},
// 生命周期 - 挂载完成(访问DOM元素)
// 生命周期
beforeMount() {
const that = this;
if (that.brandId) {
that.getClassifyList();
}
},
mounted() {
const that = this;
if (Object.keys(that.editRow).length) {
that.$nextTick(() => {
that.form = JSON.parse(JSON.stringify(that.editRow));
});
}
},
// methods
methods: {
/**
......@@ -252,9 +244,10 @@ export default {
getTagClassify(para)
.then(res => {
that.tagsClassifyData = res.result || [];
that.$nextTick(() => {
that.currentCategoryId ? that.form.categoryId = that.currentCategoryId : '';
});
that.currentCategoryId ? that.form.categoryId = that.currentCategoryId : '';
if (Object.keys(that.editRow).length) {
that.form = JSON.parse(JSON.stringify(that.editRow));
}
})
.catch(function(error) {
that.currentCategoryId ? that.form.categoryId = that.currentCategoryId : '';
......@@ -262,14 +255,6 @@ export default {
}
},
watch: {
editRow(val) {
const that = this;
if (Object.keys(val).length) {
that.$nextTick(() => {
that.form = JSON.parse(JSON.stringify(val));
});
}
},
brandId(val) {
const that = this;
if (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