guide.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <!-- 辅助线 -->
  3. <view>
  4. <view class="lines" :style="[boxStyle]">
  5. <view class="item" :style="[lineStyle]"></view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. // +----------------------------------------------------------------------
  11. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  12. // +----------------------------------------------------------------------
  13. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  14. // +----------------------------------------------------------------------
  15. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  16. // +----------------------------------------------------------------------
  17. // | Author: CRMEB Team <admin@crmeb.com>
  18. // +----------------------------------------------------------------------
  19. export default {
  20. name: 'guide',
  21. props: {
  22. dataConfig: {
  23. type: Object,
  24. default: () => {}
  25. },
  26. },
  27. computed: {
  28. //最外层盒子的样式
  29. boxStyle() {
  30. return {
  31. background: `linear-gradient(${this.dataConfig.bgColor.color[0].item}, ${this.dataConfig.bgColor.color[1].item})`,
  32. margin: this.dataConfig.mbConfig.val * 2 + 'rpx' + ' ' + this.dataConfig.lrConfig.val * 2 + 'rpx' +
  33. ' ' + 0,
  34. }
  35. },
  36. //线条样式
  37. lineStyle() {
  38. return {
  39. borderBottomWidth: this.dataConfig.heightConfig.val + 'px',
  40. borderBottomColor: this.dataConfig.lineColor.color[0].item,
  41. borderBottomStyle: this.dataConfig.lineStyle.list[this.dataConfig.lineStyle.tabVal].style
  42. }
  43. }
  44. },
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .lines {
  49. padding: 0 20rpx;
  50. .item {
  51. width: 100%;
  52. box-sizing: border-box;
  53. border-bottom-color: #666;
  54. border-bottom-width: 1px;
  55. border-bottom-style: dotted;
  56. }
  57. }
  58. </style>