flexLine.vue 990 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="div flex-line" :class="{'border':showBorder}">
  3. <view class="div left"><slot></slot></view>
  4. <view class="div right">
  5. <slot name="right"></slot>
  6. <text v-if="isLink" class="span iconfont arrow">&#xe650;</text>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. name: 'flexLine',
  13. data () {
  14. return {
  15. }
  16. },
  17. props: {
  18. isLink: {
  19. type: Boolean,
  20. default: false
  21. },
  22. showBorder: {
  23. type: Boolean,
  24. default: false
  25. }
  26. },
  27. methods: {
  28. }
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .flex-line{display: flex;flex: 1;align-items: center;min-height: 2.5rem;background: #fff;
  33. &.border{border-bottom:1px dashed #eee}
  34. .left{display: flex;align-items: center;flex:1;font-size: $subFontSize;color:$formInputColor;font-weight: 700;}
  35. .right{display: flex;align-items: center;
  36. font-size: $subFontSize;
  37. color: $descTextColor;
  38. .arrow{font-size: $subFontSize;}
  39. }
  40. }
  41. </style>