index.axml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <view class='page-container-classname' ref='saveChildRef0'>
  2. <demo-block title='基础用法' padding=" " ref='saveChildRef1'>
  3. <van-row ref='saveChildRef2'>
  4. <van-image width='100' height='100' src='{{ src }}' ref='saveChildRef3'>
  5. </van-image>
  6. </van-row>
  7. </demo-block>
  8. <demo-block title='填充模式' padding=" " ref='saveChildRef4'>
  9. <van-row gutter='20' ref='saveChildRef5'>
  10. <van-col a:for='{{ fits }}' a:for-item='fit' a:key='{{*this}}' span='8' ref-numbers='{{ fits }}' ref='saveChildRef6'>
  11. <van-image fit='{{ fit }}' width='100%' height='27vw' src='{{ src }}' ref='saveChildRef7'>
  12. </van-image>
  13. <view class='text'>
  14. {{ fit }}
  15. </view>
  16. </van-col>
  17. </van-row>
  18. </demo-block>
  19. <demo-block title='圆形图片' padding=" " ref='saveChildRef8'>
  20. <van-row gutter='20' ref='saveChildRef9'>
  21. <van-col a:for='{{ fits }}' a:for-item='fit' a:key='{{*this}}' span='8' ref-numbers='{{ fits }}' ref='saveChildRef10'>
  22. <van-image round=" " fit='{{ fit }}' width='100%' height='27vw' src='{{ src }}' ref='saveChildRef11'>
  23. </van-image>
  24. <view class='text'>
  25. {{ fit }}
  26. </view>
  27. </van-col>
  28. </van-row>
  29. </demo-block>
  30. <demo-block title='加载中提示' padding=" " ref='saveChildRef12'>
  31. <van-row gutter='20' ref='saveChildRef13'>
  32. <van-col span='8' ref='saveChildRef14'>
  33. <van-image width='100%' height='27vw' ref='saveChildRef15'>
  34. </van-image>
  35. <view class='text'>
  36. 默认提示
  37. </view>
  38. </van-col>
  39. <van-col span='8' ref='saveChildRef16'>
  40. <van-image width='100%' height='27vw' use-loading-slot=" " ref='saveChildRef17'>
  41. <van-loading slot='loading' type='spinner' size='20' vertical=" " ref='saveChildRef18'>
  42. </van-loading>
  43. </van-image>
  44. <view class='text'>
  45. 自定义提示
  46. </view>
  47. </van-col>
  48. </van-row>
  49. </demo-block>
  50. <demo-block title='加载失败提示' padding=" " ref='saveChildRef19'>
  51. <van-row gutter='20' ref='saveChildRef20'>
  52. <van-col span='8' ref='saveChildRef21'>
  53. <van-image width='100%' height='27vw' src='x' ref='saveChildRef22'>
  54. </van-image>
  55. <view class='text'>
  56. 默认提示
  57. </view>
  58. </van-col>
  59. <van-col span='8' ref='saveChildRef23'>
  60. <van-image width='100%' height='27vw' src='x' use-error-slot=" " ref='saveChildRef24'>
  61. <text slot='error'>
  62. 加载失败 </text>
  63. </van-image> <view class='text'>
  64. 自定义提示
  65. </view>
  66. </van-col>
  67. </van-row>
  68. </demo-block>
  69. </view>