@nutui/nutui 3.1.19-beta.1 → 3.1.19-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +9 -8
  2. package/dist/nutui.es.js +2875 -3576
  3. package/dist/nutui.umd.js +2965 -3579
  4. package/dist/packages/_es/ActionSheet.js +18 -12
  5. package/dist/packages/_es/Address.js +69 -78
  6. package/dist/packages/_es/Audio.js +12 -12
  7. package/dist/packages/_es/AudioOperate.js +1 -1
  8. package/dist/packages/_es/Avatar.js +3 -3
  9. package/dist/packages/_es/BackTop.js +110 -68
  10. package/dist/packages/_es/Badge.js +3 -3
  11. package/dist/packages/_es/Barrage.js +55 -62
  12. package/dist/packages/_es/Button.js +2 -2
  13. package/dist/packages/_es/Calendar.js +27 -32
  14. package/dist/packages/_es/CalendarItem.js +3 -3
  15. package/dist/packages/_es/Card.js +5 -6
  16. package/dist/packages/_es/Cascader.js +7 -7
  17. package/dist/packages/_es/Cell.js +11 -4
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +13 -3
  20. package/dist/packages/_es/CheckboxGroup.js +2 -2
  21. package/dist/packages/_es/CircleProgress.js +40 -149
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +8 -34
  24. package/dist/packages/_es/CollapseItem.js +59 -90
  25. package/dist/packages/_es/CountDown.js +5 -5
  26. package/dist/packages/_es/CountUp.js +51 -43
  27. package/dist/packages/_es/DatePicker.js +20 -21
  28. package/dist/packages/_es/Dialog.js +91 -12
  29. package/dist/packages/_es/Divider.js +4 -4
  30. package/dist/packages/_es/Drag.js +54 -92
  31. package/dist/packages/_es/Elevator.js +50 -75
  32. package/dist/packages/_es/Empty.js +3 -3
  33. package/dist/packages/_es/FixedNav.js +10 -11
  34. package/dist/packages/_es/Form.js +5 -9
  35. package/dist/packages/_es/FormItem.js +1 -1
  36. package/dist/packages/_es/Grid.js +1 -1
  37. package/dist/packages/_es/GridItem.js +26 -8
  38. package/dist/packages/_es/Icon.js +1 -1
  39. package/dist/packages/_es/ImagePreview.js +83 -14
  40. package/dist/packages/_es/Indicator.js +3 -3
  41. package/dist/packages/_es/InfiniteLoading.js +107 -93
  42. package/dist/packages/_es/Input.js +8 -8
  43. package/dist/packages/_es/InputNumber.js +16 -23
  44. package/dist/packages/_es/Layout.js +1 -1
  45. package/dist/packages/_es/List.js +34 -41
  46. package/dist/packages/_es/Menu.js +12 -15
  47. package/dist/packages/_es/MenuItem.js +7 -7
  48. package/dist/packages/_es/Navbar.js +4 -3
  49. package/dist/packages/_es/NoticeBar.js +40 -47
  50. package/dist/packages/_es/Notify.js +166 -27
  51. package/dist/packages/_es/NumberKeyboard.js +18 -8
  52. package/dist/packages/_es/OldPicker.js +120 -122
  53. package/dist/packages/_es/OverLay.js +25 -5
  54. package/dist/packages/_es/Pagination.js +14 -13
  55. package/dist/packages/_es/Picker.js +16 -39
  56. package/dist/packages/_es/Popover.js +29 -154
  57. package/dist/packages/_es/Popup.js +69 -6
  58. package/dist/packages/_es/Price.js +5 -17
  59. package/dist/packages/_es/Progress.js +8 -18
  60. package/dist/packages/_es/PullRefresh.js +1 -1
  61. package/dist/packages/_es/Radio.js +14 -4
  62. package/dist/packages/_es/RadioGroup.js +1 -1
  63. package/dist/packages/_es/Range.js +33 -46
  64. package/dist/packages/_es/Rate.js +19 -16
  65. package/dist/packages/_es/Row.js +1 -1
  66. package/dist/packages/_es/SearchBar.js +11 -12
  67. package/dist/packages/_es/ShortPassword.js +67 -89
  68. package/dist/packages/_es/SideNavBar.js +16 -5
  69. package/dist/packages/_es/SideNavBarItem.js +1 -1
  70. package/dist/packages/_es/Signature.js +88 -69
  71. package/dist/packages/_es/Skeleton.js +11 -8
  72. package/dist/packages/_es/Sku.js +57 -49
  73. package/dist/packages/_es/Step.js +1 -1
  74. package/dist/packages/_es/Steps.js +1 -1
  75. package/dist/packages/_es/Sticky.js +23 -28
  76. package/dist/packages/_es/SubSideNavBar.js +1 -1
  77. package/dist/packages/_es/Swipe.js +26 -39
  78. package/dist/packages/_es/Swiper.js +14 -32
  79. package/dist/packages/_es/SwiperItem.js +2 -2
  80. package/dist/packages/_es/Switch.js +3 -3
  81. package/dist/packages/_es/TabPane.js +1 -1
  82. package/dist/packages/_es/Tabbar.js +3 -3
  83. package/dist/packages/_es/TabbarItem.js +21 -11
  84. package/dist/packages/_es/Table.js +13 -13
  85. package/dist/packages/_es/Tabs.js +20 -21
  86. package/dist/packages/_es/Tag.js +4 -4
  87. package/dist/packages/_es/TextArea.js +42 -44
  88. package/dist/packages/_es/TimeDetail.js +3 -4
  89. package/dist/packages/_es/TimePannel.js +3 -3
  90. package/dist/packages/_es/TimeSelect.js +7 -8
  91. package/dist/packages/_es/Toast.js +170 -41
  92. package/dist/packages/_es/Uploader.js +138 -109
  93. package/dist/packages/_es/Video.js +9 -8
  94. package/dist/packages/_es/common.js +1 -1
  95. package/dist/packages/_es/component.js +135 -3
  96. package/dist/packages/_es/index.js +6 -44
  97. package/dist/packages/_es/index2.js +31 -8
  98. package/dist/packages/_es/index3.js +7 -58
  99. package/dist/packages/_es/index4.js +56 -413
  100. package/dist/packages/_es/{index.taro.js → index5.js} +113 -140
  101. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  102. package/dist/packages/_es/pxCheck.js +1 -1
  103. package/dist/packages/_es/raf.js +19 -0
  104. package/dist/style.css +1 -1
  105. package/dist/styles/themes/default.scss +42 -42
  106. package/dist/styles/themes/jdt.scss +42 -42
  107. package/dist/types/__VUE/actionsheet/index.d.ts +269 -0
  108. package/dist/types/__VUE/address/index.d.ts +386 -0
  109. package/dist/types/__VUE/audio/index.d.ts +92 -0
  110. package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
  111. package/dist/types/__VUE/avatar/index.d.ts +66 -0
  112. package/dist/types/__VUE/backtop/index.d.ts +105 -0
  113. package/dist/types/__VUE/badge/index.d.ts +94 -0
  114. package/dist/types/__VUE/barrage/index.d.ts +80 -0
  115. package/dist/types/__VUE/button/index.d.ts +116 -0
  116. package/dist/types/__VUE/calendar/index.d.ts +155 -0
  117. package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
  118. package/dist/types/__VUE/card/index.d.ts +81 -0
  119. package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
  120. package/dist/types/__VUE/cascader/helper.d.ts +8 -0
  121. package/dist/types/__VUE/cascader/index.d.ts +76 -0
  122. package/dist/types/__VUE/cascader/tree.d.ts +17 -0
  123. package/dist/types/__VUE/cascader/types.d.ts +30 -0
  124. package/dist/types/__VUE/cell/index.d.ts +109 -0
  125. package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
  126. package/dist/types/__VUE/checkbox/index.d.ts +102 -0
  127. package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
  128. package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
  129. package/dist/types/__VUE/col/index.d.ts +42 -0
  130. package/dist/types/__VUE/collapse/index.d.ts +104 -0
  131. package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
  132. package/dist/types/__VUE/countdown/index.d.ts +90 -0
  133. package/dist/types/__VUE/countup/index.d.ts +216 -0
  134. package/dist/types/__VUE/datepicker/index.d.ts +347 -0
  135. package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
  136. package/dist/types/__VUE/dialog/index.d.ts +306 -0
  137. package/dist/types/__VUE/divider/index.d.ts +47 -0
  138. package/dist/types/__VUE/drag/index.d.ts +61 -0
  139. package/dist/types/__VUE/elevator/index.d.ts +71 -0
  140. package/dist/types/__VUE/empty/index.d.ts +46 -0
  141. package/dist/types/__VUE/fixednav/index.d.ts +96 -0
  142. package/dist/types/__VUE/form/common.d.ts +20 -0
  143. package/dist/types/__VUE/form/index.d.ts +32 -0
  144. package/dist/types/__VUE/form/types.d.ts +13 -0
  145. package/dist/types/__VUE/formitem/index.d.ts +120 -0
  146. package/dist/types/__VUE/formitem/types.d.ts +10 -0
  147. package/dist/types/__VUE/grid/common.d.ts +91 -0
  148. package/dist/types/__VUE/grid/index.d.ts +100 -0
  149. package/dist/types/__VUE/griditem/index.d.ts +80 -0
  150. package/dist/types/__VUE/icon/index.d.ts +74 -0
  151. package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
  152. package/dist/types/__VUE/indicator/index.d.ts +70 -0
  153. package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
  154. package/dist/types/__VUE/input/index.d.ts +336 -0
  155. package/dist/types/__VUE/input/util.d.ts +5 -0
  156. package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
  157. package/dist/types/__VUE/layout/index.d.ts +13 -0
  158. package/dist/types/__VUE/list/index.d.ts +48 -0
  159. package/dist/types/__VUE/menu/index.d.ts +51 -0
  160. package/dist/types/__VUE/menuitem/index.d.ts +77 -0
  161. package/dist/types/__VUE/navbar/index.d.ts +84 -0
  162. package/dist/types/__VUE/noticebar/index.d.ts +209 -0
  163. package/dist/types/__VUE/notify/index.d.ts +103 -0
  164. package/dist/types/__VUE/numberkeyboard/index.d.ts +123 -0
  165. package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
  166. package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
  167. package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
  168. package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
  169. package/dist/types/__VUE/overlay/index.d.ts +1614 -0
  170. package/dist/types/__VUE/pagination/index.d.ts +112 -0
  171. package/dist/types/__VUE/picker/Column.d.ts +90 -0
  172. package/dist/types/__VUE/picker/index.d.ts +342 -0
  173. package/dist/types/__VUE/picker/types.d.ts +26 -0
  174. package/dist/types/__VUE/popover/index.d.ts +233 -0
  175. package/dist/types/__VUE/popup/index.d.ts +1734 -0
  176. package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
  177. package/dist/types/__VUE/price/index.d.ts +87 -0
  178. package/dist/types/__VUE/progress/index.d.ts +137 -0
  179. package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
  180. package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
  181. package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
  182. package/dist/types/__VUE/radio/index.d.ts +90 -0
  183. package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
  184. package/dist/types/__VUE/range/index.d.ts +156 -0
  185. package/dist/types/__VUE/rate/index.d.ts +142 -0
  186. package/dist/types/__VUE/row/index.d.ts +63 -0
  187. package/dist/types/__VUE/searchbar/index.d.ts +100 -0
  188. package/dist/types/__VUE/shortpassword/index.d.ts +136 -0
  189. package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
  190. package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
  191. package/dist/types/__VUE/signature/index.d.ts +73 -0
  192. package/dist/types/__VUE/skeleton/common.d.ts +63 -0
  193. package/dist/types/__VUE/skeleton/index.d.ts +117 -0
  194. package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
  195. package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
  196. package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
  197. package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
  198. package/dist/types/__VUE/sku/index.d.ts +300 -0
  199. package/dist/types/__VUE/step/index.d.ts +70 -0
  200. package/dist/types/__VUE/steps/index.d.ts +47 -0
  201. package/dist/types/__VUE/sticky/index.d.ts +63 -0
  202. package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
  203. package/dist/types/__VUE/swipe/index.d.ts +69 -0
  204. package/dist/types/__VUE/swiper/index.d.ts +163 -0
  205. package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
  206. package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
  207. package/dist/types/__VUE/switch/index.d.ts +136 -0
  208. package/dist/types/__VUE/tabbar/index.d.ts +84 -0
  209. package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
  210. package/dist/types/__VUE/table/common.d.ts +54 -0
  211. package/dist/types/__VUE/table/index.d.ts +75 -0
  212. package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
  213. package/dist/types/__VUE/table/types.d.ts +19 -0
  214. package/dist/types/__VUE/tabpane/index.d.ts +47 -0
  215. package/dist/types/__VUE/tabs/index.d.ts +128 -0
  216. package/dist/types/__VUE/tag/index.d.ts +89 -0
  217. package/dist/types/__VUE/textarea/index.d.ts +120 -0
  218. package/dist/types/__VUE/timedetail/index.d.ts +48 -0
  219. package/dist/types/__VUE/timepannel/index.d.ts +43 -0
  220. package/dist/types/__VUE/timeselect/index.d.ts +82 -0
  221. package/dist/types/__VUE/toast/index.d.ts +149 -0
  222. package/dist/types/__VUE/uploader/index.d.ts +258 -0
  223. package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
  224. package/dist/types/__VUE/video/index.d.ts +123 -0
  225. package/dist/{index.d.ts → types/index.d.ts} +0 -0
  226. package/dist/types/nutui.d.ts +92 -0
  227. package/package.json +14 -5
  228. package/dist/nutui.d.ts +0 -104
  229. package/dist/packages/_es/use-lock-scroll.js +0 -23
  230. package/dist/packages/_es/util.js +0 -47
