u-navbar.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u-navbar",
  5. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$4],
  6. data() {
  7. return {};
  8. },
  9. methods: {
  10. // 点击左侧区域
  11. leftClick() {
  12. this.$emit("leftClick");
  13. if (this.autoBack) {
  14. common_vendor.index.navigateBack();
  15. }
  16. },
  17. // 点击右侧区域
  18. rightClick() {
  19. this.$emit("rightClick");
  20. }
  21. }
  22. };
  23. if (!Array) {
  24. const _easycom_u_status_bar2 = common_vendor.resolveComponent("u-status-bar");
  25. const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  26. (_easycom_u_status_bar2 + _easycom_u_icon2)();
  27. }
  28. const _easycom_u_status_bar = () => "../u-status-bar/u-status-bar.js";
  29. const _easycom_u_icon = () => "../u-icon/u-icon.js";
  30. if (!Math) {
  31. (_easycom_u_status_bar + _easycom_u_icon)();
  32. }
  33. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  34. return common_vendor.e({
  35. a: _ctx.fixed && _ctx.placeholder
  36. }, _ctx.fixed && _ctx.placeholder ? {
  37. b: _ctx.$u.addUnit(_ctx.$u.getPx(_ctx.height) + _ctx.$u.sys().statusBarHeight, "px")
  38. } : {}, {
  39. c: _ctx.safeAreaInsetTop
  40. }, _ctx.safeAreaInsetTop ? {
  41. d: common_vendor.p({
  42. bgColor: _ctx.bgColor
  43. })
  44. } : {}, {
  45. e: _ctx.leftIcon
  46. }, _ctx.leftIcon ? {
  47. f: common_vendor.p({
  48. name: _ctx.leftIcon,
  49. size: _ctx.leftIconSize,
  50. color: _ctx.leftIconColor
  51. })
  52. } : {}, {
  53. g: _ctx.leftText
  54. }, _ctx.leftText ? {
  55. h: common_vendor.t(_ctx.leftText),
  56. i: _ctx.leftIconColor
  57. } : {}, {
  58. j: common_vendor.o((...args) => $options.leftClick && $options.leftClick(...args)),
  59. k: common_vendor.t(_ctx.title),
  60. l: common_vendor.s({
  61. width: _ctx.$u.addUnit(_ctx.titleWidth)
  62. }),
  63. m: common_vendor.s(_ctx.$u.addStyle(_ctx.titleStyle)),
  64. n: _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText
  65. }, _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? common_vendor.e({
  66. o: _ctx.rightIcon
  67. }, _ctx.rightIcon ? {
  68. p: common_vendor.p({
  69. name: _ctx.rightIcon,
  70. size: "20"
  71. })
  72. } : {}, {
  73. q: _ctx.rightText
  74. }, _ctx.rightText ? {
  75. r: common_vendor.t(_ctx.rightText)
  76. } : {}, {
  77. s: common_vendor.o((...args) => $options.rightClick && $options.rightClick(...args))
  78. }) : {}, {
  79. t: common_vendor.n(_ctx.border && "u-border-bottom"),
  80. v: _ctx.$u.addUnit(_ctx.height),
  81. w: _ctx.bgColor,
  82. x: common_vendor.n(_ctx.fixed && "u-navbar--fixed")
  83. });
  84. }
  85. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9d9e7ee2"], ["__file", "F:/兴元/开门柜项目/平台端管理系统小程序/node_modules/uview-plus/components/u-navbar/u-navbar.vue"]]);
  86. wx.createComponent(Component);