mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-27 20:06:36 +08:00
docs(Sticky): hide container demo in weapp
This commit is contained in:
parent
b5b7ad7482
commit
075edbfd4b
@ -2,38 +2,20 @@
|
|||||||
<demo-section>
|
<demo-section>
|
||||||
<demo-block :title="$t('basicUsage')">
|
<demo-block :title="$t('basicUsage')">
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<van-button
|
<van-button type="primary" style="margin-left: 15px;">{{ $t('basicUsage') }}</van-button>
|
||||||
type="primary"
|
|
||||||
style="margin-left: 15px;"
|
|
||||||
>
|
|
||||||
{{ $t('basicUsage') }}
|
|
||||||
</van-button>
|
|
||||||
</van-sticky>
|
</van-sticky>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
<demo-block :title="$t('offsetTop')">
|
<demo-block :title="$t('offsetTop')">
|
||||||
<van-sticky :offset-top="50">
|
<van-sticky :offset-top="50">
|
||||||
<van-button
|
<van-button type="info" style="margin-left: 115px;">{{ $t('offsetTop') }}</van-button>
|
||||||
type="info"
|
|
||||||
style="margin-left: 115px;"
|
|
||||||
>
|
|
||||||
{{ $t('offsetTop') }}
|
|
||||||
</van-button>
|
|
||||||
</van-sticky>
|
</van-sticky>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
<demo-block :title="$t('setContainer')">
|
<demo-block v-if="!$attrs.weapp" :title="$t('setContainer')">
|
||||||
<div
|
<div ref="container" style="height: 150px; background-color: #fff;">
|
||||||
ref="container"
|
|
||||||
style="height: 150px; background-color: #fff;"
|
|
||||||
>
|
|
||||||
<van-sticky :container="container">
|
<van-sticky :container="container">
|
||||||
<van-button
|
<van-button type="warning" style="margin-left: 215px;">{{ $t('setContainer') }}</van-button>
|
||||||
type="warning"
|
|
||||||
style="margin-left: 215px;"
|
|
||||||
>
|
|
||||||
{{ $t('setContainer') }}
|
|
||||||
</van-button>
|
|
||||||
</van-sticky>
|
</van-sticky>
|
||||||
</div>
|
</div>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
@ -66,7 +48,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import "../../style/var";
|
@import '../../style/var';
|
||||||
|
|
||||||
.demo-sticky {
|
.demo-sticky {
|
||||||
height: 200vh;
|
height: 200vh;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user