From a3ed8d0a731eabba9d4abe08c359935193659a98 Mon Sep 17 00:00:00 2001 From: lwh <2679599887@qq.com> Date: Thu, 29 Jun 2023 10:33:00 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=92=8C=E6=96=B0=E9=97=BB=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/components/AddNewsDialog.vue | 37 +++- .../news/components/DetailNewsDialog.vue | 167 ++++++++------- .../news/components/EditNewsDialog.vue | 199 ++++++++++-------- src/pages/index/business/news/index.vue | 27 ++- .../business/products/product_type/index.vue | 20 +- src/service/news.js | 77 +++---- 6 files changed, 295 insertions(+), 232 deletions(-) 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 @@ +