@@ -1,13 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
20
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
3
22
  * (c) 2022 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
6
- import { watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, vShow } from "vue";
25
+ import { reactive, onMounted, watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, vShow, createVNode, render } from "vue";
7
26
  import { c as createComponent } from "./component.js";
8
27
  import Popup from "./Popup.js";
9
28
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
- import "./use-lock-scroll.js";
11
29
  import "./OverLay.js";
12
30
  import "./Icon.js";
13
31
  import "./pxCheck.js";
@@ -30,16 +48,28 @@ const _sfc_main = create({
30
48
  type: String,
31
49
  default: "danger"
32
50
  },
33
- visible: {
51
+ showPopup: {
34
52
  type: Boolean,
35
53
  default: false
36
- }
54
+ },
55
+ position: {
56
+ type: String,
57
+ default: "top"
58
+ },
59
+ onClose: Function,
60
+ onClick: Function,
61
+ unmount: Function
37
62
  },
38
- emits: ["update:visible", "closed", "click"],
39
- setup(props, { emit }) {
63
+ setup(props, { slots }) {
40
64
  let timer = null;
41
- const onClick = () => {
42
- emit("click");
65
+ const state = reactive({
66
+ mounted: false
67
+ });
68
+ onMounted(() => {
69
+ state.mounted = true;
70
+ });
71
+ const clickCover = () => {
72
+ props.onClick && props.onClick();
43
73
  };
44
74
  const clearTimer = () => {
45
75
  if (timer) {
@@ -48,14 +78,8 @@ const _sfc_main = create({
48
78
  }
49
79
  };
50
80
  const hide = () => {
51
- emit("update:visible", false);
52
- emit("closed");
81
+ state.mounted = false;
53
82
  };
54
- watch(() => props.visible, (value) => {
55
- if (value) {
56
- show();
57
- }
58
- });
59
83
  const show = () => {
60
84
  clearTimer();
61
85
  if (props.duration) {
@@ -64,35 +88,150 @@ const _sfc_main = create({
64
88
  }, props.duration);
65
89
  }
66
90
  };
67
- const onAfterLeave = () => {
68
- if (props.visible) {
69
- clearTimer();
70
- hide();
91
+ if (props.duration) {
92
+ show();
93
+ }
94
+ watch(() => props.duration, (val) => {
95
+ if (val) {
96
+ show();
71
97
  }
98
+ });
99
+ const onAfterLeave = () => {
100
+ clearTimer();
101
+ props.unmount && props.unmount(props.id);
102
+ props.onClose && props.onClose();
72
103
  };
73
- return { hide, onAfterLeave, onClick };
104
+ return { state, hide, onAfterLeave, clickCover };
74
105
  }
75
106
  });
76
107
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
77
108
  return openBlock(), createBlock(Transition, {
78
- name: "nut-fade",
109
+ name: "toast-fade",
79
110
  onAfterLeave: _ctx.onAfterLeave
80
111
  }, {
81
112
  default: withCtx(() => [
82
113
  withDirectives(createElementVNode("view", {
83
- class: normalizeClass(["popup-top", "nut-notify", `nut-notify--${_ctx.type}`, { className: _ctx.className }]),
114
+ class: normalizeClass([`popup-${_ctx.position}`, "nut-notify", `nut-notify--${_ctx.type}`, [_ctx.className]]),
84
115
  style: normalizeStyle({ color: _ctx.color, background: _ctx.background }),
85
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
116
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
86
117
  }, [
87
118
  _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
88
119
  createTextVNode(toDisplayString(_ctx.msg), 1)
89
120
  ], 64))
90
121
  ], 6), [
91
- [vShow, _ctx.visible]
122
+ [vShow, _ctx.state.mounted]
92
123
  ])
93
124
  ]),
94
125
  _: 3
95
126
  }, 8, ["onAfterLeave"]);
96
127
  }
