fix: todo修改

This commit is contained in:
hw
2025-11-19 11:12:09 +08:00
parent f1aec24f34
commit 887e9766be
9 changed files with 72 additions and 90 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { NewsItem } from './types';
import type { MpDraftApi } from '#/api/mp/draft';
import { computed, ref } from 'vue';
@@ -8,23 +8,23 @@ import { IconifyIcon } from '@vben/icons';
import { Button, Col, Input, Layout, Row, Textarea } from 'ant-design-vue';
import { createEmptyNewsItem } from '#/api/mp/draft';
import { Tinymce as RichTextarea } from '#/components/tinymce';
import CoverSelect from './cover-select.vue';
import { createEmptyNewsItem } from './types';
defineOptions({ name: 'NewsForm' });
const props = defineProps<{
isCreating: boolean;
modelValue: NewsItem[] | null;
modelValue: MpDraftApi.NewsItem[] | null;
}>();
const emit = defineEmits<{
(e: 'update:modelValue', v: NewsItem[]): void;
(e: 'update:modelValue', v: MpDraftApi.NewsItem[]): void;
}>();
const newsList = computed<NewsItem[]>({
const newsList = computed<MpDraftApi.NewsItem[]>({
get() {
return props.modelValue === null
? [createEmptyNewsItem()]