switch.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <view class="container">
  3. <tui-swipe-action :actions="actions">
  4. <template v-slot:content>
  5. <tui-list-view>
  6. <tui-list-cell last="true">
  7. <view class="tui-item-box">
  8. <image src="/static/images/my/thorui.png" class="tui-logo" mode="widthFix"></image>
  9. <text class="tui-list-cell_name">陕西凤翔-余姓家族</text>
  10. </view>
  11. </tui-list-cell>
  12. </tui-list-view>
  13. </template>
  14. </tui-swipe-action>
  15. <tui-swipe-action :actions="actions">
  16. <template v-slot:content>
  17. <tui-list-view>
  18. <tui-list-cell last="true">
  19. <view class="tui-item-box">
  20. <image src="/static/images/my/thorui.png" class="tui-logo" mode="widthFix"></image>
  21. <text class="tui-list-cell_name">广西桂林-余姓家族</text>
  22. </view>
  23. </tui-list-cell>
  24. </tui-list-view>
  25. </template>
  26. </tui-swipe-action>
  27. <tui-swipe-action :actions="actions">
  28. <template v-slot:content>
  29. <tui-list-view>
  30. <tui-list-cell last="true">
  31. <view class="tui-item-box">
  32. <image src="/static/images/my/thorui.png" class="tui-logo" mode="widthFix"></image>
  33. <text class="tui-list-cell_name">广东广州-余姓家族</text>
  34. </view>
  35. </tui-list-cell>
  36. </tui-list-view>
  37. </template>
  38. </tui-swipe-action>
  39. <tui-list-view>
  40. <tui-list-cell :arrow="true" last="true">
  41. <view class="tui-item-box">
  42. <image src="../../../static/images/mall/my/icon_addr_edit.png" class="tui-logo" mode="widthFix"></image>
  43. <text class="tui-list-cell_name">添加或创建家族</text>
  44. </view>
  45. </tui-list-cell>
  46. </tui-list-view>
  47. </view>
  48. </template>
  49. <script>
  50. import tuiSwipeAction from "@/components/thorui/tui-swipe-action/tui-swipe-action"
  51. import tuiIcon from "@/components/thorui/tui-icon/tui-icon"
  52. import tuiListView from "@/components/thorui/tui-list-view/tui-list-view"
  53. import tuiListCell from "@/components/thorui/tui-list-cell/tui-list-cell"
  54. export default {
  55. components: {
  56. tuiSwipeAction,
  57. tuiIcon,
  58. tuiListView,
  59. tuiListCell
  60. },
  61. data() {
  62. return {
  63. actions: [
  64. {
  65. name: '删除',
  66. color: '#fff',
  67. fontsize: 30, //单位rpx
  68. width: 70, //单位px
  69. background: '#FD3B31'
  70. }
  71. ],
  72. open:false
  73. };
  74. },
  75. methods: {
  76. switchChange: function(e) {
  77. this.open = e.target.value;
  78. }
  79. }
  80. };
  81. </script>
  82. <style>
  83. .container {
  84. width: 100%;
  85. padding-bottom: 120rpx;
  86. }
  87. .header {
  88. padding: 80rpx 90rpx 60rpx 90rpx;
  89. box-sizing: border-box;
  90. }
  91. .title {
  92. font-size: 34rpx;
  93. color: #333;
  94. font-weight: 500;
  95. }
  96. .sub-title {
  97. font-size: 24rpx;
  98. color: #7a7a7a;
  99. padding-top: 18rpx;
  100. }
  101. .tui-list-item {
  102. padding: 40rpx 30rpx;
  103. display: flex;
  104. align-items: item;
  105. }
  106. .tui-title {
  107. width: 100%;
  108. padding: 50rpx 30rpx 30rpx;
  109. box-sizing: border-box;
  110. font-size: 32rpx;
  111. font-weight: bold;
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-between;
  115. }
  116. .tui-switch {
  117. transform: scale(0.8);
  118. transform-origin: 100% center;
  119. }
  120. .tui-custom-btn_box {
  121. width: 140px;
  122. height: 100%;
  123. padding: 0 20rpx;
  124. box-sizing: border-box;
  125. display: flex;
  126. align-items: center;
  127. justify-content: center;
  128. background-color: #fafafa;
  129. }
  130. .tui-custom-btn {
  131. width: 100rpx;
  132. height: 100rpx;
  133. border-radius: 50%;
  134. background-color: #fff;
  135. color: #333;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. flex-shrink: 0;
  140. }
  141. .tui-custom-mr {
  142. margin-right: 20rpx;
  143. }
  144. .container {
  145. padding-bottom: env(safe-area-inset-bottom);
  146. }
  147. .tui-item-box {
  148. width: 100%;
  149. display: flex;
  150. align-items: center;
  151. }
  152. .tui-list-cell_name {
  153. padding-left: 20rpx;
  154. display: flex;
  155. align-items: center;
  156. justify-content: center;
  157. }
  158. .tui-ml-auto {
  159. margin-left: auto;
  160. }
  161. .tui-right {
  162. margin-left: auto;
  163. margin-right: 34rpx;
  164. font-size: 26rpx;
  165. color: #999;
  166. }
  167. .tui-logo {
  168. height: 52rpx;
  169. width: 52rpx;
  170. flex-shrink: 0;
  171. }
  172. .tui-flex {
  173. display: flex;
  174. align-items: center;
  175. }
  176. .tui-msg-box {
  177. display: flex;
  178. align-items: center;
  179. }
  180. .tui-msg-pic {
  181. width: 100rpx;
  182. height: 100rpx;
  183. border-radius: 50%;
  184. display: block;
  185. margin-right: 24rpx;
  186. flex-shrink: 0;
  187. }
  188. .tui-msg-item {
  189. max-width: 500rpx;
  190. min-height: 80rpx;
  191. overflow: hidden;
  192. display: flex;
  193. flex-direction: column;
  194. justify-content: space-between;
  195. }
  196. .tui-msg-name {
  197. overflow: hidden;
  198. white-space: nowrap;
  199. text-overflow: ellipsis;
  200. font-size: 34rpx;
  201. line-height: 1;
  202. color: #262b3a;
  203. }
  204. .tui-msg-content {
  205. overflow: hidden;
  206. white-space: nowrap;
  207. text-overflow: ellipsis;
  208. font-size: 26rpx;
  209. line-height: 1;
  210. color: #9397a4;
  211. }
  212. .tui-msg-right {
  213. max-width: 120rpx;
  214. height: 88rpx;
  215. margin-left: auto;
  216. text-align: right;
  217. display: flex;
  218. flex-direction: column;
  219. justify-content: space-between;
  220. align-items: flex-end;
  221. }
  222. .tui-right-dot {
  223. height: 76rpx !important;
  224. padding-bottom: 10rpx !important;
  225. }
  226. .tui-msg-time {
  227. width: 100%;
  228. font-size: 24rpx;
  229. line-height: 24rpx;
  230. color: #9397a4;
  231. }
  232. </style>