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.

87 lines
2.0 KiB

4 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. 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. bgColor: {
  52. type: String,
  53. default: () => defProps.navbar.bgColor
  54. },
  55. // 标题的宽度
  56. titleWidth: {
  57. type: [String, Number],
  58. default: () => defProps.navbar.titleWidth
  59. },
  60. // 导航栏高度
  61. height: {
  62. type: [String, Number],
  63. default: () => defProps.navbar.height
  64. },
  65. // 左侧返回图标的大小
  66. leftIconSize: {
  67. type: [String, Number],
  68. default: () => defProps.navbar.leftIconSize
  69. },
  70. // 左侧返回图标的颜色
  71. leftIconColor: {
  72. type: String,
  73. default: () => defProps.navbar.leftIconColor
  74. },
  75. // 点击左侧区域(返回图标),是否自动返回上一页
  76. autoBack: {
  77. type: Boolean,
  78. default: () => defProps.navbar.autoBack
  79. },
  80. // 标题的样式,对象或字符串
  81. titleStyle: {
  82. type: [String, Object],
  83. default: () => defProps.navbar.titleStyle
  84. }
  85. }
  86. })