props.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 显示的文字内容
  6. text: {
  7. type: [String, Number],
  8. default: ''
  9. },
  10. // 文字颜色
  11. color: {
  12. type: String,
  13. default: '#333'
  14. },
  15. // 背景颜色
  16. bgColor: {
  17. type: String,
  18. default: '#f7f7f7'
  19. },
  20. // 弹出框背景颜色
  21. popupBgColor: {
  22. type: String,
  23. default: '#f7f7f7'
  24. },
  25. // 弹出框位置
  26. placement: {
  27. type: String,
  28. default: 'top'
  29. },
  30. // 触发方式
  31. triggerMode: {
  32. type: String,
  33. default: 'click'
  34. },
  35. // 是否显示 (manual模式下使用)
  36. show: {
  37. type: Boolean,
  38. default: false
  39. },
  40. // z-index值
  41. zIndex: {
  42. type: [Number, String],
  43. default: 10070
  44. },
  45. // 强制定位
  46. forcePosition: {
  47. type: Object,
  48. default() {
  49. return {}
  50. }
  51. },
  52. // 弹出方向
  53. direction: {
  54. type: String,
  55. default: 'top'
  56. }
  57. }
  58. })