From 796983e9e8301c94ecbd64d40d639d8b87384b70 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 27 May 2021 13:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=8F=9C=E5=8D=95=EF=BC=88pdf=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=92=8C=E7=BC=96=E8=BE=91=E5=99=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/router.js | 6 ++++++ src/i18n/langs/zh/router.js | 1 + src/router/index.js | 35 +++++++++++++++++++++-------------- src/views/editor/index.vue | 3 ++- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index d73f59f5a..774d09a4e 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -7,6 +7,12 @@ export default { runPlanManage: 'Run plan', productEdit: 'Product editor', + newDesignEditor: 'Editor', + newDesignEditorList: 'Editor List', + newDesignDraftEditorList: 'Draft Editor List', + uploadPdf: 'Upload Pdf', + fileManage:'File Manage', + designhomePage: 'Public map', designUserPage: 'Personal map', newDesignUserPage: 'Personal map', diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index ab77c2c56..a739f53d5 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -8,6 +8,7 @@ export default { newDesignEditorList: '图文列表', newDesignDraftEditorList: '文章草稿', uploadPdf: 'PDF上传', + fileManage:'文件管理', mapManage: '地图管理', skinManage: '皮肤管理', diff --git a/src/router/index.js b/src/router/index.js index c5f947fc7..1230fb661 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1143,7 +1143,7 @@ export const asyncRouter = [ path: '/editor', component: Layout, meta: { - i18n: 'router.newDesignEditor', + i18n: 'router.fileManage', roles: [admin, user] }, children: [ @@ -1162,24 +1162,14 @@ export const asyncRouter = [ } }, { - path: '', + path: 'draft', component: Ueditor, meta: { i18n: 'router.newDesignEditor' } - } - ] - }, - { - path: '/uploading', - component: Layout, - meta: { - i18n: 'router.uploadPdf', - roles: [admin, user] - }, - children: [ + }, { - path: 'list', + path: 'uploading/list', component: UploadPdfList, meta: { i18n: 'router.uploadPdf' @@ -1187,6 +1177,23 @@ export const asyncRouter = [ } ] }, + // { + // path: '/uploading', + // component: Layout, + // meta: { + // i18n: 'router.uploadPdf', + // roles: [admin, user] + // }, + // children: [ + // { + // path: 'list', + // component: UploadPdfList, + // meta: { + // i18n: 'router.uploadPdf' + // } + // } + // ] + // }, { // 新个人地图 path: '/design', component: Layout, diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index 4977cfd24..abf11f9dc 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -89,7 +89,8 @@ export default { this.editor.create(); // 创建富文本实例 - this.handleEdit(); + if (this.draft) { this.handleEdit(); } + }, beforeDestroy() { // 调用销毁 API 对当前编辑器实例进行销毁