index.wxml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <view class="demo">
  2. <h2>基础用法</h2>
  3. <nut-cell>
  4. <nut-button type="primary" bindtap='onClickShow' >显示遮罩层</nut-button>
  5. </nut-cell>
  6. <nut-overlay show='{{ show }}' bind:click="onClickHide"></nut-overlay>
  7. <h2>遮罩样式</h2>
  8. <nut-cell>
  9. <nut-button type="primary" bindtap='onClicStyleShow' >遮罩样式</nut-button>
  10. </nut-cell>
  11. <nut-overlay show='{{ styleShow }}' bind:click="onClicStyleHide" overlay-style="background: rgba(0, 0, 0, .2)"></nut-overlay>
  12. <h2>设置动画时间</h2>
  13. <nut-cell>
  14. <nut-button type="primary" bindtap='onClickTimeShow' >设置动画时间</nut-button>
  15. </nut-cell>
  16. <nut-overlay show='{{ timeShow }}' bind:click="onClickTimeHide" duration='1000'></nut-overlay>
  17. <h2>嵌套内容</h2>
  18. <nut-cell>
  19. <nut-button type="primary" bindtap='onClickContentShow' >嵌入内容</nut-button>
  20. </nut-cell>
  21. <nut-overlay show='{{ contentShow }}' bind:click="onClickContentHide" custom-class='deno'>
  22. <view class='block'></view>
  23. </nut-overlay>
  24. </view>