修复管理端在线课程添加标签没有传递数据

This commit is contained in:
王卓煜
2025-08-20 13:46:19 +08:00
parent 6302157e12
commit 2c2f666c4a

View File

@@ -254,7 +254,7 @@
<choice :teacherValue="teacherValues" @getTeacherList="getTeacherList"></choice>
</el-form-item>
<el-form-item label="标签" required>
<courseTag :courseId="curCourseId" :sysTypeList="sysTypeList"></courseTag>
<courseTag :courseId="curCourseId" :sysTypeList="sysTypeList" @change="handleTagsChange"></courseTag>
</el-form-item>
<el-form-item label="关键字">
<el-input v-model.trim="keywords" maxlength="100" @keyup.enter.native="changeKeywords" placeholder="请输入关键字"></el-input>
@@ -596,6 +596,15 @@ export default {
closeKeywordsTag(item,index){
this.tips.splice(index, 1);
},
// 处理标签变化事件
handleTagsChange(tags) {
console.log("父组件:",tags)
let ids = "";
tags.forEach(tag=>{
ids += tag.id + ',';
})
this.courseInfo.tags = ids;
},
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;
},