mirror of https://github.com/halo-dev/halo-admin
Change router view to page view component for /interface route
parent
534617d1f0
commit
0c8dcea2b6
|
@ -2,7 +2,6 @@
|
|||
import { BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
|
||||
|
||||
export const asyncRouterMap = [
|
||||
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
|
@ -10,7 +9,6 @@ export const asyncRouterMap = [
|
|||
meta: { title: '首页' },
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
|
||||
// dashboard
|
||||
{
|
||||
path: '/dashboard',
|
||||
|
@ -111,7 +109,7 @@ export const asyncRouterMap = [
|
|||
{
|
||||
path: '/interface',
|
||||
name: 'Interface',
|
||||
component: RouteView,
|
||||
component: PageView,
|
||||
redirect: '/interface/themes',
|
||||
meta: { title: '外观', icon: 'skin' },
|
||||
children: [
|
||||
|
@ -184,7 +182,9 @@ export const asyncRouterMap = [
|
|||
]
|
||||
},
|
||||
{
|
||||
path: '*', redirect: '/404', hidden: true
|
||||
path: '*',
|
||||
redirect: '/404',
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
<page-view>
|
||||
<a-row :gutter="12">
|
||||
<a-col
|
||||
:xl="10"
|
||||
|
@ -7,34 +6,57 @@
|
|||
:md="10"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{ 'padding-bottom': '12px' }">
|
||||
:style="{ 'padding-bottom': '12px' }"
|
||||
>
|
||||
<a-card title="添加菜单">
|
||||
<a-form layout="horizontal">
|
||||
<a-form-item label="名称:" help="* 页面上所显示的名称">
|
||||
<a-form-item
|
||||
label="名称:"
|
||||
help="* 页面上所显示的名称"
|
||||
>
|
||||
<a-input v-model="menuToCreate.name" />
|
||||
</a-form-item>
|
||||
<a-form-item label="路径:" help="* 菜单的路径">
|
||||
<a-form-item
|
||||
label="路径:"
|
||||
help="* 菜单的路径"
|
||||
>
|
||||
<a-input v-model="menuToCreate.url" />
|
||||
</a-form-item>
|
||||
<a-form-item label="上级菜单:">
|
||||
<a-select v-model="menuToCreate.parentId">
|
||||
<a-select-option v-for="(menu,index) in menus" :key="index" :value="menu.id">{{ menu.name }}</a-select-option>
|
||||
<a-select-option
|
||||
v-for="(menu,index) in menus"
|
||||
:key="index"
|
||||
:value="menu.id"
|
||||
>{{ menu.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="排序编号:">
|
||||
<a-input type="number" v-model="menuToCreate.sort" />
|
||||
<a-input
|
||||
type="number"
|
||||
v-model="menuToCreate.sort"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="图标:" help="* 请根据主题的支持选填">
|
||||
<a-form-item
|
||||
label="图标:"
|
||||
help="* 请根据主题的支持选填"
|
||||
>
|
||||
<a-input v-model="menuToCreate.icon" />
|
||||
</a-form-item>
|
||||
<a-form-item label="打开方式:">
|
||||
<a-select defaultValue="_self" v-model="menuToCreate.target">
|
||||
<a-select
|
||||
defaultValue="_self"
|
||||
v-model="menuToCreate.target"
|
||||
>
|
||||
<a-select-option value="_self">当前窗口</a-select-option>
|
||||
<a-select-option value="_blank">新窗口</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-button type="primary" @click="createMenu">保存</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="createMenu"
|
||||
>保存</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-card>
|
||||
|
@ -45,14 +67,30 @@
|
|||
:md="14"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{ 'padding-bottom': '12px' }">
|
||||
:style="{ 'padding-bottom': '12px' }"
|
||||
>
|
||||
<a-card title="所有菜单">
|
||||
<a-table :columns="columns" :dataSource="menus" :loading="loading">
|
||||
<ellipsis :length="30" tooltip slot="name" slot-scope="text">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:dataSource="menus"
|
||||
:loading="loading"
|
||||
>
|
||||
<ellipsis
|
||||
:length="30"
|
||||
tooltip
|
||||
slot="name"
|
||||
slot-scope="text"
|
||||
>
|
||||
{{ text }}
|
||||
</ellipsis>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a href="javascript:;" @click="editMenu(record.id)">编辑</a>
|
||||
<span
|
||||
slot="action"
|
||||
slot-scope="text, record"
|
||||
>
|
||||
<a
|
||||
href="javascript:;"
|
||||
@click="editMenu(record.id)"
|
||||
>编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm
|
||||
:title="'你确定要删除【' + record.name + '】菜单?'"
|
||||
|
@ -67,11 +105,9 @@
|
|||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</page-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { PageView } from '@/layouts'
|
||||
import { Ellipsis } from '@/components'
|
||||
import menuApi from '@/api/menu'
|
||||
const columns = [
|
||||
|
@ -100,7 +136,6 @@ const columns = [
|
|||
]
|
||||
export default {
|
||||
components: {
|
||||
PageView,
|
||||
Ellipsis
|
||||
},
|
||||
data() {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
<page-view>
|
||||
<a-row :gutter="12">
|
||||
<a-col
|
||||
:xl="18"
|
||||
|
@ -7,7 +6,8 @@
|
|||
:md="18"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{'padding-bottom':'12px'}">
|
||||
:style="{'padding-bottom':'12px'}"
|
||||
>
|
||||
<a-card>
|
||||
<a-form layout="vertical">
|
||||
<a-form-item>
|
||||
|
@ -25,23 +25,21 @@
|
|||
:md="6"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{'padding-bottom':'12px'}">
|
||||
:style="{'padding-bottom':'12px'}"
|
||||
>
|
||||
<a-card title="Anatole 主题">
|
||||
<theme-file :files="files" />
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</page-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import themeApi from '@/api/theme'
|
||||
import ThemeFile from './components/ThemeFile'
|
||||
import { codemirror } from 'vue-codemirror-lite'
|
||||
import { PageView } from '@/layouts'
|
||||
export default {
|
||||
components: {
|
||||
PageView,
|
||||
codemirror,
|
||||
ThemeFile
|
||||
},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<page-view>
|
||||
<div>
|
||||
|
||||
<a-row
|
||||
:gutter="12"
|
||||
type="flex"
|
||||
|
@ -165,15 +166,13 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</a-drawer>
|
||||
</page-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { PageView } from '@/layouts'
|
||||
import themeApi from '@/api/theme'
|
||||
|
||||
export default {
|
||||
components: { PageView },
|
||||
data() {
|
||||
return {
|
||||
optionLoading: true,
|
||||
|
|
Loading…
Reference in New Issue