From 3329cd4bf190c405b451538b0198e93a9ce9fdb5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 27 Jul 2022 10:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4formatContent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/App.vue | 4 ++-- examples/main.js | 2 -- examples/views/apps/appEntry.vue | 2 +- packages/work/AppConference/detail.vue | 26 ++++++++++------------ project/sass/apps/AppConference/detail.vue | 8 +++---- 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/examples/App.vue b/examples/App.vue index e0591145..2976d91c 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -11,7 +11,7 @@
-
显示工具栏 @@ -54,7 +54,7 @@ export default { }, handleLogin() { - this.$axios.delete("/auth/token/logout").finally(() => { + this.$request.delete("/auth/token/logout").finally(() => { this.dialog = true }) }, diff --git a/examples/main.js b/examples/main.js index 0116a563..0fe99286 100644 --- a/examples/main.js +++ b/examples/main.js @@ -17,9 +17,7 @@ Vue.use(vcUI); Vue.use(dvui) //富文本编辑器配置 Vue.config.productionTip = false; -Vue.prototype.$axios = axios; Vue.prototype.$request = axios -Vue.prototype.formatContent = (val) => val.replace(/(\r\n)|(\n)/g, '
'); Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e])); new Vue({ router, diff --git a/examples/views/apps/appEntry.vue b/examples/views/apps/appEntry.vue index fdf624de..9066281c 100644 --- a/examples/views/apps/appEntry.vue +++ b/examples/views/apps/appEntry.vue @@ -1,6 +1,6 @@ diff --git a/packages/work/AppConference/detail.vue b/packages/work/AppConference/detail.vue index 554da89d..35c78da1 100644 --- a/packages/work/AppConference/detail.vue +++ b/packages/work/AppConference/detail.vue @@ -95,10 +95,10 @@ @@ -109,10 +109,10 @@ + :tableData="info.attendees" + :colConfigs="colConfigs" + style="margin-top: 12px;" + :isShowPagination="false"> v === '1' ? '已签到' : '未签到' }, + {prop: 'signInStatus', align: 'center', label: '签到', formart: v => v === '1' ? '已签到' : '未签到'}, { slot: 'option', } @@ -249,11 +249,9 @@ export default { params: {id} }).then(res => { if (res?.data) { - this.info = { - ...res.data, - content: this.formatContent(res.data.content || ""), - files: res.data.files || [] - }; + let {files = [], content} = res.data + content = content.replace(/(\r\n)|(\n)/g, "
") + this.info = {...res.data, content, files}; this.searchMeetinguser() } }); diff --git a/project/sass/apps/AppConference/detail.vue b/project/sass/apps/AppConference/detail.vue index be792755..8ae85a22 100644 --- a/project/sass/apps/AppConference/detail.vue +++ b/project/sass/apps/AppConference/detail.vue @@ -255,11 +255,9 @@ export default { params: {id} }).then(res => { if (res?.data) { - this.info = { - ...res.data, - content: this.formatContent(res.data.content || ""), - files: res.data.files || [] - }; + let {files = [], content} = res.data + content = content.replace(/(\r\n)|(\n)/g, "
") + this.info = {...res.data, content, files}; this.searchMeetinguser() } });