ProductDesc.vue 813 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="div ui-detail" ref="content">
  3. <view class="div">
  4. <desc-item
  5. v-if="detailInfo"
  6. ></desc-item>
  7. </view>
  8. <v-back-top v-if="isshowBacktop" :target="target"></v-back-top>
  9. </view>
  10. </template>
  11. <script>
  12. import { mapState } from 'vuex'
  13. import DescItem from './DescItem'
  14. import BackTop from './DetailBackTop'
  15. export default {
  16. data () {
  17. return {
  18. isshowBacktop: false
  19. }
  20. },
  21. mounted () {
  22. // 计算内容高度
  23. this.$nextTick(() => {
  24. this.target = this.$refs.content
  25. })
  26. },
  27. components: {
  28. 'desc-item': DescItem,
  29. 'v-back-top': BackTop
  30. },
  31. computed: mapState({
  32. detailInfo: state => state.pointsgoods.detailInfo,
  33. }),
  34. methods: {}
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .ui-detail {
  39. height: 100%;
  40. overflow: auto;
  41. }
  42. </style>