props.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 是否开启顶部安全区适配
  6. safeAreaInsetTop: {
  7. type: Boolean,
  8. default: () => defProps.navbar.safeAreaInsetTop
  9. },
  10. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  11. placeholder: {
  12. type: Boolean,
  13. default: () => defProps.navbar.placeholder
  14. },
  15. // 是否固定在顶部
  16. fixed: {
  17. type: Boolean,
  18. default: () => defProps.navbar.fixed
  19. },
  20. // 是否显示下边框
  21. border: {
  22. type: Boolean,
  23. default: () => defProps.navbar.border
  24. },
  25. // 左边的图标
  26. leftIcon: {
  27. type: String,
  28. default: () => defProps.navbar.leftIcon
  29. },
  30. // 左边的提示文字
  31. leftText: {
  32. type: String,
  33. default: () => defProps.navbar.leftText
  34. },
  35. // 左右的提示文字
  36. rightText: {
  37. type: String,
  38. default: () => defProps.navbar.rightText
  39. },
  40. // 右边的图标
  41. rightIcon: {
  42. type: String,
  43. default: () => defProps.navbar.rightIcon
  44. },
  45. // 标题
  46. title: {
  47. type: [String, Number],
  48. default: () => defProps.navbar.title
  49. },
  50. // 标题颜色
  51. titleColor: {
  52. type: String,
  53. default: () => defProps.navbar.titleColor
  54. },
  55. // 背景颜色
  56. bgColor: {
  57. type: String,
  58. default: () => defProps.navbar.bgColor
  59. },
  60. // 标题的宽度
  61. titleWidth: {
  62. type: [String, Number],
  63. default: () => defProps.navbar.titleWidth
  64. },
  65. // 导航栏高度
  66. height: {
  67. type: [String, Number],
  68. default: () => defProps.navbar.height
  69. },
  70. // 左侧返回图标的大小
  71. leftIconSize: {
  72. type: [String, Number],
  73. default: () => defProps.navbar.leftIconSize
  74. },
  75. // 左侧返回图标的颜色
  76. leftIconColor: {
  77. type: String,
  78. default: () => defProps.navbar.leftIconColor
  79. },
  80. // 点击左侧区域(返回图标),是否自动返回上一页
  81. autoBack: {
  82. type: Boolean,
  83. default: () => defProps.navbar.autoBack
  84. },
  85. // 标题的样式,对象或字符串
  86. titleStyle: {
  87. type: [String, Object],
  88. default: () => defProps.navbar.titleStyle
  89. }
  90. }
  91. })