mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
[Doc] hide some demo in weapp (#3232)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</a>
|
||||
</van-nav-bar>
|
||||
<keep-alive>
|
||||
<router-view />
|
||||
<router-view :weapp="weapp" />
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
@@ -49,6 +49,10 @@ export default {
|
||||
|
||||
showNav() {
|
||||
return getQueryString('hide_nav') !== '1';
|
||||
},
|
||||
|
||||
weapp() {
|
||||
return getQueryString('weapp') === '1';
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -85,6 +85,7 @@ export function wrapper(promise, name) {
|
||||
component = component.default;
|
||||
name = 'demo-' + name;
|
||||
component.name = name;
|
||||
|
||||
const { i18n: config } = component;
|
||||
if (config) {
|
||||
const formattedI18n = {};
|
||||
@@ -94,6 +95,10 @@ export function wrapper(promise, name) {
|
||||
});
|
||||
Locale.add(formattedI18n);
|
||||
}
|
||||
|
||||
component.props = component.props || {};
|
||||
component.props.weapp = Boolean;
|
||||
|
||||
return component;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user