You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

5 months ago
  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: () => defProps.tooltip.text
  9. },
  10. // 点击复制按钮时,复制的文本,为空则使用text值
  11. copyText: {
  12. type: [String, Number],
  13. default: () => defProps.tooltip.copyText
  14. },
  15. // 文本大小
  16. size: {
  17. type: [String, Number],
  18. default: () => defProps.tooltip.size
  19. },
  20. // 字体颜色
  21. color: {
  22. type: String,
  23. default: () => defProps.tooltip.color
  24. },
  25. // 弹出提示框时,文本的背景色
  26. bgColor: {
  27. type: String,
  28. default: () => defProps.tooltip.bgColor
  29. },
  30. // 弹出提示的方向,top-上方,bottom-下方
  31. direction: {
  32. type: String,
  33. default: () => defProps.tooltip.direction
  34. },
  35. // 弹出提示的z-index,nvue无效
  36. zIndex: {
  37. type: [String, Number],
  38. default: () => defProps.tooltip.zIndex
  39. },
  40. // 是否显示复制按钮
  41. showCopy: {
  42. type: Boolean,
  43. default: () => defProps.tooltip.showCopy
  44. },
  45. // 扩展的按钮组
  46. buttons: {
  47. type: Array,
  48. default: () => defProps.tooltip.buttons
  49. },
  50. // 是否显示透明遮罩以防止触摸穿透
  51. overlay: {
  52. type: Boolean,
  53. default: () => defProps.tooltip.overlay
  54. },
  55. // 是否显示复制成功或者失败的toast
  56. showToast: {
  57. type: Boolean,
  58. default: () => defProps.tooltip.showToast
  59. }
  60. }
  61. })