style-one.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="style-one" :class="list.length === 0 ? '' : 'padding'">
  3. <image class="item" v-for="(it, key) in list" :key="key" @click="route_go(it)" :src="it.big_pic_url"></image>
  4. <view class="no-empty main-center" v-if="list.length === 0">
  5. <app-no-goods background="#f7f7f7" title="该分类下无相关内容哦~">
  6. </app-no-goods>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import appNoGoods from '../../components/page-component/app-no-goods/app-no-goods.vue';
  12. export default {
  13. name: 'style-one',
  14. props: ['list'],
  15. components: {
  16. 'app-no-goods': appNoGoods,
  17. },
  18. methods: {
  19. route_go(it) {
  20. uni.navigateTo({
  21. url: it.page_url
  22. })
  23. }
  24. }
  25. }
  26. </script>
  27. <style scoped lang="scss">
  28. .style-one {
  29. width: #{750rpx};
  30. background-color: white;
  31. }
  32. .padding {
  33. padding: 0 #{24rpx} #{24rpx} #{24rpx};
  34. }
  35. .item {
  36. width: #{702rpx};
  37. height: #{212rpx};
  38. margin-top: #{20rpx};
  39. }
  40. .no-empty {
  41. width: 100%;
  42. margin-top: #{150upx};
  43. background-color: #f7f7f7;
  44. }
  45. </style>