提交 f386a2ec authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复添加课程资料报错的问题

上级 3db86c61
......@@ -181,6 +181,10 @@ const addVideo = function () {
}
const addRequest = function (item: any, index: number, data: any) {
if (props.course_id === '0') {
emit('update:isShowAddDialog', false)
emit('create', item)
} else {
const params: any = {
name: item.name,
course_id: props.course_id,
......@@ -195,6 +199,7 @@ const addRequest = function (item: any, index: number, data: any) {
ElMessage.success('添加成功')
}
})
}
}
// 列表切换
......@@ -218,12 +223,7 @@ const addVideoList = function () {
</script>
<template>
<el-drawer
:model-value="isShowAddDialog"
draggable
:before-close="handleCancel"
size="60%"
:title="`添加${props.btnInfo.btn_name}`">
<el-drawer :model-value="isShowAddDialog" draggable :before-close="handleCancel" size="60%" :title="`添加${props.btnInfo.btn_name}`">
<div class="video-head">
<el-tabs @tab-change="tabChange" v-model="tabValue">
<el-tab-pane label="我的资源" name="1"></el-tab-pane>
......@@ -268,13 +268,7 @@ const addVideoList = function () {
<el-button type="primary" @click="addVideo">添加</el-button>
</div>
<div class="card-list-con">
<CardListItem
v-for="(item, index) in data"
:key="index"
:tabIndex="tabValue"
:data="item"
:path="path"
@add="handleAdd">
<CardListItem v-for="(item, index) in data" :key="index" :tabIndex="tabValue" :data="item" :path="path" @add="handleAdd">
<el-checkbox @change="checkboxSelect" v-model="item.check_status"></el-checkbox>
</CardListItem>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论