25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

100 satır
2.3 KiB

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