ComponentInfo.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div id="component-info-fragment" v-if="!storeInfo.status || storeInfo.status == 'OPENED'">
  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;" v-if="component.properties">
  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" v-text="property.value"></div>
  13. </li>
  14. <li v-if="!component.properties || component.properties.length === 0" class="text-center">
  15. <i class="fa fa-smile-o fa-lg"></i> 暂无参数信息
  16. </li>
  17. </ul>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'component-info',
  24. computed: {
  25. storeInfo () {
  26. return this.$store.state.shop.storeInfo.store.data
  27. },
  28. component () {
  29. return this.$store.state.shop.storeInfo.component.data
  30. }
  31. }
  32. }
  33. </script>
  34. <style scoped>
  35. .component-info {
  36. width: 906px;
  37. margin-bottom: 16px;
  38. }
  39. .component-info .head {
  40. background-color: rgb(236, 242, 253);
  41. height: 40px;
  42. }
  43. .component-info ul .tab {
  44. width: 130px;
  45. }
  46. .component-info ul{
  47. padding-top: 15px;
  48. padding-bottom: 15px;
  49. }
  50. .component-info ul li {
  51. line-height: 30px;
  52. }
  53. .component-info .head {
  54. font-size: 14px;
  55. font-weight: 600;
  56. }
  57. .component-info .head .tab {
  58. line-height: 40px;
  59. margin-left: 10px;
  60. text-align: center;
  61. display: inline-block;
  62. }
  63. .component-info ul {
  64. border: 1px solid #D6D3CE;;
  65. }
  66. .component-info ul li {
  67. line-height: 30px;
  68. font-size: 12px;
  69. padding-left: 20px;
  70. }
  71. .component-info .property-name {
  72. width: 130px;
  73. float: left;
  74. overflow: hidden;
  75. text-overflow: ellipsis;
  76. white-space: nowrap;
  77. }
  78. .component-info .property-value {
  79. float: left;
  80. width: 740px;
  81. }
  82. .tip {
  83. font-size: 12px;
  84. color: rgba(168, 181, 181, 0.79);
  85. margin-left: 5px;
  86. }
  87. .ng-hide{
  88. display: block !important;
  89. }
  90. </style>