diff --git a/packages/vant-cli/package.json b/packages/vant-cli/package.json index 211e226fb..631e3271a 100644 --- a/packages/vant-cli/package.json +++ b/packages/vant-cli/package.json @@ -54,7 +54,7 @@ "@babel/preset-env": "^7.7.7", "@babel/preset-typescript": "^7.7.7", "@nuxt/friendly-errors-webpack-plugin": "^2.5.0", - "@vant/eslint-config": "^1.5.1", + "@vant/eslint-config": "^2.0.0", "@vant/markdown-loader": "^2.3.0", "@vant/markdown-vetur": "^1.1.0", "@vant/stylelint-config": "^1.1.0", diff --git a/packages/vant-cli/site/common/iframe-router.js b/packages/vant-cli/site/common/iframe-router.js index 8f426e611..703beec2b 100644 --- a/packages/vant-cli/site/common/iframe-router.js +++ b/packages/vant-cli/site/common/iframe-router.js @@ -4,7 +4,7 @@ import { iframeReady, isMobile } from '.'; -window.syncPath = function () { +window.syncPath = function() { const router = window.vueRouter; const isInIframe = window !== window.top; const currentDir = router.history.current.path; @@ -21,7 +21,7 @@ window.syncPath = function () { } }; -window.replacePath = function (path = '') { +window.replacePath = function(path = '') { // should preserve hash for anchor if (window.vueRouter.currentRoute.path !== path) { window.vueRouter.replace(path).catch(() => {}); diff --git a/packages/vant-cli/site/common/index.js b/packages/vant-cli/site/common/index.js index a118e1802..38d345ea8 100644 --- a/packages/vant-cli/site/common/index.js +++ b/packages/vant-cli/site/common/index.js @@ -27,7 +27,4 @@ export function decamelize(str, sep = '-') { .toLowerCase(); } -export { - isMobile, - iframeReady -}; +export { isMobile, iframeReady }; diff --git a/packages/vant-cli/site/common/style/var.less b/packages/vant-cli/site/common/style/var.less index 6ae0506ae..ac642ce4c 100644 --- a/packages/vant-cli/site/common/style/var.less +++ b/packages/vant-cli/site/common/style/var.less @@ -4,7 +4,7 @@ @van-doc-fuchsia: #a7419e; @van-doc-green: #4fc08d; @van-doc-text-color: #34495e; -@van-doc-text-light-blue: rgba(69, 90, 100, .6); +@van-doc-text-light-blue: rgba(69, 90, 100, 0.6); @van-doc-background-color: #f7f8fa; @van-doc-grey: #999; @van-doc-dark-grey: #666; diff --git a/packages/vant-cli/site/desktop/App.vue b/packages/vant-cli/site/desktop/App.vue index b50c19985..b633671c8 100644 --- a/packages/vant-cli/site/desktop/App.vue +++ b/packages/vant-cli/site/desktop/App.vue @@ -19,7 +19,7 @@ import { setLang } from '../common/locales'; export default { components: { - VanDoc + VanDoc, }, data() { @@ -27,7 +27,7 @@ export default { return { packageVersion, - simulator: `${path}mobile.html${location.hash}` + simulator: `${path}mobile.html${location.hash}`, }; }, @@ -41,7 +41,7 @@ export default { const { locales = {} } = config.site; return Object.keys(locales).map(key => ({ lang: key, - label: locales[key].langLabel || '' + label: locales[key].langLabel || '', })); }, @@ -61,14 +61,14 @@ export default { } return null; - } + }, }, watch: { lang(val) { setLang(val); this.setTitle(); - } + }, }, created() { @@ -84,8 +84,8 @@ export default { } document.title = title; - } - } + }, + }, }; diff --git a/packages/vant-cli/site/desktop/components/Container.vue b/packages/vant-cli/site/desktop/components/Container.vue index 86313a5ef..7ed8d7e0f 100644 --- a/packages/vant-cli/site/desktop/components/Container.vue +++ b/packages/vant-cli/site/desktop/components/Container.vue @@ -12,8 +12,8 @@ export default { name: 'van-doc-container', props: { - hasSimulator: Boolean - } + hasSimulator: Boolean, + }, }; diff --git a/packages/vant-cli/site/desktop/components/Content.vue b/packages/vant-cli/site/desktop/components/Content.vue index 9d961cf3c..9ddbc2ad0 100644 --- a/packages/vant-cli/site/desktop/components/Content.vue +++ b/packages/vant-cli/site/desktop/components/Content.vue @@ -15,8 +15,8 @@ export default { return path.split('/').slice(-1)[0]; } return this.$route.name; - } - } + }, + }, }; diff --git a/packages/vant-cli/site/desktop/components/Header.vue b/packages/vant-cli/site/desktop/components/Header.vue index e0739e550..7bdea680e 100644 --- a/packages/vant-cli/site/desktop/components/Header.vue +++ b/packages/vant-cli/site/desktop/components/Header.vue @@ -3,21 +3,36 @@