diff --git a/docs/site/mobile.js b/docs/site/mobile.js index 0efee2043..ad0bb8c58 100644 --- a/docs/site/mobile.js +++ b/docs/site/mobile.js @@ -13,6 +13,9 @@ Locale.add({ 'en-US': enUS }); +// flag for vant-weapp demos +const isWeapp = location.search.indexOf('weapp=1') !== -1; + // helper for demo locales Vue.mixin({ computed: { @@ -26,6 +29,10 @@ Vue.mixin({ const message = get(messages, prefix + path) || get(messages, path); return typeof message === 'function' ? message(...args) : message; }; + }, + + isWeapp() { + return isWeapp; } }, @@ -45,6 +52,7 @@ Vue.mixin({ } }); +// switch lang after routing if (window.vueRouter) { window.vueRouter.afterEach(to => { const { lang } = to.meta || {}; diff --git a/src/cell/demo/index.vue b/src/cell/demo/index.vue index 27ed37213..04ff5c10a 100644 --- a/src/cell/demo/index.vue +++ b/src/cell/demo/index.vue @@ -16,7 +16,7 @@ - + diff --git a/src/checkbox/demo/index.vue b/src/checkbox/demo/index.vue index e8bd035d3..df0c507a3 100644 --- a/src/checkbox/demo/index.vue +++ b/src/checkbox/demo/index.vue @@ -62,7 +62,7 @@ - + {{ $t('checkbox') }} a {{ $t('checkbox') }} b diff --git a/src/col/demo/index.vue b/src/col/demo/index.vue index b19975fc1..3a9d717d2 100644 --- a/src/col/demo/index.vue +++ b/src/col/demo/index.vue @@ -36,7 +36,7 @@ diff --git a/src/field/demo/index.vue b/src/field/demo/index.vue index d4ffc5856..b28eed3bb 100644 --- a/src/field/demo/index.vue +++ b/src/field/demo/index.vue @@ -87,7 +87,7 @@ - + - + diff --git a/src/progress/demo/index.vue b/src/progress/demo/index.vue index a1be706e2..c15a0d308 100644 --- a/src/progress/demo/index.vue +++ b/src/progress/demo/index.vue @@ -4,7 +4,7 @@ - + diff --git a/src/slider/demo/index.vue b/src/slider/demo/index.vue index 0f275a82c..4aab472c5 100644 --- a/src/slider/demo/index.vue +++ b/src/slider/demo/index.vue @@ -51,7 +51,7 @@ - +
- +
{{ $t('setContainer') }} diff --git a/src/tab/demo/index.vue b/src/tab/demo/index.vue index efb500449..be67a3a84 100644 --- a/src/tab/demo/index.vue +++ b/src/tab/demo/index.vue @@ -67,7 +67,7 @@ - +