From e309fd6bcbf59354ecd98127f4f73c78bd0c355f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Mon, 18 Jul 2022 20:03:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=87=E7=AB=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9B=BE=E7=89=87=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/article/publish.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/views/system/article/publish.vue b/src/views/system/article/publish.vue index 69dcdad..8c46ea6 100644 --- a/src/views/system/article/publish.vue +++ b/src/views/system/article/publish.vue @@ -70,12 +70,12 @@ const data = reactive({ tags: undefined, cid: undefined, content: undefined, - status: undefined, + status: undefined }, rules: { title: [{ required: true, message: '标题不能为空', trigger: 'blur' }], - content: [{ required: true, message: '内容不能为空', trigger: 'blur' }], - }, + content: [{ required: true, message: '内容不能为空', trigger: 'blur' }] + } }) const { form, rules } = toRefs(data) @@ -104,7 +104,7 @@ async function onUploadImg(files, callback) { .then((res) => rev(res)) .catch((error) => rej(error)) }) - }), + }) ) callback(res.map((item) => item.data.url)) @@ -157,7 +157,6 @@ function handleInputConfirm() { inputVisible.value = false inputValue.value = '' } -getInfo(cid) function getInfo(cid) { if (!cid || cid == undefined) return getArticle(cid).then((res) => { @@ -169,11 +168,13 @@ function getInfo(cid) { title: data.title, content: data.content, category_Id: data.category_Id, - dynamicTags: data.tags != null && data.tags.length > 0 ? data.tags.split(',') : [], + coverUrl: data.coverUrl, + dynamicTags: data.tags != null && data.tags.length > 0 ? data.tags.split(',') : [] } } }) } +getInfo(cid) getCategoryTreeselect()