发起变更保存接口统一修改
This commit is contained in:
@@ -7,13 +7,28 @@ import Footer from './footer.vue';
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
const props = defineProps(['isAiOpen','title','currentId'])
|
||||
const emit = defineEmits(['confirmTab']);
|
||||
const props = defineProps(['type','isAiOpen','title','currentId'])
|
||||
const emit = defineEmits(['save','submit','confirmTab']);
|
||||
// 是否是ai生成
|
||||
const isAiGenerated = ref<boolean>(false);
|
||||
const form = ref<{ content: string }>({
|
||||
content: ''
|
||||
});
|
||||
|
||||
// 保存草稿
|
||||
const saveDraft = () => {
|
||||
emit('save');
|
||||
}
|
||||
// 提交
|
||||
const submitConfirm = () => {
|
||||
emit('submit', props.type);
|
||||
}
|
||||
// // 确认标签内容
|
||||
const confirmTab = (tab:string, val:boolean) => {
|
||||
emit('confirmTab', tab, val);
|
||||
}
|
||||
|
||||
defineExpose({form})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -41,11 +56,14 @@ const form = ref<{ content: string }>({
|
||||
</div>
|
||||
</div>
|
||||
<Footer
|
||||
type="train"
|
||||
ref="footerRef"
|
||||
:type="props.type"
|
||||
:currentId="props.currentId"
|
||||
:title="props.title"
|
||||
:isAiOpen="props.isAiOpen"
|
||||
:currentForm="form"
|
||||
@save="saveDraft"
|
||||
@submit="submitConfirm"
|
||||
@confirmTab="confirmTab"
|
||||
/>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user