bd-detail.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="bd-detail">
  3. <view class="detail" v-if="newDetail">
  4. <!-- <image src="https://shop.9026.com/web/statics/image/mall/static/icon/goods-detail.png"></image> -->
  5. <app-rich-text
  6. :content="newDetail"
  7. ></app-rich-text>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import appRichText from "./parse.vue";
  13. export default {
  14. name: "bd-detail",
  15. components: {
  16. 'app-rich-text': appRichText,
  17. },
  18. props: {
  19. detail: {
  20. type: String,
  21. default() {
  22. return '';
  23. }
  24. },
  25. },
  26. created() {
  27. // this.$store.dispatch('gConfig/setImageWidth', 48);
  28. },
  29. computed: {
  30. newDetail() {
  31. let detail = '';
  32. if (this.detail) {
  33. detail = this.detail;
  34. }
  35. return detail;
  36. },
  37. }
  38. }
  39. </script>
  40. <style scoped lang="scss">
  41. .bd-detail {
  42. width: 750upx;
  43. // padding: 0upx 0 0 0;
  44. background-color: #ffffff;
  45. border-radius: 15upx;
  46. // margin: 24upx 24upx 0 24upx;
  47. image {
  48. width: 100%;
  49. height: #{80rpx};
  50. display: block;
  51. }
  52. }
  53. </style>