style-one.vue 1.2 KB

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