mirror of https://github.com/halo-dev/halo-admin
Change Page to Sheet.
parent
dfbc9a7865
commit
847e9eec5e
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 }
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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: {}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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: [],
|
Loading…
Reference in New Issue