|
|
@@ -20,8 +20,8 @@
|
|
|
<div
|
|
|
class="course-card cursor-pointer rounded-md border p-[16px] transition-all duration-200"
|
|
|
:class="{
|
|
|
- 'border-primary bg-blue-50': checkedCouerse.includes(String(item.courseID)),
|
|
|
- 'border-gray-200': !checkedCouerse.includes(String(item.courseID))
|
|
|
+ 'border-primary bg-blue-50': checkedCourse.includes(String(item.courseID)),
|
|
|
+ 'border-gray-200': !checkedCourse.includes(String(item.courseID))
|
|
|
}"
|
|
|
v-for="item in data"
|
|
|
:key="item.courseID"
|
|
|
@@ -36,7 +36,7 @@
|
|
|
</template>
|
|
|
</ElImage>
|
|
|
<div class="type">
|
|
|
- <el-checkbox :model-value="checkedCouerse.includes(String(item.courseID))" class="hidden" />
|
|
|
+ <el-checkbox :model-value="checkedCourse.includes(String(item.courseID))" class="hidden" />
|
|
|
<div class="type-tag">{{ useDateFormat(item.createTime, 'YYYY-MM-DD') }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -84,7 +84,7 @@
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
|
|
|
// 参数
|
|
|
- const props = withDefaults(defineProps<{ data: Course[]; loading: boolean; checkedCouerse: string[] }>(), {})
|
|
|
+ const props = withDefaults(defineProps<{ data: Course[]; loading: boolean; checkedCourse: string[] }>(), {})
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
(e: 'update:checkedList', value: string[]): void
|
|
|
@@ -100,7 +100,7 @@
|
|
|
|
|
|
// 选择课程
|
|
|
const toggleCheckItem = (item: string) => {
|
|
|
- const newChecked = [...props.checkedCouerse]
|
|
|
+ const newChecked = [...props.checkedCourse]
|
|
|
const index = newChecked.indexOf(item)
|
|
|
if (index > -1) {
|
|
|
newChecked.splice(index, 1)
|