u-keyboard.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u-keyboard",
  5. data() {
  6. return {};
  7. },
  8. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$11],
  9. emits: ["change", "close", "confirm", "cancel", "backspace"],
  10. methods: {
  11. change(e) {
  12. this.$emit("change", e);
  13. },
  14. // 键盘关闭
  15. popupClose() {
  16. this.$emit("close");
  17. },
  18. // 输入完成
  19. onConfirm() {
  20. this.$emit("confirm");
  21. },
  22. // 取消输入
  23. onCancel() {
  24. this.$emit("cancel");
  25. },
  26. // 退格键
  27. backspace() {
  28. this.$emit("backspace");
  29. }
  30. }
  31. };
  32. if (!Array) {
  33. const _easycom_u_number_keyboard2 = common_vendor.resolveComponent("u-number-keyboard");
  34. const _easycom_u_car_keyboard2 = common_vendor.resolveComponent("u-car-keyboard");
  35. const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
  36. (_easycom_u_number_keyboard2 + _easycom_u_car_keyboard2 + _easycom_u_popup2)();
  37. }
  38. const _easycom_u_number_keyboard = () => "../u-number-keyboard/u-number-keyboard.js";
  39. const _easycom_u_car_keyboard = () => "../u-car-keyboard/u-car-keyboard.js";
  40. const _easycom_u_popup = () => "../u-popup/u-popup.js";
  41. if (!Math) {
  42. (_easycom_u_number_keyboard + _easycom_u_car_keyboard + _easycom_u_popup)();
  43. }
  44. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  45. return common_vendor.e({
  46. a: _ctx.tooltip
  47. }, _ctx.tooltip ? common_vendor.e({
  48. b: _ctx.showCancel
  49. }, _ctx.showCancel ? {
  50. c: common_vendor.t(_ctx.showCancel && _ctx.cancelText),
  51. d: common_vendor.o((...args) => $options.onCancel && $options.onCancel(...args))
  52. } : {}, {
  53. e: _ctx.showTips
  54. }, _ctx.showTips ? {
  55. f: common_vendor.t(_ctx.tips ? _ctx.tips : _ctx.mode == "number" ? "数字键盘" : _ctx.mode == "card" ? "身份证键盘" : "车牌号键盘")
  56. } : {}, {
  57. g: _ctx.showConfirm
  58. }, _ctx.showConfirm ? {
  59. h: common_vendor.t(_ctx.showConfirm && _ctx.confirmText),
  60. i: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args))
  61. } : {}) : {}, {
  62. j: _ctx.mode == "number" || _ctx.mode == "card"
  63. }, _ctx.mode == "number" || _ctx.mode == "card" ? {
  64. k: common_vendor.o($options.backspace),
  65. l: common_vendor.o($options.change),
  66. m: common_vendor.p({
  67. random: _ctx.random,
  68. mode: _ctx.mode,
  69. dotDisabled: _ctx.dotDisabled
  70. })
  71. } : {
  72. n: common_vendor.o($options.backspace),
  73. o: common_vendor.o($options.change),
  74. p: common_vendor.p({
  75. random: _ctx.random,
  76. autoChange: _ctx.autoChange
  77. })
  78. }, {
  79. q: common_vendor.o($options.popupClose),
  80. r: common_vendor.p({
  81. overlay: _ctx.overlay,
  82. closeOnClickOverlay: _ctx.closeOnClickOverlay,
  83. mode: "bottom",
  84. popup: false,
  85. show: _ctx.show,
  86. safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
  87. zIndex: _ctx.zIndex,
  88. customStyle: {
  89. backgroundColor: "rgb(214, 218, 220)"
  90. }
  91. })
  92. });
  93. }
  94. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-763d397e"], ["__file", "C:/Users/Administrator/Desktop/srcaaa/node_modules/uview-plus/components/u-keyboard/u-keyboard.vue"]]);
  95. wx.createComponent(Component);