avatar.wxml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <custom style="height:{{CustomBar}}px;">
  2. <bar class="fixed gradual-blue" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
  3. <navigator class='action' open-type="navigateBack" delta="1" hover-class="none">
  4. <text class='icon-back'></text> 头像
  5. </navigator>
  6. </bar>
  7. </custom>
  8. <bar>
  9. <view class='action'>
  10. <text class='icon-title text-blue'></text>头像形状
  11. </view>
  12. </bar>
  13. <view class="padding">
  14. <avatar class="round" style="background-image:url(https://image.weilanwl.com/img/square-1.jpg);"></avatar>
  15. <avatar class="radius margin-left" style="background-image:url(https://image.weilanwl.com/img/square-2.jpg);"></avatar>
  16. </view>
  17. <bar class="margin-top">
  18. <view class='action'>
  19. <text class='icon-title text-blue'></text>头像尺寸
  20. </view>
  21. </bar>
  22. <view class="padding">
  23. <avatar class="sm round margin-left" style="background-image:url(https://image.weilanwl.com/img/square-1.jpg);"></avatar>
  24. <avatar class="round margin-left" style="background-image:url(https://image.weilanwl.com/img/square-2.jpg);"></avatar>
  25. <avatar class="lg round margin-left" style="background-image:url(https://image.weilanwl.com/img/square-3.jpg);"></avatar>
  26. <avatar class="xl round margin-left" style="background-image:url(https://image.weilanwl.com/img/square-4.jpg);"></avatar>
  27. </view>
  28. <bar class="margin-top">
  29. <view class='action'>
  30. <text class='icon-title text-blue'></text>内嵌文字(图标)
  31. </view>
  32. </bar>
  33. <view class="padding">
  34. <avatar class="radius">
  35. <text class='icon-people'></text>
  36. </avatar>
  37. <avatar class="radius margin-left">
  38. <text>港</text>
  39. </avatar>
  40. </view>
  41. <bar class="margin-top">
  42. <view class='action'>
  43. <text class='icon-title text-blue'></text>头像颜色
  44. </view>
  45. </bar>
  46. <view class="padding-sm">
  47. <avatar class="round lg bg-{{item.name}} margin-xs" wx:for="{{ColorList}}" wx:key>
  48. <text>{{item.name}}</text>
  49. </avatar>
  50. </view>
  51. <bar class="margin-top">
  52. <view class='action'>
  53. <text class='icon-title text-blue'></text>头像组
  54. </view>
  55. </bar>
  56. <view class='padding'>
  57. <avatar-group>
  58. <avatar class="round lg" wx:for="{{4}}" wx:key style="background-image:url(https://image.weilanwl.com/img/square-{{index+1}}.jpg);"></avatar>
  59. </avatar-group>
  60. </view>
  61. <bar class="margin-top">
  62. <view class='action'>
  63. <text class='icon-title text-blue'></text>头像标签
  64. </view>
  65. </bar>
  66. <view class='padding'>
  67. <avatar class="round lg margin-left" wx:for="{{4}}" wx:key style="background-image:url(https://image.weilanwl.com/img/square-{{index+1}}.jpg);">
  68. <tag class="badge {{index%2==0?'icon-female bg-pink':'icon-male bg-blue'}}"></tag>
  69. </avatar>
  70. </view>