app-goods-service.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="app-service dir-left-wrap" v-if="list.length > 0" :class="{'border-top': border}">
  3. <view class="goods-server-item cross-center dir-left-nowrap" v-for="(item, index) in list" :key="index">
  4. <view class="image cross-center main-center" :class="newTheme + '-background'">
  5. <image class="box-grow-0" src="../../../static/image/icon/icon-check.png" mode="aspectFill"></image>
  6. </view>
  7. <text class="box-grow-1">{{item}}</text>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import { mapState } from 'vuex';
  13. export default {
  14. props: {
  15. list: Array,
  16. border: {
  17. type: Boolean,
  18. default() {
  19. return true;
  20. }
  21. },
  22. setTheme: String,
  23. },
  24. computed: {
  25. ...mapState({
  26. theme: state => state.mallConfig.theme
  27. }),
  28. newTheme() {
  29. if (this.setTheme) {
  30. return this.setTheme;
  31. } else {
  32. return this.theme;
  33. }
  34. }
  35. }
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .app-service {
  40. padding: #{24rpx};
  41. background-color: #fff;
  42. .goods-server-item {
  43. font-size: #{24rpx};
  44. margin-right: #{32rpx};
  45. color: $uni-general-color-one;
  46. .image {
  47. width: #{26rpx};
  48. height: #{26rpx};
  49. margin-right: #{8rpx};
  50. image {
  51. width: #{30rpx};
  52. height: #{30rpx};
  53. display: block;
  54. }
  55. }
  56. }
  57. }
  58. </style>