tag.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">标签</block></cu-custom>
  4. <view class="cu-bar bg-white solid-bottom">
  5. <view class='action'>
  6. <text class='cuIcon-title text-blue'></text>标签形状
  7. </view>
  8. </view>
  9. <view class="padding bg-white solid-bottom">
  10. <view class='cu-tag'>默认</view>
  11. <view class='cu-tag round'>椭圆</view>
  12. <view class='cu-tag radius'>圆角</view>
  13. </view>
  14. <view class="cu-bar bg-white margin-top">
  15. <view class='action'>
  16. <text class='cuIcon-title text-blue'></text>标签尺寸
  17. </view>
  18. </view>
  19. <view class="padding bg-white">
  20. <view class='cu-tag radius sm'>小尺寸</view>
  21. <view class='cu-tag radius'>普通尺寸</view>
  22. </view>
  23. <view class="cu-bar bg-white margin-top">
  24. <view class='action'>
  25. <text class='cuIcon-title text-blue'></text>标签颜色
  26. </view>
  27. </view>
  28. <view class='padding-sm flex flex-wrap'>
  29. <view class="padding-xs" v-for="(item,index) in ColorList" :key="index" v-if="item.name!='gray'">
  30. <view class='cu-tag' :class="'bg-' + item.name">{{item.title}}</view>
  31. </view>
  32. <view class="padding-xs" v-for="(item,index) in ColorList" :key="index" v-if="item.name!='gray' && item.name!='black' && item.name!='white'">
  33. <view class='cu-tag light' :class="'bg-' + item.name">{{item.title}}</view>
  34. </view>
  35. </view>
  36. <view class="cu-bar bg-white margin-top">
  37. <view class='action'>
  38. <text class='cuIcon-title text-blue'></text>镂空标签
  39. </view>
  40. </view>
  41. <view class='padding-sm flex flex-wrap'>
  42. <view class="padding-xs" v-for="(item,index) in ColorList" :key="index" v-if="item.name!='white'">
  43. <view class='cu-tag' :class="'line-' + item.name">{{item.title}}</view>
  44. </view>
  45. </view>
  46. <view class="cu-bar bg-white margin-top">
  47. <view class='action'>
  48. <text class='cuIcon-title text-blue'></text>胶囊样式
  49. </view>
  50. </view>
  51. <view class="padding">
  52. <view class="cu-capsule">
  53. <view class='cu-tag bg-red'>
  54. <text class='cuIcon-likefill'></text>
  55. </view>
  56. <view class="cu-tag line-red">
  57. 12
  58. </view>
  59. </view>
  60. <view class="cu-capsule round">
  61. <view class='cu-tag bg-blue '>
  62. <text class='cuIcon-likefill'></text>
  63. </view>
  64. <view class="cu-tag line-blue">
  65. 23
  66. </view>
  67. </view>
  68. <view class="cu-capsule round">
  69. <view class='cu-tag bg-blue '>
  70. 说明
  71. </view>
  72. <view class="cu-tag line-blue">
  73. 123
  74. </view>
  75. </view>
  76. <view class="cu-capsule radius">
  77. <view class='cu-tag bg-grey '>
  78. <text class='cuIcon-likefill'></text>
  79. </view>
  80. <view class="cu-tag line-grey">
  81. 23
  82. </view>
  83. </view>
  84. <view class="cu-capsule radius">
  85. <view class='cu-tag bg-brown sm'>
  86. <text class='cuIcon-likefill'></text>
  87. </view>
  88. <view class="cu-tag line-brown sm">
  89. 23
  90. </view>
  91. </view>
  92. </view>
  93. <view class="cu-bar bg-white margin-top">
  94. <view class='action'>
  95. <text class='cuIcon-title text-blue'></text>数字标签
  96. </view>
  97. </view>
  98. <view class="padding flex justify-between align-center">
  99. <view class='cu-avatar xl radius'>
  100. <view class="cu-tag badge">99+</view>
  101. </view>
  102. <view class='cu-avatar xl radius' style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg)">
  103. <view class='cu-tag badge'>9</view>
  104. </view>
  105. <view class='cu-avatar xl radius'>
  106. <view class='cu-tag badge'>99</view>
  107. <text class='cuIcon-people'></text>
  108. </view>
  109. <view class='cu-avatar xl radius'>
  110. <view class='cu-tag badge'>99+</view>
  111. </view>
  112. </view>
  113. </view>
  114. </template>
  115. <script>
  116. export default {
  117. data() {
  118. return {
  119. ColorList: this.ColorList,
  120. };
  121. }
  122. }
  123. </script>
  124. <style>
  125. </style>