Skip to content

Commit 1f92367

Browse files
committed
fix: improve loading logic for collection data in dropdown
1 parent 611aba8 commit 1f92367

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/publish/publish_collection.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,17 @@ export default {
131131
});
132132
} else {
133133
this.collections = cloneDeep(this.copyCollections);
134+
this.loading = false;
134135
}
135136
},
136137
visibleChange: function (val) {
137138
if (val) {
138-
this.collections = cloneDeep(this.copyCollections);
139+
// 下拉框打开时,如果还没有初始化数据,则加载
140+
if (this.copyCollections.length === 0) {
141+
this.loadCollections();
142+
} else {
143+
this.collections = cloneDeep(this.copyCollections);
144+
}
139145
}
140146
},
141147
},

0 commit comments

Comments
 (0)