Merge pull request #18 from FairyEver/dev
element demo files Former-commit-id: c1962cf88a54007121e4e18724f191018e888c0f [formerly c1962cf88a54007121e4e18724f191018e888c0f [formerly c1962cf88a54007121e4e18724f191018e888c0f [formerly c1962cf88a54007121e4e18724f191018e888c0f [formerly 5af6b7cba4a9a6352bb6ffe285851c875bdb41ea [formerly f6c8671eb44a128cdd49aab50989d4236933e4ae]]]]] Former-commit-id: 8fa329cb021b2b4c1091c0cd3e5afb3ee4ff3bc5 Former-commit-id: e182bcc950ead93f5015e9aef5f1fd9a0d40226f Former-commit-id: fceb317fa75470af46f996c3e9749e2580b1e484 [formerly 9676335a3254db36b5c1a15f21a0c473d7e48301] Former-commit-id: 1528c9592fb8648bd0b8460e0654ff6be234cef7 Former-commit-id: 9226642b5689685e90ad7215910342c78cf5b730 Former-commit-id: ee0ddf7087d6167dfcecfd005fd2f75eced548ba Former-commit-id: 000eac8642606793f7405c130abd981d10b35b97 Former-commit-id: bd48dd1bd5f0f7376532ee55611147a0ba90c861
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="title" size="mini">{{title}}</el-button>
|
<el-button v-if="title" size="mini" @click="$open(link)">{{title}}</el-button>
|
||||||
<el-button size="mini" @click="$open(link)">
|
<el-button size="mini" @click="$open(link)">
|
||||||
<d2-icon :name="icon"/>
|
<d2-icon :name="icon"/>
|
||||||
{{link}}
|
{{link}}
|
||||||
|
|||||||
@@ -135,9 +135,79 @@ const demoElement = {
|
|||||||
children: [
|
children: [
|
||||||
{ path: `${pre}basic-layout`, title: '布局' },
|
{ path: `${pre}basic-layout`, title: '布局' },
|
||||||
{ path: `${pre}basic-container`, title: '布局容器' },
|
{ path: `${pre}basic-container`, title: '布局容器' },
|
||||||
{ path: `${pre}basic-color`, title: '颜色' },
|
{ path: `${pre}basic-color`, title: '色彩' },
|
||||||
|
{ path: `${pre}basic-typography`, title: '字体' },
|
||||||
|
{ path: `${pre}basic-icon`, title: '图标' },
|
||||||
{ path: `${pre}basic-button`, title: '按钮' }
|
{ path: `${pre}basic-button`, title: '按钮' }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `${pre}form`,
|
||||||
|
title: '表单',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}form-radio`, title: '单选框' },
|
||||||
|
{ path: `${pre}form-checkbox`, title: '多选框' },
|
||||||
|
{ path: `${pre}form-input`, title: '输入框' },
|
||||||
|
{ path: `${pre}form-input-number`, title: '计数器' },
|
||||||
|
{ path: `${pre}form-select`, title: '选择器' },
|
||||||
|
{ path: `${pre}form-cascader`, title: '级联选择器' },
|
||||||
|
{ path: `${pre}form-switch`, title: '开关' },
|
||||||
|
{ path: `${pre}form-slider`, title: '滑块' },
|
||||||
|
{ path: `${pre}form-time-picker`, title: '时间选择器' },
|
||||||
|
{ path: `${pre}form-date-picker`, title: '日期选择器' },
|
||||||
|
{ path: `${pre}form-datetime-picker`, title: '日期时间选择器' },
|
||||||
|
{ path: `${pre}form-upload`, title: '上传' },
|
||||||
|
{ path: `${pre}form-rate`, title: '评分' },
|
||||||
|
{ path: `${pre}form-color-picker`, title: '颜色选择器' },
|
||||||
|
{ path: `${pre}form-transfer`, title: '穿梭框' },
|
||||||
|
{ path: `${pre}form-form`, title: '表单' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `${pre}data`,
|
||||||
|
title: '数据',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}data-table`, title: '表格' },
|
||||||
|
{ path: `${pre}data-tag`, title: '标签' },
|
||||||
|
{ path: `${pre}data-progress`, title: '进度条' },
|
||||||
|
{ path: `${pre}data-tree`, title: '树形控件' },
|
||||||
|
{ path: `${pre}data-pagination`, title: '分页' },
|
||||||
|
{ path: `${pre}data-badge`, title: '标记' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `${pre}notice`,
|
||||||
|
title: '消息',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}notice-alert`, title: '警告' },
|
||||||
|
{ path: `${pre}notice-loading`, title: '加载' },
|
||||||
|
{ path: `${pre}notice-message`, title: '消息提示' },
|
||||||
|
{ path: `${pre}notice-message-box`, title: '弹框' },
|
||||||
|
{ path: `${pre}notice-notification`, title: '通知' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `${pre}navigation`,
|
||||||
|
title: '导航',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}navigation-menu`, title: '导航菜单' },
|
||||||
|
{ path: `${pre}navigation-tabs`, title: '标签页' },
|
||||||
|
{ path: `${pre}navigation-breadcrumb`, title: '面包屑' },
|
||||||
|
{ path: `${pre}navigation-dropdown`, title: '下拉菜单' },
|
||||||
|
{ path: `${pre}navigation-steps`, title: '步骤条' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: `${pre}others`,
|
||||||
|
title: '其它',
|
||||||
|
children: [
|
||||||
|
{ path: `${pre}others-dialog`, title: '对话框' },
|
||||||
|
{ path: `${pre}others-tooltip`, title: '文字提示' },
|
||||||
|
{ path: `${pre}others-popover`, title: '弹出框' },
|
||||||
|
{ path: `${pre}others-card`, title: '卡片' },
|
||||||
|
{ path: `${pre}others-carousel`, title: '走马灯' },
|
||||||
|
{ path: `${pre}others-collapse`, title: '折叠面板' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
])('/demo/element/')
|
])('/demo/element/')
|
||||||
}
|
}
|
||||||
|
|||||||
23
src/pages/demo/element/basic-icon/index.vue
Normal file
23
src/pages/demo/element/basic-icon/index.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<template slot="header">图标</template>
|
||||||
|
<h1 class="d2-mt-0">
|
||||||
|
d2admin 已经集成 FontAwesome 图表库,提供约 1,000 个图标;并且准备好了图标组件
|
||||||
|
</h1>
|
||||||
|
<p>如果你愿意,你还可以随意使用 SVG 图标</p>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button @click="$router.push({ path: '/demo/components/icon/list' })">
|
||||||
|
<d2-icon name="link"/>
|
||||||
|
图标列表
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="$router.push({ path: '/demo/components/icon/icon' })">
|
||||||
|
<d2-icon name="link"/>
|
||||||
|
图标组件
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="$router.push({ path: '/demo/components/icon/svg' })">
|
||||||
|
<d2-icon name="link"/>
|
||||||
|
svg 图标组件
|
||||||
|
</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -145,4 +145,3 @@
|
|||||||
background-color: #f9fafc;
|
background-color: #f9fafc;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
91
src/pages/demo/element/basic-typography/index.vue
Normal file
91
src/pages/demo/element/basic-typography/index.vue
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container type="ghost">
|
||||||
|
<el-card shadow="never" class="d2-mb">
|
||||||
|
<template slot="header">中文字体</template>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">PingFang SC</template>
|
||||||
|
<p class="basic-typography-text typography-style-1">和畅惠风</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Hiragino Sans GB</template>
|
||||||
|
<p class="basic-typography-text typography-style-2">和畅惠风</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Microsoft YaHei</template>
|
||||||
|
<p class="basic-typography-text typography-style-3">和畅惠风</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never" class="d2-mb">
|
||||||
|
<template slot="header">英文/数字字体</template>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Helvetica Neue</template>
|
||||||
|
<p class="basic-typography-text typography-style-4">RGag</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Helvetica</template>
|
||||||
|
<p class="basic-typography-text typography-style-5">RGag</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Arial</template>
|
||||||
|
<p class="basic-typography-text typography-style-6">RGag</p>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template slot="header">Font-family 代码</template>
|
||||||
|
<d2-highlight :code="code"/>
|
||||||
|
</el-card>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
code: 'font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.basic-typography-text {
|
||||||
|
font-size: 48px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
line-height: 80px;
|
||||||
|
&.typography-style-1 {
|
||||||
|
font-family: PingFang SC;
|
||||||
|
}
|
||||||
|
&.typography-style-2 {
|
||||||
|
font-family: Hiragino Sans GB;
|
||||||
|
}
|
||||||
|
&.typography-style-3 {
|
||||||
|
font-family: Microsoft YaHei;
|
||||||
|
}
|
||||||
|
&.typography-style-4 {
|
||||||
|
font-family: Helvetica Neue;
|
||||||
|
}
|
||||||
|
&.typography-style-5 {
|
||||||
|
font-family: Helvetica;
|
||||||
|
}
|
||||||
|
&.typography-style-6 {
|
||||||
|
font-family: Arial;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
7
src/pages/demo/element/data-badge/index.vue
Normal file
7
src/pages/demo/element/data-badge/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/data-pagination/index.vue
Normal file
7
src/pages/demo/element/data-pagination/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/data-progress/index.vue
Normal file
7
src/pages/demo/element/data-progress/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/data-table/index.vue
Normal file
7
src/pages/demo/element/data-table/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/data-tag/index.vue
Normal file
7
src/pages/demo/element/data-tag/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/data-tree/index.vue
Normal file
7
src/pages/demo/element/data-tree/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-cascader/index.vue
Normal file
7
src/pages/demo/element/form-cascader/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
104
src/pages/demo/element/form-checkbox/index.vue
Normal file
104
src/pages/demo/element/form-checkbox/index.vue
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
|
<h1 class="d2-mt-0">基础用法</h1>
|
||||||
|
<el-row>
|
||||||
|
<el-checkbox v-model="checked1">备选项1</el-checkbox>
|
||||||
|
<el-checkbox v-model="checked2">备选项2</el-checkbox>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<h1>禁用状态</h1>
|
||||||
|
<el-row>
|
||||||
|
<el-checkbox v-model="checked1" disabled>备选项1</el-checkbox>
|
||||||
|
<el-checkbox v-model="checked2" disabled>备选项2</el-checkbox>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<h1>多选框组</h1>
|
||||||
|
<el-checkbox-group v-model="checkList">
|
||||||
|
<el-checkbox label="复选框 A"></el-checkbox>
|
||||||
|
<el-checkbox label="复选框 B"></el-checkbox>
|
||||||
|
<el-checkbox label="复选框 C"></el-checkbox>
|
||||||
|
<el-checkbox label="禁用" disabled></el-checkbox>
|
||||||
|
<el-checkbox label="选中且禁用" disabled></el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
|
||||||
|
<h1>indeterminate 状态</h1>
|
||||||
|
<el-checkbox :indeterminate="true" label="复选框"></el-checkbox>
|
||||||
|
|
||||||
|
<h1>可选项目数量的限制</h1>
|
||||||
|
<el-checkbox-group
|
||||||
|
v-model="checkedCities"
|
||||||
|
:min="1"
|
||||||
|
:max="2">
|
||||||
|
<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
|
<h1>按钮样式</h1>
|
||||||
|
<div>
|
||||||
|
<el-checkbox-group v-model="checkboxGroup1">
|
||||||
|
<el-checkbox-button v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox-group v-model="checkboxGroup1" size="medium">
|
||||||
|
<el-checkbox-button v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox-group v-model="checkboxGroup1" size="small">
|
||||||
|
<el-checkbox-button v-for="city in cities" :label="city" :disabled="city === '北京'" :key="city">{{city}}</el-checkbox-button>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox-group v-model="checkboxGroup1" size="mini" disabled>
|
||||||
|
<el-checkbox-button v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>带有边框</h1>
|
||||||
|
<div>
|
||||||
|
<el-checkbox v-model="checked1" label="备选项1" border></el-checkbox>
|
||||||
|
<el-checkbox v-model="checked2" label="备选项2" border></el-checkbox>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox v-model="checked1" label="备选项1" border size="medium"></el-checkbox>
|
||||||
|
<el-checkbox v-model="checked2" label="备选项2" border size="medium"></el-checkbox>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox-group v-model="checkboxGroup2" size="small">
|
||||||
|
<el-checkbox label="备选项1" border></el-checkbox>
|
||||||
|
<el-checkbox label="备选项2" border disabled></el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-checkbox-group v-model="checkboxGroup2" size="mini" disabled>
|
||||||
|
<el-checkbox label="备选项1" border></el-checkbox>
|
||||||
|
<el-checkbox label="备选项2" border></el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
checked1: true,
|
||||||
|
checked2: false,
|
||||||
|
checkList: ['选中且禁用', '复选框 A'],
|
||||||
|
checkedCities: ['上海', '北京'],
|
||||||
|
cities: ['上海', '北京', '广州', '深圳'],
|
||||||
|
checkboxGroup1: ['上海'],
|
||||||
|
checkboxGroup2: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
7
src/pages/demo/element/form-color-picker/index.vue
Normal file
7
src/pages/demo/element/form-color-picker/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-date-picker/index.vue
Normal file
7
src/pages/demo/element/form-date-picker/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-datetime-picker/index.vue
Normal file
7
src/pages/demo/element/form-datetime-picker/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-form/index.vue
Normal file
7
src/pages/demo/element/form-form/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-input-number/index.vue
Normal file
7
src/pages/demo/element/form-input-number/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-input/index.vue
Normal file
7
src/pages/demo/element/form-input/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
100
src/pages/demo/element/form-radio/index.vue
Normal file
100
src/pages/demo/element/form-radio/index.vue
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
|
<h1 class="d2-mt-0">基础用法</h1>
|
||||||
|
<el-row>
|
||||||
|
<el-radio v-model="radio" label="1">备选项</el-radio>
|
||||||
|
<el-radio v-model="radio" label="2">备选项</el-radio>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<h1>禁用状态</h1>
|
||||||
|
<el-row>
|
||||||
|
<el-radio disabled v-model="radio" label="1">备选项</el-radio>
|
||||||
|
<el-radio disabled v-model="radio" label="2">备选项</el-radio>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<h1>单选框组</h1>
|
||||||
|
<el-row>
|
||||||
|
<el-radio-group v-model="radio">
|
||||||
|
<el-radio label="1">备选项1</el-radio>
|
||||||
|
<el-radio label="2">备选项2</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<h1>带有边框</h1>
|
||||||
|
<div>
|
||||||
|
<el-radio v-model="radio" label="1" border>备选项1</el-radio>
|
||||||
|
<el-radio v-model="radio" label="2" border>备选项2</el-radio>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio v-model="radio" label="1" border size="medium">备选项1</el-radio>
|
||||||
|
<el-radio v-model="radio" label="2" border size="medium">备选项2</el-radio>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio-group v-model="radio" size="small">
|
||||||
|
<el-radio label="1" border>备选项1</el-radio>
|
||||||
|
<el-radio label="2" border disabled>备选项2</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio-group v-model="radio" size="mini" disabled>
|
||||||
|
<el-radio label="1" border>备选项1</el-radio>
|
||||||
|
<el-radio label="2" border>备选项2</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
|
<h1>单选框组</h1>
|
||||||
|
<div>
|
||||||
|
<el-radio-group v-model="radio2">
|
||||||
|
<el-radio-button label="上海"></el-radio-button>
|
||||||
|
<el-radio-button label="北京"></el-radio-button>
|
||||||
|
<el-radio-button label="广州"></el-radio-button>
|
||||||
|
<el-radio-button label="深圳"></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio-group v-model="radio2" size="medium">
|
||||||
|
<el-radio-button label="上海" ></el-radio-button>
|
||||||
|
<el-radio-button label="北京"></el-radio-button>
|
||||||
|
<el-radio-button label="广州"></el-radio-button>
|
||||||
|
<el-radio-button label="深圳"></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio-group v-model="radio2" size="small">
|
||||||
|
<el-radio-button label="上海"></el-radio-button>
|
||||||
|
<el-radio-button label="北京" disabled ></el-radio-button>
|
||||||
|
<el-radio-button label="广州"></el-radio-button>
|
||||||
|
<el-radio-button label="深圳"></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
<el-radio-group v-model="radio2" disabled size="mini">
|
||||||
|
<el-radio-button label="上海"></el-radio-button>
|
||||||
|
<el-radio-button label="北京"></el-radio-button>
|
||||||
|
<el-radio-button label="广州"></el-radio-button>
|
||||||
|
<el-radio-button label="深圳"></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
radio: '1',
|
||||||
|
radio2: '上海'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
7
src/pages/demo/element/form-rate/index.vue
Normal file
7
src/pages/demo/element/form-rate/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-select/index.vue
Normal file
7
src/pages/demo/element/form-select/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-slider/index.vue
Normal file
7
src/pages/demo/element/form-slider/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-switch/index.vue
Normal file
7
src/pages/demo/element/form-switch/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-time-picker/index.vue
Normal file
7
src/pages/demo/element/form-time-picker/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-transfer/index.vue
Normal file
7
src/pages/demo/element/form-transfer/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/form-upload/index.vue
Normal file
7
src/pages/demo/element/form-upload/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/navigation-breadcrumb/index.vue
Normal file
7
src/pages/demo/element/navigation-breadcrumb/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/navigation-dropdown/index.vue
Normal file
7
src/pages/demo/element/navigation-dropdown/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/navigation-menu/index.vue
Normal file
7
src/pages/demo/element/navigation-menu/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/navigation-steps/index.vue
Normal file
7
src/pages/demo/element/navigation-steps/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/navigation-tabs/index.vue
Normal file
7
src/pages/demo/element/navigation-tabs/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/notice-alert/index.vue
Normal file
7
src/pages/demo/element/notice-alert/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/notice-loading/index.vue
Normal file
7
src/pages/demo/element/notice-loading/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/notice-message-box/index.vue
Normal file
7
src/pages/demo/element/notice-message-box/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/notice-message/index.vue
Normal file
7
src/pages/demo/element/notice-message/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/notice-notification/index.vue
Normal file
7
src/pages/demo/element/notice-notification/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-card/index.vue
Normal file
7
src/pages/demo/element/others-card/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-carousel/index.vue
Normal file
7
src/pages/demo/element/others-carousel/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-collapse/index.vue
Normal file
7
src/pages/demo/element/others-collapse/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-dialog/index.vue
Normal file
7
src/pages/demo/element/others-dialog/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-popover/index.vue
Normal file
7
src/pages/demo/element/others-popover/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
7
src/pages/demo/element/others-tooltip/index.vue
Normal file
7
src/pages/demo/element/others-tooltip/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<d2-container>
|
||||||
|
<h1 class="d2-mt-0">该页面尚未完成组件示例搬运</h1>
|
||||||
|
<p>D2Admin 的构建依托于由饿了么出品的 ElementUI,欲了解更多该组件的信息请查阅以下链接</p>
|
||||||
|
<d2-demo-link-btn title="Element" link="http://element.eleme.io/#/zh-CN"/>
|
||||||
|
</d2-container>
|
||||||
|
</template>
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import VueRouter from 'vue-router'
|
|
||||||
import Cookies from 'js-cookie'
|
|
||||||
|
|
||||||
const meta = { requiresAuth: true }
|
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
|
||||||
|
|
||||||
const routes = [
|
|
||||||
// 首页
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
redirect: { name: 'index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'index',
|
|
||||||
name: 'index',
|
|
||||||
meta,
|
|
||||||
component: () => import('@/pages/core/index/index.vue')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/demo/business',
|
|
||||||
name: 'demo-business',
|
|
||||||
meta,
|
|
||||||
redirect: { name: 'demo-business-index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: (pre => [
|
|
||||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/business/index/index.vue'), meta }
|
|
||||||
])('demo-business-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/demo/chart',
|
|
||||||
name: 'demo-chart',
|
|
||||||
meta,
|
|
||||||
redirect: { name: 'demo-chart-index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: (pre => [
|
|
||||||
{ path: 'all', name: `${pre}all`, component: () => import('@/pages/demo/chart/all/index.vue'), meta },
|
|
||||||
{ path: 'demo/areaBase', name: `${pre}demo-areaBase`, component: () => import('@/pages/demo/chart/demo/areaBase.vue'), meta },
|
|
||||||
{ path: 'demo/barBase', name: `${pre}demo-barBase`, component: () => import('@/pages/demo/chart/demo/barBase.vue'), meta },
|
|
||||||
{ path: 'demo/columnBase', name: `${pre}demo-columnBase`, component: () => import('@/pages/demo/chart/demo/columnBase.vue'), meta },
|
|
||||||
{ path: 'demo/lineBase', name: `${pre}demo-lineBase`, component: () => import('@/pages/demo/chart/demo/lineBase.vue'), meta },
|
|
||||||
{ path: 'demo/lineStep', name: `${pre}demo-lineStep`, component: () => import('@/pages/demo/chart/demo/lineStep.vue'), meta },
|
|
||||||
{ path: 'demo/nightingaleRoseBase', name: `${pre}demo-nightingaleRoseBase`, component: () => import('@/pages/demo/chart/demo/nightingaleRoseBase.vue'), meta },
|
|
||||||
{ path: 'demo/PieBase', name: `${pre}demo-PieBase`, component: () => import('@/pages/demo/chart/demo/PieBase.vue'), meta },
|
|
||||||
{ path: 'demo/radarBase', name: `${pre}demo-radarBase`, component: () => import('@/pages/demo/chart/demo/radarBase.vue'), meta },
|
|
||||||
{ path: 'dynamicSize', name: `${pre}dynamicSize`, component: () => import('@/pages/demo/chart/dynamicSize/index.vue'), meta },
|
|
||||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/chart/index/index.vue'), meta }
|
|
||||||
])('demo-chart-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/demo/plugins',
|
|
||||||
name: 'demo-plugins',
|
|
||||||
meta,
|
|
||||||
redirect: { name: 'demo-plugins-index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: (pre => [
|
|
||||||
{ path: 'build', name: `${pre}build`, component: () => import('@/pages/demo/plugins/build/index.vue'), meta },
|
|
||||||
{ path: 'clipboard-polyfill', name: `${pre}clipboard-polyfill`, component: () => import('@/pages/demo/plugins/clipboard-polyfill/index.vue'), meta },
|
|
||||||
{ path: 'day', name: `${pre}day`, component: () => import('@/pages/demo/plugins/day/index.vue'), meta },
|
|
||||||
{ path: 'export/table', name: `${pre}export-table`, component: () => import('@/pages/demo/plugins/export/table.vue'), meta },
|
|
||||||
{ path: 'export/txt', name: `${pre}export-txt`, component: () => import('@/pages/demo/plugins/export/txt.vue'), meta },
|
|
||||||
{ path: 'i18n/demo1', name: `${pre}i18n-demo1`, component: () => import('@/pages/demo/plugins/i18n/demo1.vue'), meta },
|
|
||||||
{ path: 'i18n/demo2', name: `${pre}i18n-demo2`, component: () => import('@/pages/demo/plugins/i18n/demo2.vue'), meta },
|
|
||||||
{ path: 'import/csv', name: `${pre}import-csv`, component: () => import('@/pages/demo/plugins/import/csv.vue'), meta },
|
|
||||||
{ path: 'import/xlsx', name: `${pre}import-xlsx`, component: () => import('@/pages/demo/plugins/import/xlsx.vue'), meta },
|
|
||||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/plugins/index/index.vue'), meta },
|
|
||||||
{ path: 'js-cookie', name: `${pre}js-cookie`, component: () => import('@/pages/demo/plugins/js-cookie/index.vue'), meta },
|
|
||||||
{ path: 'mock/ajax', name: `${pre}mock-ajax`, component: () => import('@/pages/demo/plugins/mock/ajax.vue'), meta },
|
|
||||||
{ path: 'mock/dpd', name: `${pre}mock-dpd`, component: () => import('@/pages/demo/plugins/mock/dpd.vue'), meta },
|
|
||||||
{ path: 'mock/dtd', name: `${pre}mock-dtd`, component: () => import('@/pages/demo/plugins/mock/dtd.vue'), meta }
|
|
||||||
])('demo-plugins-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/demo/components',
|
|
||||||
name: 'demo-components',
|
|
||||||
meta,
|
|
||||||
redirect: { name: 'demo-components-index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: (pre => [
|
|
||||||
{ path: 'bigdata-table', name: `${pre}bigdata-table`, component: () => import('@/pages/demo/components/bigdata-table/index.vue'), meta },
|
|
||||||
{ path: 'container/full', name: `${pre}container-full`, component: () => import('@/pages/demo/components/container/full.vue'), meta },
|
|
||||||
{ path: 'container/ghost', name: `${pre}container-ghost`, component: () => import('@/pages/demo/components/container/ghost.vue'), meta },
|
|
||||||
{ path: 'container/card', name: `${pre}container-card`, component: () => import('@/pages/demo/components/container/card.vue'), meta },
|
|
||||||
{ path: 'countup', name: `${pre}countup`, component: () => import('@/pages/demo/components/countup/index.vue'), meta },
|
|
||||||
{ path: 'editor-quill', name: `${pre}editor-quill`, component: () => import('@/pages/demo/components/editor-quill/index.vue'), meta },
|
|
||||||
{ path: 'editor-simpleMDE', name: `${pre}editor-simpleMDE`, component: () => import('@/pages/demo/components/editor-simpleMDE/index.vue'), meta },
|
|
||||||
{ path: 'highlight', name: `${pre}highlight`, component: () => import('@/pages/demo/components/highlight/index.vue'), meta },
|
|
||||||
{ path: 'icon/icon', name: `${pre}icon-icon`, component: () => import('@/pages/demo/components/icon/icon.vue'), meta },
|
|
||||||
{ path: 'icon/list', name: `${pre}icon-list`, component: () => import('@/pages/demo/components/icon/list.vue'), meta },
|
|
||||||
{ path: 'icon/select', name: `${pre}icon-select`, component: () => import('@/pages/demo/components/icon/select.vue'), meta },
|
|
||||||
{ path: 'icon/svg', name: `${pre}icon-svg`, component: () => import('@/pages/demo/components/icon/svg.vue'), meta },
|
|
||||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/components/index/index.vue'), meta },
|
|
||||||
{ path: 'layout/grid', name: `${pre}layout-grid`, component: () => import('@/pages/demo/components/layout/grid.vue'), meta },
|
|
||||||
{ path: 'layout/splitpane', name: `${pre}layout-splitpane`, component: () => import('@/pages/demo/components/layout/splitpane.vue'), meta },
|
|
||||||
{ path: 'markdown/source', name: `${pre}markdown-source`, component: () => import('@/pages/demo/components/markdown/source.vue'), meta },
|
|
||||||
{ path: 'markdown/url', name: `${pre}markdown-url`, component: () => import('@/pages/demo/components/markdown/url.vue'), meta },
|
|
||||||
{ path: 'scrollbar', name: `${pre}scrollbar`, component: () => import('@/pages/demo/components/scrollbar/index.vue'), meta }
|
|
||||||
])('demo-components-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/demo/element',
|
|
||||||
name: 'demo-element',
|
|
||||||
meta,
|
|
||||||
redirect: { name: 'demo-element-index' },
|
|
||||||
component: () => import('@/components/core/d2-layout-main/index.vue'),
|
|
||||||
children: (pre => [
|
|
||||||
{ path: 'basic-layout', name: `${pre}basic-layout`, component: () => import('@/pages/demo/element/basic-layout/index.vue'), meta },
|
|
||||||
{ path: 'basic-container', name: `${pre}basic-container`, component: () => import('@/pages/demo/element/basic-container/index.vue'), meta },
|
|
||||||
{ path: 'basic-color', name: `${pre}basic-color`, component: () => import('@/pages/demo/element/basic-color/index.vue'), meta },
|
|
||||||
{ path: 'basic-button', name: `${pre}basic-button`, component: () => import('@/pages/demo/element/basic-button/index.vue'), meta },
|
|
||||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/element/index/index.vue'), meta }
|
|
||||||
])('demo-element-')
|
|
||||||
},
|
|
||||||
// 登陆
|
|
||||||
{
|
|
||||||
path: '/login',
|
|
||||||
name: 'login',
|
|
||||||
component: () => import('@/pages/core/login/index.vue')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
let router = new VueRouter({ routes })
|
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
|
||||||
// 验证当前路由所有的匹配中是否需要有登陆验证的
|
|
||||||
if (to.matched.some(r => r.meta.requiresAuth)) {
|
|
||||||
// 这里暂时将cookie里是否存有token作为验证是否登陆的条件
|
|
||||||
// 请根据自身业务需要修改
|
|
||||||
if (Cookies.get('token')) {
|
|
||||||
next()
|
|
||||||
} else {
|
|
||||||
// 没有登陆的时候跳转到登陆界面
|
|
||||||
next({
|
|
||||||
name: 'login'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 不需要身份校验 直接通过
|
|
||||||
next()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
||||||
1
src/router/index.js.REMOVED.git-id
Normal file
1
src/router/index.js.REMOVED.git-id
Normal file
@@ -0,0 +1 @@
|
|||||||
|
98262236d74b49a612e6be6ba8cac9307d0fc023
|
||||||
Reference in New Issue
Block a user