comment.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. ></layout-comment>
  36. </view>
  37. </view>
  38. </flat-list>
  39. </view>
  40. </view>
  41. </v-header>
  42. </template>
  43. <script>
  44. import vHeader from '@/components/v-header/main.vue';
  45. import tabData from './data/data';
  46. import flatList from '@/components/flat-list/src/main.vue';
  47. import layoutComment from '@/layout/layout-commet/main.vue';
  48. import mixins from './mixins';
  49. import controlData from './data/control';
  50. export default {
  51. name: "comment",
  52. data(){
  53. return{
  54. tabData,
  55. controlData,
  56. active:0
  57. }
  58. },
  59. components:{
  60. vHeader,
  61. flatList,
  62. layoutComment
  63. },
  64. mixins
  65. }
  66. </script>
  67. <style scoped lang="scss" src="./style.scss"></style>