ComponentInfo.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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="!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. export default {
  30. name: 'component-info',
  31. data () {
  32. return {
  33. showLinkBox: false,
  34. tel: ''
  35. }
  36. },
  37. components: {
  38. LinkSalerBox
  39. },
  40. computed: {
  41. storeInfo () {
  42. return this.$store.state.shop.storeInfo.store.data
  43. },
  44. user () {
  45. return this.$store.state.option.user
  46. },
  47. component () {
  48. return this.$store.state.shop.storeInfo.component.data
  49. },
  50. commodity () {
  51. return this.$store.state.shop.storeInfo.commodity.data
  52. }
  53. },
  54. methods: {
  55. goLink: function () {
  56. this.baseUtils.goLinkUser(this, this.storeInfo.enUU)
  57. }
  58. }
  59. }
  60. </script>
  61. <style scoped>
  62. .component-info {
  63. width: 906px;
  64. margin-bottom: 16px;
  65. }
  66. .component-info .head {
  67. background-color: rgb(236, 242, 253);
  68. height: 40px;
  69. }
  70. .component-info ul .tab {
  71. width: 130px;
  72. }
  73. .component-info ul{
  74. padding-top: 15px;
  75. padding-bottom: 15px;
  76. }
  77. .component-info ul li {
  78. line-height: 30px;
  79. }
  80. .component-info ul li.text-info span.info{
  81. padding-left: 270px;
  82. font-size: 14px;
  83. color: #333;
  84. }
  85. .component-info ul li.text-info span.info a{
  86. font-size: 14px;
  87. color: #5078cb;
  88. }
  89. .component-info ul li.text-info span.info a:hover{
  90. text-decoration: underline!important ;
  91. }
  92. .component-info .head {
  93. font-size: 14px;
  94. font-weight: 600;
  95. }
  96. .component-info .head .tab {
  97. line-height: 40px;
  98. margin-left: 10px;
  99. text-align: center;
  100. display: inline-block;
  101. }
  102. .component-info ul {
  103. border: 1px solid #D6D3CE;;
  104. }
  105. .component-info ul li {
  106. line-height: 30px;
  107. font-size: 12px;
  108. padding-left: 20px;
  109. }
  110. .component-info .property-name {
  111. width: 130px;
  112. float: left;
  113. overflow: hidden;
  114. text-overflow: ellipsis;
  115. white-space: nowrap;
  116. }
  117. .component-info .property-value {
  118. float: left;
  119. width: 740px;
  120. }
  121. .tip {
  122. font-size: 12px;
  123. color: rgba(168, 181, 181, 0.79);
  124. margin-left: 5px;
  125. }
  126. .ng-hide{
  127. display: block !important;
  128. }
  129. </style>