props.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js';
  3. export default defineProps('dropdown', {
  4. // 未激活时的颜色
  5. inactiveColor: {
  6. type: String,
  7. default: theme.mainColor
  8. },
  9. // 激活时的颜色
  10. activeColor: {
  11. type: String,
  12. default: theme.primary
  13. },
  14. // 菜单的背景颜色
  15. bgColor: {
  16. type: String,
  17. default: ''
  18. },
  19. // 菜单的圆角值
  20. round: {
  21. type: [Number, String],
  22. default: 0
  23. },
  24. // 点击遮罩是否关闭菜单
  25. closeOnClickMask: {
  26. type: Boolean,
  27. default: true
  28. },
  29. // 点击当前激活项标题是否关闭菜单
  30. closeOnClickSelf: {
  31. type: Boolean,
  32. default: true
  33. },
  34. // 过渡时间
  35. duration: {
  36. type: [Number, String],
  37. default: 300
  38. },
  39. // 标题菜单的高度
  40. height: {
  41. type: [Number, String],
  42. default: 40
  43. },
  44. // 是否显示下边框
  45. borderBottom: {
  46. type: Boolean,
  47. default: false
  48. },
  49. // 标题的字体大小
  50. titleSize: {
  51. type: [Number, String],
  52. default: 14
  53. },
  54. // 下拉出来的内容部分的圆角值
  55. borderRadius: {
  56. type: [Number, String],
  57. default: 0
  58. },
  59. // 菜单右侧的icon图标
  60. menuIcon: {
  61. type: String,
  62. default: 'arrow-down'
  63. },
  64. // 菜单右侧图标的大小
  65. menuIconSize: {
  66. type: [Number, String],
  67. default: ''
  68. }
  69. })