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,
// vue-ls options
storageOptions: {
namespace: 'pro__', // key prefix
namespace: 'halo__', // key prefix
name: 'ls', // name variable Vue.[ls] or this.[$ls],
storage: 'local' // storage name session, local, memory
}
}
}

View File

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

View File

@ -21,6 +21,7 @@
<mavon-editor
v-model="postToStage.originalContent"
:boxShadow="false"
:toolbars="toolbars"
:ishljs="true"
/>
</div>
@ -168,7 +169,6 @@ import categoryApi from '@/api/category'
import postApi from '@/api/post'
import AttachmentDrawer from '../attachment/components/AttachmentDrawer'
import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer'
const toolbars = {
bold: true, //
italic: true, //
@ -182,9 +182,12 @@ const toolbars = {
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 //
@ -214,7 +217,7 @@ export default {
categories: [],
selectedCategoryIds: [],
selectedTagIds: [],
markdownOption: toolbars,
toolbars: toolbars,
postToStage: {}
}
},

View File

@ -20,6 +20,7 @@
<mavon-editor
v-model="postToStage.originalContent"
:boxShadow="false"
:toolbars="toolbars"
:ishljs="true"
/>
</div>
@ -128,7 +129,29 @@ import { mixin, mixinDevice } from '@/utils/mixin.js'
import 'mavon-editor/dist/css/index.css'
import postApi from '@/api/post'
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 {
name: 'Editor',
components: {
@ -145,6 +168,7 @@ export default {
xs: { span: 24 }
},
attachmentDrawerVisible: false,
toolbars,
visible: false,
postUrl: 'hello-world',
customTpls: [],