feat: add MarkdownEditor component and integrate it into news add/edit forms

This commit is contained in:
2026-01-09 00:05:41 +07:00
parent be085db45b
commit 28d93217a3
7 changed files with 727 additions and 17 deletions

View File

@@ -163,14 +163,7 @@ async function handleSubmit() {
</NFormItem>
<NFormItem label="新闻内容" path="content">
<NInput
v-model:value="form.content"
type="textarea"
placeholder="请输入新闻内容"
:rows="10"
maxlength="10000"
show-count
/>
<MarkdownEditor v-model:value="form.content" placeholder="请输入新闻内容" :preview="false" />
</NFormItem>
<NFormItem label="附件上传" path="attachmentIds">

View File

@@ -165,14 +165,7 @@ async function handleSubmit() {
</NFormItem>
<NFormItem label="新闻内容" path="content">
<NInput
v-model:value="form.content"
type="textarea"
placeholder="请输入新闻内容"
:rows="10"
maxlength="10000"
show-count
/>
<MarkdownEditor v-model:value="form.content" placeholder="请输入新闻内容" :preview="false" />
</NFormItem>
<NFormItem label="附件上传" path="attachmentIds">

View File

@@ -134,7 +134,7 @@ function handleAdd() {
tableInst.value?.reload();
}
}),
style: { width: '600px' },
style: { width: '1200px' },
showIcon: false
});
}