information-material.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!-- 资讯素材 -->
  2. <template>
  3. <view class="wrap">
  4. <view class="header">
  5. <view class="tab-list">
  6. <view :class="{ 'active' : isActive === index }" class="child" v-for="(item,index) in navList"
  7. :key="index" @click="checked(index)">
  8. {{item.title}}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="list">
  13. <view class="item">
  14. <image src="../../../static/img-4.png" class="item-img" mode="aspectFill"></image>
  15. <view class="row-between">
  16. <view class="name">焦糖玛奇朵</view>
  17. <button type="default" class="btn" @click="showShare">
  18. <image src="../../../static/icon-4.png" mode="widthFix"></image>
  19. 分享
  20. </button>
  21. </view>
  22. </view>
  23. <view class="item">
  24. <image src="../../../static/img-4.png" class="item-img" mode="aspectFill"></image>
  25. <view class="row-between">
  26. <view class="name">焦糖玛奇朵</view>
  27. <button type="default" class="btn" @click="showShare">
  28. <image src="../../../static/icon-4.png" mode="widthFix"></image>
  29. 分享
  30. </button>
  31. </view>
  32. </view>
  33. <view class="item">
  34. <image src="../../../static/img-4.png" class="item-img" mode="aspectFill"></image>
  35. <view class="row-between">
  36. <view class="name">焦糖玛奇朵</view>
  37. <button type="default" class="btn" @click="showShare">
  38. <image src="../../../static/icon-4.png" mode="widthFix"></image>
  39. 分享
  40. </button>
  41. </view>
  42. </view>
  43. <!-- 无内容时显示 -->
  44. <!-- <view class="normal-box">
  45. <image src="../../../static/normal-8.png" mode="widthFix"></image>
  46. 暂无资讯素材
  47. </view> -->
  48. </view>
  49. <!-- 分享-弹窗 -->
  50. <view v-show="isShowShare">
  51. <view class="mask" @tap="closeShare"></view>
  52. <view class="window">
  53. <view class="window-label">分享到</view>
  54. <view class="window-list">
  55. <view class="window-item">
  56. <image src="../../../static/share-1.png" mode=""></image>
  57. 微信
  58. </view>
  59. <view class="window-item">
  60. <image src="../../../static/share-2.png" mode=""></image>
  61. 保存相册
  62. </view>
  63. </view>
  64. <view class="window-bottom">
  65. <button type="default" @click="closeShare">取消分享</button>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 分享-弹窗 -->
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. //选项卡
  77. isActive: 0,
  78. navList: [{
  79. index: 0,
  80. title: '线上素材',
  81. }, {
  82. index: 1,
  83. title: "线下素材",
  84. }],
  85. //分享弹窗
  86. isShowShare:true
  87. }
  88. },
  89. methods: {
  90. //选项卡
  91. checked(index) {
  92. this.isActive = index
  93. },
  94. //分享弹窗-弹窗
  95. showShare() {
  96. this.isShowShare = true;
  97. },
  98. closeShare() {
  99. this.isShowShare = false;
  100. },
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. @import "./information-material.css";
  106. </style>