diff --git a/src/api/theme.js b/src/api/theme.js
index 6a28884d..7581fdae 100644
--- a/src/api/theme.js
+++ b/src/api/theme.js
@@ -11,4 +11,11 @@ themeApi.listFiles = () => {
})
}
+themeApi.customTpls = () => {
+ return service({
+ url: `${baseUrl}/files/custom`,
+ method: 'get'
+ })
+}
+
export default themeApi
diff --git a/src/components/setting/SettingDrawer.vue b/src/components/setting/SettingDrawer.vue
index 338b249e..7a5cbe79 100644
--- a/src/components/setting/SettingDrawer.vue
+++ b/src/components/setting/SettingDrawer.vue
@@ -3,12 +3,13 @@
-
@@ -289,10 +283,6 @@ export default {
font-size: 14px;
}
}
- .iconClose {
- font-size: 24px;
- cursor: pointer;
- }
}
.setting-drawer-index-handle {
diff --git a/src/views/page/PageEdit.vue b/src/views/page/PageEdit.vue
index 7b0d387b..3b030086 100644
--- a/src/views/page/PageEdit.vue
+++ b/src/views/page/PageEdit.vue
@@ -1,10 +1,166 @@
-
+
+import { mavonEditor } from 'mavon-editor'
+import { mixin, mixinDevice } from '@/utils/mixin.js'
+import 'mavon-editor/dist/css/index.css'
+import tagApi from '@/api/theme'
+export default {
+ name: 'Editor',
+ components: {
+ mavonEditor
+ },
+ mixins: [mixin, mixinDevice],
+ data() {
+ return {
+ wrapperCol: {
+ xl: { span: 24 },
+ sm: { span: 24 },
+ xs: { span: 24 }
+ },
+ value: 'Hello World',
+ visible: false,
+ drawerWidth: '460',
+ postUrl: 'hello-world',
+ customTpls: []
+ }
+ },
+ mounted() {
+ if (this.isMobile()) {
+ this.drawerWidth = '100%'
+ } else {
+ this.drawerWidth = '460'
+ }
+ },
+ created() {
+ this.loadCustomTpls()
+ },
+ methods: {
+ loadCustomTpls() {
+ tagApi.customTpls().then(response => {
+ this.customTpls = response.data.data
+ })
+ },
+ showDrawer() {
+ this.visible = true
+ },
+ onClose() {
+ this.visible = false
+ }
+ }
+}
+
diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue
index 7ab9ef45..d601249f 100644
--- a/src/views/post/PostEdit.vue
+++ b/src/views/post/PostEdit.vue
@@ -1,7 +1,7 @@
@@ -55,12 +100,38 @@