ComponentInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 href="">联系卖家</a> 了解具体详情</span>
  17. </li>
  18. </ul>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'component-info',
  25. computed: {
  26. component () {
  27. return this.$store.state.shop.storeInfo.component.data
  28. },
  29. commodity () {
  30. return this.$store.state.shop.storeInfo.commodity.data
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped>
  36. .component-info {
  37. width: 906px;
  38. margin-bottom: 16px;
  39. }
  40. .component-info .head {
  41. background-color: rgb(236, 242, 253);
  42. height: 40px;
  43. }
  44. .component-info ul .tab {
  45. width: 130px;
  46. }
  47. .component-info ul{
  48. padding-top: 15px;
  49. padding-bottom: 15px;
  50. }
  51. .component-info ul li {
  52. line-height: 30px;
  53. }
  54. .component-info ul li.text-info span.info{
  55. padding-left: 270px;
  56. font-size: 14px;
  57. color: #333;
  58. }
  59. .component-info ul li.text-info span.info a{
  60. font-size: 14px;
  61. color: #5078cb;
  62. }
  63. .component-info ul li.text-info span.info a:hover{
  64. text-decoration: underline!important ;
  65. }
  66. .component-info .head {
  67. font-size: 14px;
  68. font-weight: 600;
  69. }
  70. .component-info .head .tab {
  71. line-height: 40px;
  72. margin-left: 10px;
  73. text-align: center;
  74. display: inline-block;
  75. }
  76. .component-info ul {
  77. border: 1px solid #D6D3CE;;
  78. }
  79. .component-info ul li {
  80. line-height: 30px;
  81. font-size: 12px;
  82. padding-left: 20px;
  83. }
  84. .component-info .property-name {
  85. width: 130px;
  86. float: left;
  87. overflow: hidden;
  88. text-overflow: ellipsis;
  89. white-space: nowrap;
  90. }
  91. .component-info .property-value {
  92. float: left;
  93. width: 740px;
  94. }
  95. .tip {
  96. font-size: 12px;
  97. color: rgba(168, 181, 181, 0.79);
  98. margin-left: 5px;
  99. }
  100. .ng-hide{
  101. display: block !important;
  102. }
  103. </style>