no message

Former-commit-id: 4d27ae069aeb4572fa89ad88830cea632a9c24e0 [formerly 4d27ae069aeb4572fa89ad88830cea632a9c24e0 [formerly 4d27ae069aeb4572fa89ad88830cea632a9c24e0 [formerly 4d27ae069aeb4572fa89ad88830cea632a9c24e0 [formerly 3257261d5f065c82095551c2af76ad5bcecd3599 [formerly 94e014848cab83f5fed0c3d8ff611a1a959c8452]]]]]
Former-commit-id: edda00f6da0858183b94f0982fe544ca65354a8b
Former-commit-id: 8813dd2f948073fa4b314beedd698cbd3820568f
Former-commit-id: 66b4d87f8efc7643f9551b84062d8e4188fdcb31 [formerly a3e7846f9f02e53a800bad19426ce0d0a24efa4c]
Former-commit-id: 7f3481cf95a7647541ad70bd065b703416bd90e4
Former-commit-id: 55dc00033e7a3ff5464256776f1b30430bd76800
Former-commit-id: f2ba4063dcd583828247b8db0b18072f2df539e2
Former-commit-id: caa074feb6a00ed1e20c56c6357f17fb89b8bdfb
Former-commit-id: 861f1c60f345a574dec12fae0c861aaa4b98369f
This commit is contained in:
liyang
2018-06-27 11:25:19 +08:00
parent 98f1aa4fd9
commit 8455116030
9 changed files with 292 additions and 303 deletions

View File

