comment.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <v-header title="评价列表" backgroundColor="#fff" border>
  3. <view class="screen_all flex">
  4. <view class="comment-header jCenter">
  5. <view class="comment-title">商品评价<text v-if="count.count && count.count>0">({{count.count >99?'99+':count.count}})</text></view>
  6. <view class="comment-tab-group row">
  7. <view class="comment-tab row center"
  8. v-for="(item,index) in tabData"
  9. :key="index"
  10. :class="{
  11. 'comment-tab-active': active === index
  12. }"
  13. v-if="count[item.key] && count[item.key]>0"
  14. @click="switchActive(index)"
  15. >{{item.label}}<text v-if="count[item.key] && count[item.key]>0">({{count[item.key] >99?'99+':count[item.key]}})</text></view>
  16. </view>
  17. </view>
  18. <view class="flex-all-1 overflow">
  19. <flat-list
  20. @changeData="flatChangeData"
  21. background="transparent"
  22. :ref="base_flat_id"
  23. @fetch="fetch"
  24. loadingColor="#FF8080"
  25. >
  26. <view :style="{opacity:opacity}">
  27. <view class="comment-screen"
  28. v-for="(item,index) in base_flat_data.data"
  29. :key="index"
  30. >
  31. <layout-comment
  32. :item="item"
  33. size="big"
  34. control
  35. goDetail
  36. ></layout-comment>
  37. </view>
  38. </view>
  39. </flat-list>
  40. </view>
  41. </view>
  42. </v-header>
  43. </template>
  44. <script>
  45. import vHeader from '@/components/v-header/main.vue';
  46. import tabData from './data/data';
  47. import flatList from '@/components/flat-list/src/main.vue';
  48. import layoutComment from '@/layout/layout-commet/main.vue';
  49. import mixins from './mixins';
  50. import controlData from './data/control';
  51. export default {
  52. name: "comment",
  53. data(){
  54. return{
  55. tabData,
  56. controlData,
  57. active:0
  58. }
  59. },
  60. components:{
  61. vHeader,
  62. flatList,
  63. layoutComment
  64. },
  65. mixins
  66. }
  67. </script>
  68. <style scoped lang="scss" src="./style.scss"></style>