edit 框架设计
This commit is contained in:
parent
4e85477a5a
commit
250f73cce6
|
@ -62,7 +62,6 @@ emitter.on('selected', (data) => {
|
|||
// 回显大纲
|
||||
const curItem = reactive({})
|
||||
emitter.on('onShow', (data) => {
|
||||
|
||||
let outline = cloneDeep(JSON.parse(data.outline))
|
||||
markeDownAnswer.value = outline.markdown
|
||||
emitter.emit('onResult', cloneDeep(data))
|
||||
|
@ -124,8 +123,9 @@ const createAi = async () => {
|
|||
})
|
||||
|
||||
Object.assign(curItem, {...curItem, outline})
|
||||
|
||||
emitter.emit('onResult', curItem)
|
||||
onSaveTemp()
|
||||
onSaveTemp(outline)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
@ -173,12 +173,8 @@ const createAi = async () => {
|
|||
// })
|
||||
|
||||
// 保存模板
|
||||
const onSaveTemp = async () => {
|
||||
const onSaveTemp = async (outline) => {
|
||||
let modelIds = selectedData.value.map(item => item.id).join(',')
|
||||
let outline = JSON.stringify({
|
||||
markdown: markeDownAnswer.value,
|
||||
json:curItem.outline
|
||||
})
|
||||
const data = {
|
||||
eduId: curNode.id,
|
||||
outline,
|
||||
|
|
Loading…
Reference in New Issue