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

chore: 课程复制成功后进入编辑课程页面

上级 043e7687
......@@ -3,11 +3,15 @@ import { courseCopy } from '../api'
import { ElMessage } from 'element-plus'
const props: any = defineProps<{ data: object; tabIndex: string }>()
const router = useRouter()
// 复制
const copyCourse = () => {
courseCopy({ id: props.data.id }).then((res: any) => {
if (res.code === 0) {
ElMessage({ message: '复制成功', type: 'success' })
router.push({ path: '/course/update-course', query: { id: res.data.id } })
}
})
}
......
......@@ -157,6 +157,7 @@ const copyCourse = () => {
courseCopy({ id: id }).then((res: any) => {
if (res.code === 0) {
ElMessage({ message: '复制成功', type: 'success' })
router.push({ path: '/course/update-course', query: { id: res.data.id } })
}
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论