guide.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="lines" :style="'padding:0 '+ lrEdge +'rpx;margin-top:'+ mbConfig +'rpx;'" v-if="heightConfig">
  3. <view class="item" :style="'border-bottom-width:'+ heightConfig +'rpx;border-bottom-color:'+ lineColor +';border-bottom-style:'+ lineStyle +';'"></view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'guide',
  9. props: {
  10. dataConfig: {
  11. type: Object,
  12. default: () => {}
  13. }
  14. },
  15. data() {
  16. return {
  17. heightConfig:this.dataConfig.heightConfig.val,
  18. lineColor:this.dataConfig.lineColor.color[0].item,
  19. lineStyle:this.dataConfig.lineStyle.type == 0 ? 'dashed' : this.dataConfig.lineStyle.type == 1 ? 'solid' : 'dotted',
  20. lrEdge:this.dataConfig.lrEdge.val,
  21. mbConfig:this.dataConfig.mbConfig.val*2
  22. };
  23. },
  24. created() {},
  25. methods: {
  26. }
  27. }
  28. </script>
  29. <style lang="scss">
  30. .lines{
  31. padding: 0 20rpx;
  32. margin-top: 20rpx;
  33. .item{
  34. width: 100%;
  35. box-sizing: border-box;
  36. border-bottom-color: red;
  37. border-bottom-width: 1px;
  38. // dashed
  39. border-bottom-style: dotted;
  40. }
  41. }
  42. </style>