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,
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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 }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -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: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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: [],
|
Loading…
Reference in New Issue