This commit is contained in:
670788339
2025-10-31 19:08:54 +08:00
parent 1ad2816622
commit cbe7981abd
3 changed files with 35 additions and 11 deletions

View File

@@ -607,6 +607,8 @@ export default {
// 限制最多5个标签
if (tags.length > 5) {
this.$message.warning('最多只能选择5个标签')
// 强制限制为5个
tags = tags.slice(0, 5);
return
}
let ids = "";
@@ -615,9 +617,7 @@ export default {
ids += tag.id + ',';
})
this.courseInfo.tags = ids;
console.log("父组件ids : ",this.courseInfo.tags)
// 同时更新showTags确保显示与实际数据一致
this.showTags = tags.map(tag => tag.tagName);
this.$emit('change', tags.slice(0, 5)); // 确保传出数据也不超过5个
},
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;