s-menu-list.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!-- 装修基础组件:列表导航 -->
  2. <template>
  3. <view class="menu-list-wrap">
  4. <uni-list :border="true">
  5. <uni-list-item v-for="(item, index) in data.list" :key="index" showArrow clickable
  6. @tap="sheep.$router.go(item.url)">
  7. <template v-slot:header>
  8. <view class="ss-flex ss-col-center">
  9. <image v-if="item.iconUrl" class="list-icon" :src="sheep.$url.cdn(item.iconUrl)" mode="aspectFit"></image>
  10. <view class="title-text ss-flex ss-row-center ss-col-center ss-m-l-20"
  11. :style="[{ color: item.titleColor }]">
  12. {{ item.title }}
  13. </view>
  14. </view>
  15. </template>
  16. <template v-slot:footer>
  17. <view class="notice-text ss-flex ss-row-center ss-col-center" :style="[{ color: item.subtitleColor }]">
  18. {{ item.subtitle }}
  19. </view>
  20. </template>
  21. </uni-list-item>
  22. </uni-list>
  23. </view>
  24. </template>
  25. <script setup>
  26. /**
  27. * cell
  28. */
  29. import sheep from '@/sheep';
  30. const props = defineProps({
  31. data: {
  32. type: Object,
  33. default: () => ({}),
  34. },
  35. });
  36. </script>
  37. <style lang="scss">
  38. .list-icon {
  39. width: 20px;
  40. height: 20px;
  41. }
  42. .notice-text {}
  43. .menu-list-wrap {
  44. ::v-deep .uni-list {
  45. background-color: transparent;
  46. }
  47. }
  48. </style>