From 0cc696899b792e080679c590f1860f52e5209d65 Mon Sep 17 00:00:00 2001
From: SuperCuteXiaoSi <1531733886@qq.com>
Date: Sat, 22 Jan 2022 13:05:29 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 +-
src/components/Form/index.vue | 7 +-
src/locales/en/modules/route.ts | 1 +
src/locales/zh-ch/modules/route.ts | 1 +
src/router/modules/otherRoute/otherRoute.ts | 6 +
src/styles/index.scss | 2 +
src/views/components/count-to/index.vue | 7 +-
src/views/components/drag/index.vue | 61 +++++-----
src/views/components/form/index.vue | 7 --
src/views/echarts/bar/index.vue | 7 +-
src/views/echarts/map/index.vue | 2 -
src/views/editor/richText/index.vue | 8 ++
src/views/guide/index.vue | 7 +-
src/views/index/index.vue | 118 ++++++++++----------
14 files changed, 110 insertions(+), 127 deletions(-)
create mode 100644 src/views/editor/richText/index.vue
diff --git a/package.json b/package.json
index dab51675..ea67de35 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,8 @@
"vue-i18n": "^9.1.9",
"vue-router": "^4.0.12",
"vue-types": "^4.1.1",
- "vuex": "^4.0.2"
+ "vuex": "^4.0.2",
+ "wangeditor": "^4.7.11"
},
"devDependencies": {
"@commitlint/cli": "^16.1.0",
diff --git a/src/components/Form/index.vue b/src/components/Form/index.vue
index 33841354..40711cbb 100644
--- a/src/components/Form/index.vue
+++ b/src/components/Form/index.vue
@@ -76,9 +76,4 @@
});
-
+
diff --git a/src/locales/en/modules/route.ts b/src/locales/en/modules/route.ts
index 1e0c54ce..c6bf82a5 100644
--- a/src/locales/en/modules/route.ts
+++ b/src/locales/en/modules/route.ts
@@ -11,6 +11,7 @@ const route = {
echarts_map: 'Map',
editor: 'Editor',
editor_logicFlow: 'LogicFlow',
+ editor_richText: 'RichText Editor',
userInfo: 'UserInfo',
userList: 'UserList',
userDateil: 'UserDateil',
diff --git a/src/locales/zh-ch/modules/route.ts b/src/locales/zh-ch/modules/route.ts
index 38bd8790..1c5192e3 100644
--- a/src/locales/zh-ch/modules/route.ts
+++ b/src/locales/zh-ch/modules/route.ts
@@ -11,6 +11,7 @@ const route = {
echarts_map: '地图',
editor: '编辑器',
editor_logicFlow: '流程图',
+ editor_richText: '富文本编辑器',
userInfo: '用户管理',
userList: '用户列表',
userDateil: '用户详情',
diff --git a/src/router/modules/otherRoute/otherRoute.ts b/src/router/modules/otherRoute/otherRoute.ts
index 9b763711..c1c9e41c 100644
--- a/src/router/modules/otherRoute/otherRoute.ts
+++ b/src/router/modules/otherRoute/otherRoute.ts
@@ -88,6 +88,12 @@ const safeManagerRoutes: Array = [
alwaysShow: true,
meta: { title: t('route.pathName.editor'), icon: 'editor' },
children: [
+ {
+ path: 'rich-text',
+ name: 'RtRichText',
+ component: () => import('@/views/editor/richText/index.vue'),
+ meta: { title: t('route.pathName.editor_richText') },
+ },
{
path: 'logic-flow',
name: 'RtLogicFlow',
diff --git a/src/styles/index.scss b/src/styles/index.scss
index a1c5888e..05dac9cb 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -75,6 +75,8 @@ div:focus {
width: 100%;
min-height: 100%;
border-radius: 10px;
+ background-color: #{$main-bg-color};
+ padding: 20px;
}
ul {
diff --git a/src/views/components/count-to/index.vue b/src/views/components/count-to/index.vue
index b1003918..88c1dd08 100644
--- a/src/views/components/count-to/index.vue
+++ b/src/views/components/count-to/index.vue
@@ -9,9 +9,4 @@
import CountTo from '@/components/CountTo/index.vue';
-
+
diff --git a/src/views/components/drag/index.vue b/src/views/components/drag/index.vue
index 0f335d12..2633c0a7 100644
--- a/src/views/components/drag/index.vue
+++ b/src/views/components/drag/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -75,41 +75,36 @@
diff --git a/src/views/components/form/index.vue b/src/views/components/form/index.vue
index f239dc6d..15786d95 100644
--- a/src/views/components/form/index.vue
+++ b/src/views/components/form/index.vue
@@ -425,10 +425,3 @@
// console.log(form.value);
};
-
-
diff --git a/src/views/echarts/bar/index.vue b/src/views/echarts/bar/index.vue
index 02b019fa..5ded3fdb 100644
--- a/src/views/echarts/bar/index.vue
+++ b/src/views/echarts/bar/index.vue
@@ -8,9 +8,4 @@
import BarRace from './components/BarRace.vue';
-
+
diff --git a/src/views/echarts/map/index.vue b/src/views/echarts/map/index.vue
index a53facde..8f15887a 100644
--- a/src/views/echarts/map/index.vue
+++ b/src/views/echarts/map/index.vue
@@ -118,9 +118,7 @@
height: 100%;
}
.page-container {
- padding: 20px;
width: 100%;
height: 100%;
- background-color: #{$main-bg-color};
}
diff --git a/src/views/editor/richText/index.vue b/src/views/editor/richText/index.vue
new file mode 100644
index 00000000..c24a313f
--- /dev/null
+++ b/src/views/editor/richText/index.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/src/views/guide/index.vue b/src/views/guide/index.vue
index 7642628f..8eb06cfc 100644
--- a/src/views/guide/index.vue
+++ b/src/views/guide/index.vue
@@ -13,9 +13,4 @@
};
-
+
diff --git a/src/views/index/index.vue b/src/views/index/index.vue
index c627665e..3f31b05f 100644
--- a/src/views/index/index.vue
+++ b/src/views/index/index.vue
@@ -1,5 +1,5 @@
-