workbench.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="container">
  3. <swiper class="swiper square-dot" indicator-color="#D7E3FD" indicator-active-color="#3874F6" :indicator-dots="true"
  4. :circular="true" duration="500">
  5. <swiper-item class="swiper-item" v-for="(it, i) in apps" key="i">
  6. <navigator url="#" class="app" v-for="item in it" key="label">
  7. <view class="icon" :style="{ backgroundColor: item.color }">
  8. <text class="iconfont" :class="item.icon" style="font-size: 6.400vw;" />
  9. </view>
  10. <view class="label u-line-1">
  11. {{ item.label }}
  12. </view>
  13. </navigator>
  14. </swiper-item>
  15. </swiper>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'workbench',
  21. data() {
  22. return {
  23. apps: [
  24. [{
  25. label: "巡检中心",
  26. icon: "icon-xunjianzhongxin",
  27. color: "#5487F7"
  28. }, {
  29. label: "巡检中心1",
  30. icon: "icon-xunjianzhongxin",
  31. color: "#5487F7"
  32. }, {
  33. label: "巡检中心12",
  34. icon: "icon-xunjianzhongxin",
  35. color: "#5487F7"
  36. }, {
  37. label: "巡检中心123",
  38. icon: "icon-xunjianzhongxin",
  39. color: "#5487F7"
  40. }, {
  41. label: "巡检中心1234",
  42. icon: "icon-xunjianzhongxin",
  43. color: "#5487F7"
  44. }], [{
  45. label: "巡检中心",
  46. icon: "icon-xunjianzhongxin",
  47. color: "#5487F7"
  48. }, {
  49. label: "巡检中心1",
  50. icon: "icon-xunjianzhongxin",
  51. color: "#5487F7"
  52. }, {
  53. label: "巡检中心12",
  54. icon: "icon-xunjianzhongxin",
  55. color: "#5487F7"
  56. }, {
  57. label: "巡检中心123",
  58. icon: "icon-xunjianzhongxin",
  59. color: "#5487F7"
  60. }, {
  61. label: "巡检中心1234",
  62. icon: "icon-xunjianzhongxin",
  63. color: "#5487F7"
  64. }], [{
  65. label: "巡检中心",
  66. icon: "icon-xunjianzhongxin",
  67. color: "#5487F7"
  68. }, {
  69. label: "巡检中心1",
  70. icon: "icon-xunjianzhongxin",
  71. color: "#5487F7"
  72. }, {
  73. label: "巡检中心12",
  74. icon: "icon-xunjianzhongxin",
  75. color: "#5487F7"
  76. }, {
  77. label: "巡检中心123",
  78. icon: "icon-xunjianzhongxin",
  79. color: "#5487F7"
  80. }, {
  81. label: "巡检中心1234",
  82. icon: "icon-xunjianzhongxin",
  83. color: "#5487F7"
  84. }]
  85. ]
  86. };
  87. },
  88. created() { },
  89. methods: {
  90. rander() {
  91. let colorList = ['x']
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scoped>
  97. .container {
  98. width: 355px;
  99. margin: 0 auto;
  100. margin-top: 10px;
  101. background: #fff;
  102. border-radius: 4px;
  103. overflow: hidden;
  104. .swiper {
  105. height: 96px;
  106. .swiper-item {
  107. display: flex;
  108. margin-top: 5px;
  109. box-sizing: border-box;
  110. padding: 0 10px;
  111. .app {
  112. width: 68px;
  113. height: 69px;
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. padding: 5px 0;
  118. box-sizing: content-box;
  119. border-radius: 4px;
  120. .icon {
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. width: 44px;
  125. height: 44px;
  126. border-radius: 4px;
  127. color: #fff;
  128. }
  129. .label {
  130. font-size: 12px;
  131. color: #333333;
  132. margin-top: 8px;
  133. width: 60px;
  134. text-align: center;
  135. }
  136. }
  137. }
  138. }
  139. }
  140. </style>