...
|
...
|
@@ -202,8 +202,6 @@ |
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
const bus = require('common/vue-bus');
|
|
|
|
|
|
module.exports = {
|
|
|
props: {
|
|
|
category: {
|
...
|
...
|
@@ -226,13 +224,7 @@ |
|
|
},
|
|
|
watch: {
|
|
|
category() {
|
|
|
this.$set('cateNavLeftData', this.category);
|
|
|
this.$set('cateNavRightData', this.cateNavLeftData ? this.cateNavLeftData[0].sub : []);
|
|
|
|
|
|
this.$set('rightAll', this.cateNavLeftData ? {
|
|
|
sortId: this.cateNavLeftData[0].relationParameter.sort,
|
|
|
categoryName: this.cateNavLeftData[0].categoryName
|
|
|
} : {});
|
|
|
this.categoryChangeHandler();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -247,11 +239,28 @@ |
|
|
|
|
|
/* 筛选列表使用返回值 */
|
|
|
noJumpReturn(categoryId, categoryName) {
|
|
|
bus.$emit('category.result', {
|
|
|
this.$dispatch('select', {
|
|
|
id: categoryId,
|
|
|
name: categoryName
|
|
|
});
|
|
|
},
|
|
|
|
|
|
categoryChangeHandler() {
|
|
|
if (!this.category.length) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.$set('cateNavLeftData', this.category);
|
|
|
this.$set('cateNavRightData', this.cateNavLeftData ? this.cateNavLeftData[0].sub : []);
|
|
|
|
|
|
this.$set('rightAll', this.cateNavLeftData ? {
|
|
|
sortId: this.cateNavLeftData[0].relationParameter.sort,
|
|
|
categoryName: this.cateNavLeftData[0].categoryName
|
|
|
} : {});
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.categoryChangeHandler();
|
|
|
}
|
|
|
};
|
|
|
</script> |
...
|
...
|
|