fix(过滤器): 代码冲突导致初始状态不显示参数列表

This commit is contained in:
fit2cloud-chenyw 2023-01-05 09:53:54 +08:00
parent 346f04cb23
commit ec5e81f61d

View File

@ -280,10 +280,8 @@ export default {
datasetParams: { datasetParams: {
type: Array, type: Array,
default: () => [] default: () => []
},
activeName:{
} }
}, },
data() { data() {
return { return {
@ -344,18 +342,18 @@ export default {
hasParam = true hasParam = true
} }
} }
if(!hasParam){ if (!hasParam) {
this.allParams.push(this.datasetParams[j]) this.allParams.push(this.datasetParams[j])
} }
} }
} }
} }
}, },
'activeName':{ 'activeName': {
handler(newName, oldName) { handler(newName, oldName) {
if(this.activeName === 'assembly'){ if (this.activeName === 'assembly') {
this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams)) this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams))
}else { } else {
if (this.datasetParams.length > 0) { if (this.datasetParams.length > 0) {
for (var j = 0; j < this.datasetParams.length; j++) { for (var j = 0; j < this.datasetParams.length; j++) {
var hasParam = false var hasParam = false
@ -364,7 +362,7 @@ export default {
hasParam = true hasParam = true
} }
} }
if(!hasParam){ if (!hasParam) {
this.allParams.push(this.datasetParams[j]) this.allParams.push(this.datasetParams[j])
} }
} }