knowList.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view class="box">
  3. <view v-if="flag == 1" class="dffs boxlist">
  4. <view @click="nextTo()" class="vidLi" v-for="(item, ind) in list" :key="ind">
  5. <image :src="item.image" mode=""></image>
  6. <view class="title elli">名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课</view>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {};
  15. },
  16. props: {
  17. list: {
  18. type: Array,
  19. default: []
  20. },
  21. flag: {
  22. type: [String, Number],
  23. default: 1
  24. }
  25. },
  26. methods: {
  27. nextTo(){
  28. uni.navigateTo({
  29. url:'/pages/index/navInfo'
  30. })
  31. },
  32. }
  33. };
  34. </script>
  35. <style scoped lang="scss">
  36. .boxlist {
  37. flex-wrap: wrap;
  38. .vidLi {
  39. margin-right: 24rpx;
  40. margin-bottom: 30rpx;
  41. width: 334rpx;
  42. background-color: #fff;
  43. box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.07);
  44. border-radius: 0px 0px 10rpx 10rpx;
  45. &:nth-of-type(2n) {
  46. margin-right: 0;
  47. }
  48. image {
  49. width: 334rpx;
  50. height: 240rpx;
  51. }
  52. .title {
  53. margin: 18rpx 13rpx 14rpx;
  54. font-size: 28rpx;
  55. line-height: 40rpx;
  56. }
  57. }
  58. }
  59. </style>