mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs
This commit is contained in:
parent
481f46e41f
commit
eccbd2269c
@ -5,7 +5,7 @@ var path = require('path');
|
|||||||
var cheerio = require('cheerio');
|
var cheerio = require('cheerio');
|
||||||
var chalk = require('chalk');
|
var chalk = require('chalk');
|
||||||
var striptags = require('./strip-tags');
|
var striptags = require('./strip-tags');
|
||||||
var navs = require('../docs/nav.config.json');
|
var navs = require('../docs/src/nav.config.js');
|
||||||
navs = navs['zh-CN'];
|
navs = navs['zh-CN'];
|
||||||
|
|
||||||
var parser = markdownIt('default', {
|
var parser = markdownIt('default', {
|
||||||
@ -31,9 +31,9 @@ var renderVueTemplate = function (html, componentName) {
|
|||||||
|
|
||||||
var script = '';
|
var script = '';
|
||||||
if (output.script) {
|
if (output.script) {
|
||||||
script = output.script.replace('<script>', '<script>\nimport Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);');
|
script = output.script.replace('<script>', '<script>\nimport Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);');
|
||||||
} else {
|
} else {
|
||||||
script = '<script>\nimport Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>';
|
script = '<script>\nimport Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
result = `<template><section class="demo-${componentName}"><h1 class="demo-title">${componentName}</h1>` + output['example-block'] + '</section></template>\n' +
|
result = `<template><section class="demo-${componentName}"><h1 class="demo-title">${componentName}</h1>` + output['example-block'] + '</section></template>\n' +
|
||||||
|
@ -35,8 +35,8 @@ function wrap(render) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
'vendor': ['vue', 'vue-router'],
|
'vendor': ['vue', 'vue-router'],
|
||||||
'zan-docs': './docs/index.js',
|
'zan-docs': './docs/src/index.js',
|
||||||
'zan-examples': './docs/examples.js'
|
'zan-examples': './docs/src/examples.js'
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, '../docs/dist'),
|
path: path.join(__dirname, '../docs/dist'),
|
||||||
@ -55,7 +55,7 @@ module.exports = {
|
|||||||
'src': path.join(__dirname, '../src'),
|
'src': path.join(__dirname, '../src'),
|
||||||
'packages': path.join(__dirname, '../packages'),
|
'packages': path.join(__dirname, '../packages'),
|
||||||
'lib': path.join(__dirname, '../lib'),
|
'lib': path.join(__dirname, '../lib'),
|
||||||
'components': path.join(__dirname, '../docs/components')
|
'components': path.join(__dirname, '../docs/src/components')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
@ -150,13 +150,13 @@ module.exports = {
|
|||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
chunks: ['vendor', 'zan-docs'],
|
chunks: ['vendor', 'zan-docs'],
|
||||||
template: 'docs/index.tpl',
|
template: 'docs/src/index.tpl',
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
inject: true
|
inject: true
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
chunks: ['vendor', 'zan-examples'],
|
chunks: ['vendor', 'zan-examples'],
|
||||||
template: 'docs/index.tpl',
|
template: 'docs/src/index.tpl',
|
||||||
filename: 'examples.html',
|
filename: 'examples.html',
|
||||||
inject: true
|
inject: true
|
||||||
}),
|
}),
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import MobileComputed from 'components/mobile-computed';
|
import MobileComputed from 'components/mobile-computed';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -86,4 +86,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -20,4 +20,4 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -36,7 +36,7 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleClick() {
|
handleClick() {
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import { Dialog } from 'src/index';
|
import { Dialog } from 'src/index';
|
||||||
import MobileComputed from 'components/mobile-computed';
|
import MobileComputed from 'components/mobile-computed';
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -143,4 +143,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -14,7 +14,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import { ImagePreview } from 'src/index';
|
import { ImagePreview } from 'src/index';
|
||||||
import MobileComputed from 'components/mobile-computed';
|
import MobileComputed from 'components/mobile-computed';
|
||||||
|
|
||||||
|
@ -68,4 +68,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -46,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -33,4 +33,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -62,4 +62,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -11,7 +11,7 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
const citys = {
|
const citys = {
|
||||||
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
'浙江': ['杭州', '宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '衢州', '舟山', '台州', '丽水'],
|
||||||
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
'福建': ['福州', '厦门', '莆田', '三明', '泉州', '漳州', '南平', '龙岩', '宁德'],
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import MobileComputed from 'components/mobile-computed';
|
import MobileComputed from 'components/mobile-computed';
|
||||||
import Dialog from 'packages/dialog';
|
import Dialog from 'packages/dialog';
|
||||||
|
|
||||||
|
@ -43,4 +43,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</example-block></section></template>
|
</example-block></section></template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
goSearch(value) {
|
goSearch(value) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import Dialog from 'packages/dialog';
|
import Dialog from 'packages/dialog';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -37,4 +37,4 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
import { Toast } from 'src/index';
|
import { Toast } from 'src/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
logContent(file) {
|
logContent(file) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);
|
import Vue from "vue";import ExampleBlock from "components/example-block";Vue.component("example-block", ExampleBlock);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -15,8 +15,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Vue from 'vue';
|
||||||
import 'highlight.js/styles/color-brewer.css';
|
import 'highlight.js/styles/color-brewer.css';
|
||||||
import navConfig from './nav.config.json';
|
import navConfig from './nav.config.js';
|
||||||
|
import SideNav from './components/side-nav';
|
||||||
|
import DemoBlock from './components/demo-block';
|
||||||
|
import FooterNav from './components/footer-nav';
|
||||||
|
import PageHeader from './components/page-header';
|
||||||
|
import PageFooter from './components/page-footer';
|
||||||
|
|
||||||
|
Vue.component('side-nav', SideNav);
|
||||||
|
Vue.component('demo-block', DemoBlock);
|
||||||
|
Vue.component('footer-nav', FooterNav);
|
||||||
|
Vue.component('page-header', PageHeader);
|
||||||
|
Vue.component('page-footer', PageFooter);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -28,5 +40,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="css">
|
<style lang="css">
|
||||||
@import './assets/docs.css';
|
@import '../assets/docs.css';
|
||||||
</style>
|
</style>
|
@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navConfig from '../nav.config.json';
|
import navConfig from '../nav.config.js';
|
||||||
import MobileNav from './mobile-nav';
|
import MobileNav from './mobile-nav';
|
||||||
|
|
||||||
export default {
|
export default {
|
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navConfig from '../nav.config.json';
|
import navConfig from '../nav.config.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
@ -1,4 +1,4 @@
|
|||||||
import MobilePopup from 'components/mobile-popup.vue';
|
import MobilePopup from './mobile-popup.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
@ -25,7 +25,7 @@
|
|||||||
<a href="http://zanui.qima-inc.com/captain" class="page-header__link">业务组件</a>
|
<a href="http://zanui.qima-inc.com/captain" class="page-header__link">业务组件</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="page-header__item">
|
<li class="page-header__item">
|
||||||
<span class="page-header__link">V1.0</span>
|
<span class="page-header__link">V{{ version }}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="page-header__item">
|
<li class="page-header__item">
|
||||||
<a href="#" class="page-header__github" target="_blank"></a>
|
<a href="#" class="page-header__github" target="_blank"></a>
|
||||||
@ -34,6 +34,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
version: window._global.version
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@component-namespace page {
|
@component-namespace page {
|
||||||
@b header {
|
@b header {
|
@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './ExamplesApp';
|
import App from './ExamplesApp';
|
||||||
import navConfig from './nav.config.json';
|
import navConfig from './nav.config.js';
|
||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import ZanUI from '../src/index';
|
import ZanUI from '../src/index';
|
||||||
|
|
@ -1,14 +1,15 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
import App from './ExamplesDocsApp';
|
import App from './ExamplesDocsApp';
|
||||||
import navConfig from './nav.config.json';
|
import navConfig from './nav.config.js';
|
||||||
import routes from './router.config';
|
import routes from './router.config';
|
||||||
import SideNav from './components/side-nav';
|
|
||||||
import DemoBlock from './components/demo-block';
|
|
||||||
import FooterNav from './components/footer-nav';
|
|
||||||
import PageHeader from './components/page-header';
|
|
||||||
import PageFooter from './components/page-footer';
|
|
||||||
import ZanUI from 'src/index.js';
|
import ZanUI from 'src/index.js';
|
||||||
|
import packagesJson from 'zanui/package.json';
|
||||||
|
|
||||||
|
const global = {
|
||||||
|
version: packagesJson.version
|
||||||
|
};
|
||||||
|
window._global = global;
|
||||||
|
|
||||||
import 'packages/zanui-css/src/index.css';
|
import 'packages/zanui-css/src/index.css';
|
||||||
|
|
||||||
@ -23,11 +24,7 @@ Vue.use(ZanUI);
|
|||||||
Vue.use(ZanUI.Lazyload, {
|
Vue.use(ZanUI.Lazyload, {
|
||||||
lazyComponent: true
|
lazyComponent: true
|
||||||
});
|
});
|
||||||
Vue.component('side-nav', SideNav);
|
|
||||||
Vue.component('demo-block', DemoBlock);
|
|
||||||
Vue.component('footer-nav', FooterNav);
|
|
||||||
Vue.component('page-header', PageHeader);
|
|
||||||
Vue.component('page-footer', PageFooter);
|
|
||||||
|
|
||||||
let routesConfig = routes(navConfig);
|
let routesConfig = routes(navConfig);
|
||||||
routesConfig.push({
|
routesConfig.push({
|
@ -1,4 +1,4 @@
|
|||||||
{
|
module.exports = {
|
||||||
"zh-CN": [
|
"zh-CN": [
|
||||||
{
|
{
|
||||||
"name": "开发指南",
|
"name": "开发指南",
|
@ -23,8 +23,8 @@ const registerRoute = (navConfig, isExample) => {
|
|||||||
|
|
||||||
function addRoute(page) {
|
function addRoute(page) {
|
||||||
const component = isExample
|
const component = isExample
|
||||||
? require(`./examples-dist${page.path}.vue`)
|
? require(`../examples-dist${page.path}.vue`)
|
||||||
: require(`./examples-docs${page.path}.md`);
|
: require(`../examples-docs${page.path}.md`);
|
||||||
route.push({
|
route.push({
|
||||||
path: '/component' + page.path,
|
path: '/component' + page.path,
|
||||||
component: component.default || component
|
component: component.default || component
|
Loading…
x
Reference in New Issue
Block a user