@@ -1,302 +0,0 @@
// 路由菜单 插件
const demoPlugins = {
path: '/demo/plugins',
title: '插件',
icon: 'plug',
children: (pre => [
{ path: `${pre}index`, title: '插件首页' },
{
path: `${pre}mock`,
title: '模拟数据',
children: [
{ path: `${pre}mock/ajax`, title: '拦截异步请求' },
{ path: `${pre}mock/dpd`, title: 'DPD 规则' },
{ path: `${pre}mock/dtd`, title: 'DTD 规则' }
]
},
{
path: `${pre}import`,
title: '导入',
children: [
{ path: `${pre}import/csv`, title: 'csv' },
{ path: `${pre}import/xlsx`, title: 'xlsx' }
]
},
{
path: `${pre}export`,
title: '导出',
children: [
{ path: `${pre}export/table`, title: '表格' },
{ path: `${pre}export/txt`, title: '文本' }
]
},
{
path: `${pre}i18n`,
title: '多国语',
children: [
{ path: `${pre}i18n/demo1`, title: '示例1' },
{ path: `${pre}i18n/demo2`, title: '示例2' }
]
},
{
path: `${pre}better-scroll`,
title: '滚动扩展',
children: [
{ path: `${pre}better-scroll/base`, title: '基础用法' },
{ path: `${pre}better-scroll/to`, title: '滚动定位' }
]
},
{ path: `${pre}build`, title: '环境区分' },
{ path: `${pre}clipboard-polyfill`, title: '剪贴板访问' },
{ path: `${pre}day`, title: '日期计算' },
{ path: `${pre}js-cookie`, title: 'Cookie 读写' }
])('/demo/plugins/')
}
// 路由菜单 组件
const demoComponents = {
path: '/demo/components',
title: '组件',
icon: 'puzzle-piece',
children: (pre => [
{ path: `${pre}index`, title: '组件首页' },
{
path: `${pre}container`,
title: '布局容器',
children: [
{ path: `${pre}container/full`, title: '填满' },
{ path: `${pre}container/ghost`, title: '隐形' },
{ path: `${pre}container/card`, title: '卡片' }
]
},
{
path: `${pre}layout/grid`,
title: '高级布局',
children: [
{ path: `${pre}layout/grid`, title: '拖拽位置和大小' },
{ path: `${pre}layout/splitpane`, title: '区域划分' }
]
},
{
path: `${pre}icon`,
title: '图标',
children: [
{ path: `${pre}icon/icon`, title: '图标组件' },
{ path: `${pre}icon/list`, title: 'FontAwesome' },
{ path: `${pre}icon/select`, title: '图标选择器' },
{ path: `${pre}icon/svg`, title: 'SVG图标组件' }
]
},
{
path: `${pre}markdown`,
title: 'markdown 解析',
children: [
{ path: `${pre}markdown/source`, title: '指定资源' },
{ path: `${pre}markdown/url`, title: '异步加载文件' }
]
},
{
path: `${pre}contextmenu`,
title: '右键菜单',
children: [
{ path: `${pre}contextmenu/simple`, title: '基础' },
{ path: `${pre}contextmenu/divier`, title: '分割线' },
{ path: `${pre}contextmenu/group`, title: '按钮组' },
{ path: `${pre}contextmenu/submenu`, title: '子菜单' },
{ path: `${pre}contextmenu/disabled`, title: '禁用' },
{ path: `${pre}contextmenu/custom-trigger`, title: '自定义事件' }
]
},
{ path: `${pre}bigdata-table`, title: '百万数量级表格' },
{ path: `${pre}scrollbar`, title: 'Element 滚动条组件' },
{ path: `${pre}countup`, title: '数字动画' },
{ path: `${pre}editor-quill`, title: '富文本编辑器' },
{ path: `${pre}editor-simpleMDE`, title: 'markdown编辑器' },
{ path: `${pre}highlight`, title: '代码高亮显示' }
])('/demo/components/')
}
// 路由菜单 组件
const demoCharts = {
path: '/demo/charts',
title: '图表',
icon: 'line-chart',
children: (pre => [
{ path: `${pre}index`, title: '图表首页' },
{
path: `${pre}list`,
title: '图表',
children: [
{
path: `${pre}list/line`,
title: '折线图',
children: [
{ path: `${pre}list/line/demo1`, title: '一般' },
{ path: `${pre}list/line/demo2`, title: '横坐标的倾斜' },
{ path: `${pre}list/line/demo3`, title: '堆叠面积图' },
{ path: `${pre}list/line/demo4`, title: '显示指标数值' },
{ path: `${pre}list/line/demo5`, title: '设置别名' }
]
},
{
path: `${pre}list/histogram`,
title: '柱状图',
children: [
{ path: `${pre}list/histogram/demo1`, title: '一般' },
{ path: `${pre}list/histogram/demo2`, title: '设置显示的指标维度' },
{ path: `${pre}list/histogram/demo3`, title: '柱状图+折线图' },
{ path: `${pre}list/histogram/demo4`, title: '堆叠柱状图' },
{ path: `${pre}list/histogram/demo5`, title: '默认显示柱状图数据' },
{ path: `${pre}list/histogram/demo6`, title: '横轴为连续的数值轴' }
]
},
{
path: `${pre}list/bar`,
title: '条形图',
children: [
{ path: `${pre}list/bar/demo1`, title: '一般' },
{ path: `${pre}list/bar/demo2`, title: '指定指标维度' },
{ path: `${pre}list/bar/demo3`, title: '排序条形图' },
{ path: `${pre}list/bar/demo4`, title: '堆叠条形图' },
{ path: `${pre}list/bar/demo5`, title: '纵轴为连续的数值轴' }
]
}
]
}
])('/demo/charts/')
}
// 路由菜单 组件库
const demoElement = {
path: '/demo/element',
title: 'Element 组件库',
icon: 'cubes',
children: (pre => [
{ path: `${pre}index`, title: '组件库首页' },
{
path: `${pre}basic`,
title: '基础',
children: [
{ path: `${pre}basic-layout`, title: '布局' },
{ path: `${pre}basic-container`, title: '布局容器' },
{ path: `${pre}basic-color`, title: '色彩' },
{ path: `${pre}basic-typography`, title: '字体' },
{ path: `${pre}basic-icon`, 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/')
}
// 菜单 侧边栏
export const side = [
demoPlugins,
demoComponents,
demoCharts,
demoElement
]
// 菜单 顶栏
export default [
{
path: '/index',
title: '首页'
},
{
path: '/demo',
title: '集成功能',
children: [
demoPlugins,
demoComponents,
demoCharts,
demoElement,
{
title: '空菜单演示',
icon: 'folder-o',
children: [
{
title: '正在开发 1',
children: [
{ title: '正在开发 1-1' },
{ title: '正在开发 1-2' }
]
},
{ title: '正在开发 2' },
{ title: '正在开发 3' }
]
}
]
},
{
path: '/demo/business',
title: '示例业务界面'
}
]

View File

@@ -0,0 +1 @@
b1a19ac8b53aa01e582a29119c729b52011799e7

View File

@@ -0,0 +1,45 @@
<template>
<d2-container type="full">
<template slot="header">一般</template>
<div class="inner">
<ve-pie :data="chartData" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -0,0 +1,49 @@
<template>
<d2-container type="full">
<template slot="header">设置指标维度</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
this.chartSettings = {
dimension: '日期',
metrics: '访问用户'
}
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -0,0 +1,48 @@
<template>
<d2-container type="full">
<template slot="header">玫瑰图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
this.chartSettings = {
roseType: 'radius'
}
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -0,0 +1,48 @@
<template>
<d2-container type="full">
<template slot="header">限制显示条数饼图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
this.chartSettings = {
limitShowNum: 5
}
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -0,0 +1,51 @@
<template>
<d2-container type="full">
<template slot="header">多圆饼图</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
this.chartSettings = {
level: [
['1/1', '1/2', '1/3'],
['1/4', '1/5']
]
}
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -0,0 +1,49 @@
<template>
<d2-container type="full">
<template slot="header">设置饼图半径边距</template>
<div class="inner">
<ve-pie :data="chartData" :settings="chartSettings" v-bind="pubSetting"></ve-pie>
</div>
<template slot="footer">
<d2-demo-link-btn title="更多示例和文档" link="https://v-charts.js.org"/>
</template>
</d2-container>
</template>
<script>
import list from '@/pages/demo/charts/list/_mixin/list.js'
export default {
mixins: [
list
],
data () {
this.chartSettings = {
radius: 150,
offsetY: 300
}
return {
chartData: {
columns: ['日期', '访问用户'],
rows: [
{ '日期': '1/1', '访问用户': 1393 },
{ '日期': '1/2', '访问用户': 3530 },
{ '日期': '1/3', '访问用户': 2923 },
{ '日期': '1/4', '访问用户': 1723 },
{ '日期': '1/5', '访问用户': 3792 },
{ '日期': '1/6', '访问用户': 4593 }
]
}
}
}
}
</script>
<style lang="scss" scoped>
.inner {
position: absolute;
top: 20px;
right: 20px;
bottom: 20px;
left: 20px;
}
</style>

View File

@@ -1 +1 @@
f3726e2cebb4b51db3760164df947dcfe8b94092
9ab0a4c438087beeca12aa5d54dd50a2086378a6