97
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
98
- export { index_taro as default };
128
+ var Notify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
129
+ const defaultOptions = {
130
+ type: "base",
131
+ showPopup: false,
132
+ msg: "",
133
+ color: void 0,
134
+ background: void 0,
135
+ duration: 3e3,
136
+ className: "",
137
+ onClosed: null,
138
+ onClick: null,
139
+ onOpened: null,
140
+ textTimer: null,
141
+ unmount: null
142
+ };
143
+ let idsMap = [];
144
+ let optsMap = [];
145
+ const clearNotify = (id) => {
146
+ if (id) {
147
+ const container = document.getElementById(id);
148
+ optsMap = optsMap.filter((item) => item.id !== id);
149
+ idsMap = idsMap.filter((item) => item !== id);
150
+ if (container) {
151
+ document.body.removeChild(container);
152
+ }
153
+ } else {
154
+ idsMap.forEach((item) => {
155
+ const container = document.getElementById(item);
156
+ if (container) {
157
+ document.body.removeChild(container);
158
+ }
159
+ });
160
+ optsMap = [];
161
+ idsMap = [];
162
+ }
163
+ };
164
+ const updateNotify = (opts) => {
165
+ const container = document.getElementById(opts.id);
166
+ if (container) {
167
+ const currentOpt = optsMap.find((item) => item.id === opts.id);
168
+ if (currentOpt) {
169
+ opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
170
+ } else {
171
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
172
+ }
173
+ const instance = createVNode(Notify, opts);
174
+ render(instance, container);
175
+ return instance.component.ctx;
176
+ }
177
+ };
178
+ const mountNotify = (opts) => {
179
+ opts.unmount = clearNotify;
180
+ let _id;
181
+ if (opts.id) {
182
+ _id = opts.id;
183
+ if (idsMap.find((item) => item === opts.id)) {
184
+ return updateNotify(opts);
185
+ }
186
+ } else {
187
+ _id = new Date().getTime() + "";
188
+ }
189
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
190
+ opts.id = _id;
191
+ idsMap.push(opts.id);
192
+ optsMap.push(opts);
193
+ const container = document.createElement("view");
194
+ container.id = opts.id;
195
+ const instance = createVNode(Notify, opts);
196
+ render(instance, container);
197
+ document.body.appendChild(container);
198
+ setTimeout(() => {
199
+ instance.showPopup = true;
200
+ }, 0);
201
+ return instance.component.ctx;
202
+ };
203
+ const errorMsg = (msg) => {
204
+ if (!msg) {
205
+ console.warn("[NutUI Notify]: msg\u4E0D\u80FD\u4E3A\u7A7A");
206
+ return;
207
+ }
208
+ };
209
+ const NotifyFunction = {
210
+ text(msg, obj = {}) {
211
+ errorMsg(msg);
212
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
213
+ },
214
+ primary(msg, obj = {}) {
215
+ errorMsg(msg);
216
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
217
+ },
218
+ success(msg, obj = {}) {
219
+ errorMsg(msg);
220
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
221
+ },
222
+ danger(msg, obj = {}) {
223
+ errorMsg(msg);
224
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
225
+ },
226
+ warn(msg, obj = {}) {
227
+ errorMsg(msg);
228
+ return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
229
+ },
230
+ hide() {
231
+ clearNotify();
232
+ },
233
+ install(app) {
234
+ app.config.globalProperties.$notify = NotifyFunction;
235
+ }
236
+ };
237
+ export { Notify, NotifyFunction, NotifyFunction as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.2 Thu Apr 07 2022 17:52:31 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -9,6 +9,10 @@ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  const { create } = createComponent("numberkeyboard");
10
10
  const _sfc_main = create({
11
11
  props: {
12
+ confirmText: {
13
+ type: String,
14
+ default: "\u5B8C\u6210"
15
+ },
12
16
  title: {
13
17
  type: String,
14
18
  default: ""
@@ -40,6 +44,10 @@ const _sfc_main = create({
40
44
  overlay: {
41
45
  type: Boolean,
42
46
  default: true
47
+ },
48
+ isWrapTeleport: {
49
+ type: Boolean,
50
+ default: true
43
51
  }
44
52
  },
45
53
  emits: ["input", "delete", "close", "update:value"],
@@ -117,7 +125,8 @@ const _sfc_main = create({
117
125
  function onTouchMove(id, event) {
118
126
  event.stopPropagation();
119
127
  }
120
- function onTouchEnd() {
128
+ function onTouchEnd(event) {
129
+ event.preventDefault();
121
130
  clickKeyIndex.value = void 0;
122
131
  }
123
132
  function closeBoard() {
@@ -177,6 +186,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
177
186
  position: "bottom",
178
187
  overlay: _ctx.overlay,
179
188
  onClickOverlay: _cache[7] || (_cache[7] = ($event) => _ctx.closeBoard()),
189
+ isWrapTeleport: _ctx.isWrapTeleport,
180
190
  "overlay-class": "nut-numberkeyboard-overlay"
181
191
  }, {
182
192
  default: withCtx(() => [
@@ -209,7 +219,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
209
219
  ]),
210
220
  onTouchstart: (event) => _ctx.onTouchstart(item, event),
211
221
  onTouchmove: (event) => _ctx.onTouchMove(item, event),
212
- onTouchend: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
222
+ onTouchend: _cache[1] || (_cache[1] = (event) => _ctx.onTouchEnd(event))
213
223
  }, [
214
224
  item.type == "number" || item.type == "custom" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
215
225
  createTextVNode(toDisplayString(item.id), 1)
@@ -231,19 +241,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
231
241
  ]),
232
242
  _ctx.title == "" ? (openBlock(), createElementBlock("div", {
233
243
  key: 0,
234
- class: "key-board-wrapper",
244
+ class: "key-board-wrapper key-board-finish",
235
245
  onClick: _cache[5] || (_cache[5] = ($event) => _ctx.closeBoard())
236
246
  }, [
237
247
  createElementVNode("div", {
238
248
  class: normalizeClass(["key", "finish", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
239
- }, " \u5B8C\u6210 ", 2)
249
+ }, toDisplayString(_ctx.confirmText), 3)
240
250
  ])) : createCommentVNode("", true)
241
251
  ])) : createCommentVNode("", true)
242
252
  ])
243
253
  ], 512)
244
254
  ]),
245
255
  _: 1
246
- }, 8, ["visible", "overlay"]);
256
+ }, 8, ["visible", "overlay", "isWrapTeleport"]);
247
257
  }
248
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
249
- export { index_taro as default };
258
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
259
+ export { index as default };