props.js 2.0 KB

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