feat: update demo

This commit is contained in:
陈嘉涵 2019-08-28 14:10:32 +08:00
parent 2ca2f171d0
commit a7d6d6b222
2 changed files with 5 additions and 9 deletions

View File

@ -8,19 +8,16 @@ Page({
showCustomColor() { showCustomColor() {
Notify({ Notify({
message: '通知内容', message: '自定义颜色',
selector: '#custom-selector', color: '#ad0000',
background: '#1989fa', background: '#ffe1e1'
safeAreaInsetTop: true
}); });
}, },
showCustomDuration() { showCustomDuration() {
Notify({ Notify({
duration: 1000, duration: 1000,
message: '通知内容', message: '自定义时长'
selector: '#custom-selector',
safeAreaInsetTop: true
}); });
}, },

View File

@ -10,9 +10,8 @@
</demo-block> </demo-block>
<demo-block padding title="自定义通知"> <demo-block padding title="自定义通知">
<van-button type="primary" bind:click="showCustomColor">自定义颜色</van-button> <van-button type="primary" class="demo-margin-right" bind:click="showCustomColor">自定义颜色</van-button>
<van-button type="primary" bind:click="showCustomDuration">自定义时长</van-button> <van-button type="primary" bind:click="showCustomDuration">自定义时长</van-button>
</demo-block> </demo-block>
<van-notify id="van-notify" safe-area-inset-top /> <van-notify id="van-notify" safe-area-inset-top />
<van-notify id="custom-selector" />