feat: 增加构建分析页面示例

This commit is contained in:
FairyEver 2020-06-09 17:41:55 +08:00
parent 13eabf9da5
commit 099fde59e7
4 changed files with 7 additions and 2 deletions

View File

@ -5,7 +5,7 @@
"serve": "vue-cli-service serve --open", "serve": "vue-cli-service serve --open",
"start": "npm run serve", "start": "npm run serve",
"dev": "npm run serve", "dev": "npm run serve",
"build": "vue-cli-service build", "build": "vue-cli-service build --report",
"build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview", "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
"lint": "vue-cli-service lint --fix", "lint": "vue-cli-service lint --fix",
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit"

View File

@ -5,6 +5,7 @@ export default {
children: (pre => [ children: (pre => [
{ path: `${pre}index`, title: 'Frame ', icon: 'home' }, { path: `${pre}index`, title: 'Frame ', icon: 'home' },
{ path: `${pre}d2-doc`, title: 'D2Admin 中文文档', iconSvg: 'd2-admin' }, { path: `${pre}d2-doc`, title: 'D2Admin 中文文档', iconSvg: 'd2-admin' },
{ path: `${pre}html`, title: '静态 HTML', icon: 'code' } { path: `${pre}html`, title: '静态 HTML', icon: 'code' },
{ path: `${pre}report`, title: '构建分析', icon: 'pie-chart' }
])('/demo/frame/') ])('/demo/frame/')
} }

View File

@ -14,6 +14,7 @@ export default {
children: (pre => [ children: (pre => [
{ path: 'index', name: `${pre}index`, component: _import('demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } }, { path: 'index', name: `${pre}index`, component: _import('demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } },
{ path: 'html', name: `${pre}html`, component: _import('demo/frame/html'), meta: { ...meta, title: '静态 HTML' } }, { path: 'html', name: `${pre}html`, component: _import('demo/frame/html'), meta: { ...meta, title: '静态 HTML' } },
{ path: 'report', name: `${pre}report`, component: _import('demo/frame/report'), meta: { ...meta, title: 'Size report' } },
{ path: 'd2-doc', name: `${pre}d2-doc`, component: _import('demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } } { path: 'd2-doc', name: `${pre}d2-doc`, component: _import('demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
])('demo-frame-') ])('demo-frame-')
} }

View File

@ -0,0 +1,3 @@
<template>
<d2-container-frame :src="`${$baseUrl}report.html`"/>
</template>