index.axml 1.5 KB

1234567891011121314151617181920212223242526272829
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基本用法' ref='saveChildRef1'>
  3. <van-search model:value='{{ value }}' placeholder='请输入搜索关键词' onSearch='onSearch' ref='saveChildRef2'>
  4. </van-search>
  5. </demo-block>
  6. <demo-block title='事件监听' ref='saveChildRef3'>
  7. <van-search model:value='{{ value }}' show-action=" " placeholder='请输入搜索关键词' onSearch='onSearch' onCancel='onCancel' onClear='onClear' ref='saveChildRef4'>
  8. </van-search>
  9. </demo-block>
  10. <demo-block title='搜索框内容对齐' ref='saveChildRef5'>
  11. <van-search model:value='{{ value }}' input-align='center' placeholder='请输入搜索关键词' ref='saveChildRef6'>
  12. </van-search>
  13. </demo-block>
  14. <demo-block title='禁用搜索框' ref='saveChildRef7'>
  15. <van-search disabled=" " model:value='{{ value }}' placeholder='请输入搜索关键词' ref='saveChildRef8'>
  16. </van-search>
  17. </demo-block>
  18. <demo-block title='自定义背景色' ref='saveChildRef9'>
  19. <van-search model:value='{{ value }}' shape='round' background='#4fc08d' placeholder='请输入搜索关键词' ref='saveChildRef10'>
  20. </van-search>
  21. </demo-block>
  22. <demo-block title='自定义按钮' ref='saveChildRef11'>
  23. <van-search model:value='{{ value }}' label='地址' shape='round' placeholder='请输入搜索关键词' use-action-slot=" " onSearch='onSearch' ref='saveChildRef12'>
  24. <view slot='action' onTap='antmoveAction' data-antmove-tap='onClick'>
  25. 搜索
  26. </view>
  27. </van-search>
  28. </demo-block>
  29. </view>