props.js 902 B

12345678910111213141516171819202122232425262728293031323334
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js'
  3. export default defineProps('line', {
  4. color: {
  5. type: [String, null],
  6. default: theme.borderColor
  7. },
  8. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  9. length: {
  10. type: [String, Number],
  11. default: '100%'
  12. },
  13. // 线条方向,col-竖向,row-横向
  14. direction: {
  15. type: String,
  16. default: 'row'
  17. },
  18. // 是否显示细边框
  19. hairline: {
  20. type: Boolean,
  21. default: true
  22. },
  23. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  24. margin: {
  25. type: [String, Number],
  26. default: 0
  27. },
  28. // 是否虚线,true-虚线,false-实线
  29. dashed: {
  30. type: Boolean,
  31. default: false
  32. }
  33. })