ComponentInfo.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div id="component-info-fragment">
  3. <div class="component-info">
  4. <div class="head">
  5. <span class="tab">产品参数<b class="tip">(仅供参考,以实际产品为准)</b></span>
  6. </div>
  7. <ul class="list-unstyled list-inline" style="margin-left: 0px;">
  8. <li v-for="property in component.properties" v-if="property.value">
  9. <div class="property-name">
  10. <span v-text="property.property.labelCn"></span>:
  11. </div>
  12. <div class="property-value">{{property.value ? property.value : '-'}}</div>
  13. </li>
  14. <li v-if="!commodity.uuid || !component.properties || component.properties.length === 0" class="text-info">
  15. <!--<i class="fa fa-smile-o fa-lg"></i> 暂无参数信息-->
  16. <span class="info">卖家上传的产品暂无参数,请 <a @click="goLink">联系卖家</a> 了解具体详情</span>
  17. </li>
  18. </ul>
  19. </div>
  20. <link-saler-box
  21. :tel="tel"
  22. v-if="showLinkBox"
  23. @cancelAction="showLinkBox = false">
  24. </link-saler-box>
  25. </div>
  26. </template>
  27. <script>
  28. import LinkSalerBox from '~components/common/LinkSalerBox.vue'
  29. import { goLinkUser } from '~utils/baseUtils'
  30. export default {
  31. name: 'component-info',
  32. data () {
  33. return {
  34. showLinkBox: false,
  35. tel: ''
  36. }
  37. },
  38. components: {
  39. LinkSalerBox
  40. },
  41. computed: {
  42. storeInfo () {
  43. return this.$store.state.shop.storeInfo.store.data
  44. },
  45. user () {
  46. return this.$store.state.option.user
  47. },
  48. component () {
  49. return this.$store.state.shop.storeInfo.component.data
  50. },
  51. commodity () {
  52. return this.$store.state.shop.storeInfo.commodity.data
  53. }
  54. },
  55. methods: {
  56. goLink: function () {
  57. goLinkUser(this, this.storeInfo.enUU)
  58. }
  59. }
  60. }
  61. </script>
  62. <style scoped>
  63. .component-info {
  64. width: 906px;
  65. margin-bottom: 16px;
  66. }
  67. .component-info .head {
  68. background-color: rgb(236, 242, 253);
  69. height: 40px;
  70. }
  71. .component-info ul .tab {
  72. width: 130px;
  73. }
  74. .component-info ul{
  75. padding-top: 15px;
  76. padding-bottom: 15px;
  77. }
  78. .component-info ul li {
  79. line-height: 30px;
  80. }
  81. .component-info ul li.text-info span.info{
  82. padding-left: 270px;
  83. font-size: 14px;
  84. color: #333;
  85. }
  86. .component-info ul li.text-info span.info a{
  87. font-size: 14px;
  88. color: #5078cb;
  89. }
  90. .component-info ul li.text-info span.info a:hover{
  91. text-decoration: underline!important ;
  92. }
  93. .component-info .head {
  94. font-size: 14px;
  95. font-weight: 600;
  96. }
  97. .component-info .head .tab {
  98. line-height: 40px;
  99. margin-left: 10px;
  100. text-align: center;
  101. display: inline-block;
  102. }
  103. .component-info ul {
  104. border: 1px solid #D6D3CE;;
  105. }
  106. .component-info ul li {
  107. line-height: 30px;
  108. font-size: 12px;
  109. padding-left: 20px;
  110. }
  111. .component-info .property-name {
  112. width: 130px;
  113. float: left;
  114. overflow: hidden;
  115. text-overflow: ellipsis;
  116. white-space: nowrap;
  117. }
  118. .component-info .property-value {
  119. float: left;
  120. width: 740px;
  121. }
  122. .tip {
  123. font-size: 12px;
  124. color: rgba(168, 181, 181, 0.79);
  125. margin-left: 5px;
  126. }
  127. .ng-hide{
  128. display: block !important;
  129. }
  130. </style>