mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
fix example
This commit is contained in:
parent
7b729f3d15
commit
f089a405a3
@ -81,6 +81,7 @@ for (var item in Components) {
|
|||||||
|
|
||||||
var exampleVueName = `${docsDir}/examples-dist/${item}.vue`;
|
var exampleVueName = `${docsDir}/examples-dist/${item}.vue`;
|
||||||
|
|
||||||
|
// 新建一个文件
|
||||||
if (!fs.existsSync(exampleVueName)) {
|
if (!fs.existsSync(exampleVueName)) {
|
||||||
fs.closeSync(fs.openSync(exampleVueName, 'w'));
|
fs.closeSync(fs.openSync(exampleVueName, 'w'));
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,10 @@ const registerRoute = (navConfig, isExample) => {
|
|||||||
let route = [];
|
let route = [];
|
||||||
let navs = navConfig['zh-CN'];
|
let navs = navConfig['zh-CN'];
|
||||||
navs.forEach(nav => {
|
navs.forEach(nav => {
|
||||||
|
if (isExample && !nav.showInMobile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (nav.groups) {
|
if (nav.groups) {
|
||||||
nav.groups.forEach(group => {
|
nav.groups.forEach(group => {
|
||||||
group.list.forEach(nav => {
|
group.list.forEach(nav => {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js",
|
"deploy:docs": "rimraf docs/dist && npm run build:example && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js",
|
||||||
"dist": "npm run clean && npm run build:file && npm run lint && npm run build:zanui && npm run build:components && npm run build:utils && npm run build:zanui-css",
|
"dist": "npm run clean && npm run build:file && npm run lint && npm run build:zanui && npm run build:components && npm run build:utils && npm run build:zanui-css",
|
||||||
"clean": "rimraf lib && rimraf packages/*/lib",
|
"clean": "rimraf lib && rimraf packages/*/lib",
|
||||||
"lint": "eslint src/**/*.js packages/**/*.{js,vue} --quiet",
|
"lint": "eslint src/**/*.js packages/**/*.{js,vue} build/**/*.js --quiet",
|
||||||
"test": "karma start test/unit/karma.conf.js --single-run; npm run coverage",
|
"test": "karma start test/unit/karma.conf.js --single-run; npm run coverage",
|
||||||
"test:watch": "karma start test/unit/karma.conf.js",
|
"test:watch": "karma start test/unit/karma.conf.js",
|
||||||
"coverage": "find test/unit/coverage/lcov-report -name 'index.html' | sed -n 1,1p | xargs -I {} open {} ",
|
"coverage": "find test/unit/coverage/lcov-report -name 'index.html' | sed -n 1,1p | xargs -I {} open {} ",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user