Change Page to Sheet.

pull/9/head
ruibaby 2019-04-24 20:31:05 +08:00
parent dfbc9a7865
commit 847e9eec5e
8 changed files with 48 additions and 21 deletions

View File

@ -25,8 +25,8 @@ export default {
multiTab: false, multiTab: false,
// vue-ls options // vue-ls options
storageOptions: { storageOptions: {
namespace: 'pro__', // key prefix namespace: 'halo__', // key prefix
name: 'ls', // name variable Vue.[ls] or this.[$ls], name: 'ls', // name variable Vue.[ls] or this.[$ls],
storage: 'local' // storage name session, local, memory storage: 'local' // storage name session, local, memory
} }
} }

View File

@ -52,45 +52,45 @@ export const asyncRouterMap = [
] ]
}, },
// pages // sheets
{ {
path: '/pages', path: '/sheets',
name: 'Pages', name: 'Sheets',
component: PageView, component: PageView,
redirect: '/pages/list', redirect: '/sheets/list',
meta: { title: '页面', icon: 'read' }, meta: { title: '页面', icon: 'read' },
children: [ children: [
{ {
path: '/pages/list', path: '/sheets/list',
name: 'PageList', name: 'SheetList',
component: () => import('@/views/page/PageList'), component: () => import('@/views/sheet/SheetList'),
meta: { title: '所有页面', hiddenHeaderContent: false } meta: { title: '所有页面', hiddenHeaderContent: false }
}, },
{ {
path: '/pages/write', path: '/sheets/write',
name: 'PageEdit', name: 'SheetEdit',
component: () => import('@/views/page/PageEdit'), component: () => import('@/views/sheet/SheetEdit'),
meta: { title: '新建页面', hiddenHeaderContent: false } meta: { title: '新建页面', hiddenHeaderContent: false }
}, },
{ {
path: '/pages/links', path: '/sheets/links',
name: 'LinkList', name: 'LinkList',
hidden: true, hidden: true,
component: () => import('@/views/page/internal/LinkList'), component: () => import('@/views/sheet/internal/LinkList'),
meta: { title: '友情链接', hiddenHeaderContent: false } meta: { title: '友情链接', hiddenHeaderContent: false }
}, },
{ {
path: '/pages/galleries', path: '/sheets/galleries',
name: 'GalleryList', name: 'GalleryList',
hidden: true, hidden: true,
component: () => import('@/views/page/internal/GalleryList'), component: () => import('@/views/sheet/internal/GalleryList'),
meta: { title: '图库', hiddenHeaderContent: false } meta: { title: '图库', hiddenHeaderContent: false }
}, },
{ {
path: '/pages/journals', path: '/sheets/journals',
name: 'JournalList', name: 'JournalList',
hidden: true, hidden: true,
component: () => import('@/views/page/internal/JournalList'), component: () => import('@/views/sheet/internal/JournalList'),
meta: { title: '日志', hiddenHeaderContent: false } meta: { title: '日志', hiddenHeaderContent: false }
} }
] ]

View File

@ -21,6 +21,7 @@
<mavon-editor <mavon-editor
v-model="postToStage.originalContent" v-model="postToStage.originalContent"
:boxShadow="false" :boxShadow="false"
:toolbars="toolbars"
:ishljs="true" :ishljs="true"
/> />
</div> </div>
@ -168,7 +169,6 @@ import categoryApi from '@/api/category'
import postApi from '@/api/post' import postApi from '@/api/post'
import AttachmentDrawer from '../attachment/components/AttachmentDrawer' import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer' import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer'
const toolbars = { const toolbars = {
bold: true, // bold: true, //
italic: true, // italic: true, //
@ -182,9 +182,12 @@ const toolbars = {
imagelink: true, // imagelink: true, //
code: true, // code code: true, // code
table: true, // table: true, //
fullscreen: true, //
readmodel: true, // readmodel: true, //
htmlcode: true, // html
undo: true, // undo: true, //
redo: true, // redo: true, //
trash: true, //
navigation: true, // navigation: true, //
subfield: true, // subfield: true, //
preview: true // preview: true //
@ -214,7 +217,7 @@ export default {
categories: [], categories: [],
selectedCategoryIds: [], selectedCategoryIds: [],
selectedTagIds: [], selectedTagIds: [],
markdownOption: toolbars, toolbars: toolbars,
postToStage: {} postToStage: {}
} }
}, },

View File

@ -20,6 +20,7 @@
<mavon-editor <mavon-editor
v-model="postToStage.originalContent" v-model="postToStage.originalContent"
:boxShadow="false" :boxShadow="false"
:toolbars="toolbars"
:ishljs="true" :ishljs="true"
/> />
</div> </div>
@ -128,7 +129,29 @@ import { mixin, mixinDevice } from '@/utils/mixin.js'
import 'mavon-editor/dist/css/index.css' import 'mavon-editor/dist/css/index.css'
import postApi from '@/api/post' import postApi from '@/api/post'
import themeApi from '@/api/theme' import themeApi from '@/api/theme'
const toolbars = {
bold: true, //
italic: true, //
header: true, //
underline: true, // 线
strikethrough: true, // 线
quote: true, //
ol: true, //
ul: true, //
link: true, //
imagelink: true, //
code: true, // code
table: true, //
fullscreen: true, //
readmodel: true, //
htmlcode: true, // html
undo: true, //
redo: true, //
trash: true, //
navigation: true, //
subfield: true, //
preview: true //
}
export default { export default {
name: 'Editor', name: 'Editor',
components: { components: {
@ -145,6 +168,7 @@ export default {
xs: { span: 24 } xs: { span: 24 }
}, },
attachmentDrawerVisible: false, attachmentDrawerVisible: false,
toolbars,
visible: false, visible: false,
postUrl: 'hello-world', postUrl: 'hello-world',
customTpls: [], customTpls: [],