diff --git a/src/pages/index/business/news/components/AddNewsDialog.vue b/src/pages/index/business/news/components/AddNewsDialog.vue index 9ebe47d..f0c6b36 100644 --- a/src/pages/index/business/news/components/AddNewsDialog.vue +++ b/src/pages/index/business/news/components/AddNewsDialog.vue @@ -12,11 +12,17 @@ - + + + + + + @@ -34,13 +40,12 @@ - + - + @@ -50,6 +55,9 @@ +
+ 获取富文本内容 +
@@ -70,6 +78,7 @@ import { reactive, ref, watch } from "vue"; import { addNews, getDictionary } from "~/service/news"; import { useLoginStore } from "~/store"; +import { ElMessage } from "element-plus"; // --业务参数 @@ -85,6 +94,11 @@ async function get_news_type() { }) } +// 复制富文本内容 +async function handleCopyRichText() { + let text = await navigator.clipboard.writeText(formData.news_content); + ElMessage.success("富文本内容复制成功") +} @@ -127,6 +141,12 @@ const rules = reactive({ message: '新闻标题不能为空' } ], + news_cover: [ + { + required: true, + message: '新闻封面不能为空' + } + ], news_sort: [ { required: true, @@ -175,4 +195,11 @@ const handleResetClick = async (formEl) => { }; - + diff --git a/src/pages/index/business/news/components/DetailNewsDialog.vue b/src/pages/index/business/news/components/DetailNewsDialog.vue index e95e62a..269db82 100644 --- a/src/pages/index/business/news/components/DetailNewsDialog.vue +++ b/src/pages/index/business/news/components/DetailNewsDialog.vue @@ -1,68 +1,65 @@ +