@nutui/nutui 4.1.5-beta.1 → 4.1.5-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 (40) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.js +1575 -1543
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/ActionSheet.js +3 -2
  5. package/dist/packages/_es/Address.js +2 -2
  6. package/dist/packages/_es/AddressList.js +3 -3
  7. package/dist/packages/_es/AvatarGroup.js +2 -2
  8. package/dist/packages/_es/Calendar.js +7 -2
  9. package/dist/packages/_es/CalendarItem.js +1 -1
  10. package/dist/packages/_es/Cascader.js +4 -4
  11. package/dist/packages/_es/ConfigProvider.js +57 -66
  12. package/dist/packages/_es/Countdown.js +15 -1
  13. package/dist/packages/_es/DatePicker.js +8 -8
  14. package/dist/packages/_es/ImagePreview.js +8 -8
  15. package/dist/packages/_es/Input.js +2 -2
  16. package/dist/packages/_es/Invoice.js +7 -1
  17. package/dist/packages/_es/MenuItem.js +4 -4
  18. package/dist/packages/_es/Navbar.js +15 -1
  19. package/dist/packages/_es/Notify.js +2 -2
  20. package/dist/packages/_es/NumberKeyboard.js +8 -3
  21. package/dist/packages/_es/Popover.js +5 -5
  22. package/dist/packages/_es/ShortPassword.js +7 -2
  23. package/dist/packages/_es/Sku.js +15 -14
  24. package/dist/packages/_es/TimeSelect.js +2 -2
  25. package/dist/packages/_es/Tour.js +4 -4
  26. package/dist/packages/_es/{index-ae1af668.js → index-7fdbc8f1.js} +3 -0
  27. package/dist/smartips/web-types.json +2 -2
  28. package/dist/style.css +1 -1
  29. package/dist/styles/themes/default.scss +51 -51
  30. package/dist/styles/themes/jdb.scss +51 -51
  31. package/dist/styles/themes/jddkh.scss +51 -51
  32. package/dist/styles/themes/jdt.scss +51 -51
  33. package/dist/types/__VUE/calendar/index.vue.d.ts +9 -0
  34. package/dist/types/__VUE/configprovider/common.d.ts +19 -0
  35. package/dist/types/__VUE/countdown/index.vue.d.ts +4 -1
  36. package/dist/types/__VUE/invoice/index.vue.d.ts +2 -1
  37. package/dist/types/__VUE/navbar/index.vue.d.ts +5 -1
  38. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +9 -0
  39. package/dist/types/__VUE/shortpassword/index.vue.d.ts +9 -0
  40. package/package.json +1 -1
@@ -129,7 +129,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
129
129
  visible: _ctx.visible,
130
130
  position: "bottom",
131
131
  round: "",
132
- closeOnClickOverlay: _ctx.closeAbled,
132
+ "close-on-click-overlay": _ctx.closeAbled,
133
+ "lock-scroll": _ctx.lockScroll,
133
134
  onClickOverlay: _ctx.close
134
135
  }, {
135
136
  default: withCtx(() => [
@@ -168,7 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
168
169
  ], 2)
169
170
  ]),
170
171
  _: 3
171
- }, 8, ["visible", "closeOnClickOverlay", "onClickOverlay"]);
172
+ }, 8, ["visible", "close-on-click-overlay", "lock-scroll", "onClickOverlay"]);
172
173
  }
173
174
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
174
175
  export {
@@ -394,7 +394,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
394
394
  position: "bottom",
395
395
  "lock-scroll": _ctx.lockScroll,
396
396
  round: _ctx.round,
397
- teleportDisable: _ctx.teleportDisable,
397
+ "teleport-disable": _ctx.teleportDisable,
398
398
  teleport: _ctx.teleport,
399
399
  onClose: _ctx.close,
400
400
  onClickOverlay: _ctx.clickOverlay,
@@ -518,7 +518,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
518
518
  ])
519
519
  ]),
520
520
  _: 3
521
- }, 8, ["visible", "lock-scroll", "round", "teleportDisable", "teleport", "onClose", "onClickOverlay"]);
521
+ }, 8, ["visible", "lock-scroll", "round", "teleport-disable", "teleport", "onClose", "onClickOverlay"]);
522
522
  }
523
523
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
524
524
  export {
@@ -413,8 +413,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
413
413
  return openBlock(), createBlock(_component_general_shell, {
414
414
  key: index2,
415
415
  item,
416
- longPress: _ctx.longPress,
417
- swipeEdition: _ctx.swipeEdition,
416
+ "long-press": _ctx.longPress,
417
+ "swipe-edition": _ctx.swipeEdition,
418
418
  onDelIcon: _ctx.clickDelIcon,
419
419
  onEditIcon: _ctx.clickEditIcon,
420
420
  onClickItem: _ctx.clickContentItem,
@@ -448,7 +448,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
448
448
  ]),
449
449
  key: "1"
450
450
  } : void 0
451
- ]), 1032, ["item", "longPress", "swipeEdition", "onDelIcon", "onEditIcon", "onClickItem", "onSwipeDel", "onLongCopy", "onLongSet", "onLongDel"]);
451
+ ]), 1032, ["item", "long-press", "swipe-edition", "onDelIcon", "onEditIcon", "onClickItem", "onSwipeDel", "onLongCopy", "onLongSet", "onLongDel"]);
452
452
  }), 128)),
453
453
  _ctx.showBottomButton ? (openBlock(), createElementBlock("div", {
454
454
  key: 0,
@@ -129,7 +129,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
129
129
  key: 0,
130
130
  class: "avater-fold",
131
131
  color: _ctx.maxColor,
132
- bgColor: _ctx.maxBgColor,
132
+ "bg-color": _ctx.maxBgColor,
133
133
  size: _ctx.size,
134
134
  shape: _ctx.shape,
135
135
  style: normalizeStyle({ magrinLeft: `${_ctx.span}px` })
@@ -138,7 +138,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
138
138
  createTextVNode(toDisplayString(_ctx.maxContent || _ctx.foldCount), 1)
139
139
  ]),
140
140
  _: 1
141
- }, 8, ["color", "bgColor", "size", "shape", "style"])) : createCommentVNode("", true)
141
+ }, 8, ["color", "bg-color", "size", "shape", "style"])) : createCommentVNode("", true)
142
142
  ], 4);
143
143
  }
144
144
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -1,6 +1,6 @@
1
1
  import { computed, ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createSlots, renderSlot } from "vue";
2
2
  import { c as createComponent } from "./component-0fbad28e.js";
3
- import { C as CalendarItem, U as Utils } from "./index-ae1af668.js";
3
+ import { C as CalendarItem, U as Utils } from "./index-7fdbc8f1.js";
4
4
  import { P as Popup } from "./index-3032df15.js";
5
5
  import { u as useExpose } from "./index-79c5dc33.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -78,6 +78,10 @@ const _sfc_main = create({
78
78
  type: Number,
79
79
  default: 0,
80
80
  validator: (val) => val >= 0 && val <= 6
81
+ },
82
+ lockScroll: {
83
+ type: Boolean,
84
+ default: true
81
85
  }
82
86
  },
83
87
  emits: ["choose", "close", "update:visible", "select"],
@@ -149,6 +153,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
149
153
  closeable: ""
150
154
  }, _ctx.$attrs, {
151
155
  style: { height: "85vh" },
156
+ "lock-scroll": _ctx.lockScroll,
152
157
  onClickOverlay: _ctx.closePopup,
153
158
  onClickCloseIcon: _ctx.closePopup
154
159
  }), {
@@ -212,7 +217,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
212
217
  ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "default-value", "start-date", "end-date", "confirm-text", "start-text", "end-text", "show-today", "show-title", "show-sub-title", "to-date-animation", "first-day-of-week", "onUpdate", "onClose", "onChoose", "onSelect"])
213
218
  ]),
214
219
  _: 3
215
- }, 16, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
220
+ }, 16, ["visible", "lock-scroll", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
216
221
  key: 1,
217
222
  ref: "calendarRef",
218
223
  type: _ctx.type,
@@ -1,4 +1,4 @@
1
- import { C } from "./index-ae1af668.js";
1
+ import { C } from "./index-7fdbc8f1.js";
2
2
  import "vue";
3
3
  import "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "./component-0fbad28e.js";
@@ -583,7 +583,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
583
583
  innerHTML: _ctx.title
584
584
  }, null, 8, _hoisted_1)) : createCommentVNode("", true),
585
585
  createVNode(_component_nut_cascader_item, {
586
- modelValue: _ctx.innerValue,
586
+ "model-value": _ctx.innerValue,
587
587
  options: _ctx.options,
588
588
  lazy: _ctx.lazy,
589
589
  "lazy-load": _ctx.lazyLoad,
@@ -594,12 +594,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
594
594
  visible: _ctx.innerVisible,
595
595
  onChange: _ctx.onChange,
596
596
  onPathChange: _ctx.onPathChange
597
- }, null, 8, ["modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible", "onChange", "onPathChange"])
597
+ }, null, 8, ["model-value", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible", "onChange", "onPathChange"])
598
598
  ]),
599
599
  _: 1
600
600
  }, 8, ["visible", "closeable", "close-icon-position"])) : (openBlock(), createBlock(_component_nut_cascader_item, {
601
601
  key: 1,
602
- modelValue: _ctx.innerValue,
602
+ "model-value": _ctx.innerValue,
603
603
  options: _ctx.options,
604
604
  lazy: _ctx.lazy,
605
605
  "lazy-load": _ctx.lazyLoad,
@@ -610,7 +610,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
610
610
  visible: _ctx.innerVisible,
611
611
  onChange: _ctx.onChange,
612
612
  onPathChange: _ctx.onPathChange
613
- }, null, 8, ["modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible", "onChange", "onPathChange"]));
613
+ }, null, 8, ["model-value", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible", "onChange", "onPathChange"]));
614
614
  }
615
615
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
616
616
  export {
@@ -1,75 +1,66 @@
1
1
  import { c as createComponent } from "./component-0fbad28e.js";
2
- import { h } from "vue";
2
+ import { computed, h } from "vue";
3
3
  import "../locale/lang";
4
- const { create } = createComponent("config-provider");
5
- const _sfc_main = create({
6
- props: {
7
- theme: { type: String, default: "" },
8
- themeVars: { type: Object, default: {} },
9
- tag: { type: String, default: "div" }
10
- },
11
- setup(props, { slots }) {
12
- const kebabCase = (str) => {
13
- str = str.replace(str.charAt(0), str.charAt(0).toLocaleLowerCase());
14
- return str.replace(/([a-z])([A-Z])/g, (_, p1, p2) => p1 + "-" + p2.toLowerCase());
15
- };
16
- const colorRgb = (str) => {
17
- if (!str)
18
- return;
19
- var sColor = str.toLowerCase();
20
- var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
21
- if (sColor && reg.test(sColor)) {
22
- if (sColor.length === 4) {
23
- var sColorNew = "#";
24
- for (let i = 1; i < 4; i += 1) {
25
- sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
26
- }
27
- sColor = sColorNew;
4
+ const component = (tag) => {
5
+ return {
6
+ props: {
7
+ theme: { type: String, default: "" },
8
+ themeVars: { type: Object, default: {} },
9
+ tag: { type: String, default: tag }
10
+ },
11
+ setup(props, { slots }) {
12
+ var _a;
13
+ const hexToRgb = (color) => {
14
+ const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
15
+ if (!reg.test(color))
16
+ return "";
17
+ color = color.toLowerCase();
18
+ if (color.length === 4) {
19
+ color = "#" + color.slice(1).split("").map((char) => char + char).join("");
28
20
  }
29
- var sColorChange = [];
21
+ const colors = [];
30
22
  for (let i = 1; i < 7; i += 2) {
31
- sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
23
+ colors.push(parseInt("0x" + color.slice(i, i + 2)));
32
24
  }
33
- return sColorChange.join(",");
34
- }
35
- return null;
36
- };
37
- const mapThemeVarsToCSSVars = (themeVars) => {
38
- var _a;
39
- if (!themeVars)
40
- return;
41
- const cssVars = {};
42
- const primaryColor = (_a = props == null ? void 0 : props.themeVars) == null ? void 0 : _a.primaryColor;
43
- if (primaryColor) {
44
- cssVars[`--nut-address-region-tab-line`] = `linear-gradient(90deg, ${primaryColor} 0%, rgba(${colorRgb(
45
- primaryColor
46
- )},0.15) 100%) `;
47
- cssVars[`--nut-tabs-horizontal-tab-line-color`] = `linear-gradient(90deg, ${primaryColor} 0%, rgba(${colorRgb(
48
- primaryColor
49
- )},0.15)100%)`;
50
- cssVars[`--nut-tabs-vertical-tab-line-color`] = `linear-gradient(180deg, ${primaryColor} 0%, rgba(${colorRgb(
51
- primaryColor
52
- )},0.15) 100%) `;
53
- }
54
- Object.keys(themeVars).forEach((key) => {
55
- cssVars[`--nut-${kebabCase(key)}`] = themeVars[key];
56
- });
57
- return cssVars;
58
- };
59
- return () => {
60
- var _a;
25
+ return colors.join(",");
26
+ };
27
+ const kebabCase = (str) => {
28
+ str = str.replace(str.charAt(0), str.charAt(0).toLocaleLowerCase());
29
+ return str.replace(/([a-z])([A-Z])/g, (_, p1, p2) => p1 + "-" + p2.toLowerCase());
30
+ };
31
+ const mapThemeVarsToCSSVars = (themeVars) => {
32
+ if (!themeVars)
33
+ return;
34
+ const cssVars = {};
35
+ const primaryColor = themeVars == null ? void 0 : themeVars.primaryColor;
36
+ if (primaryColor) {
37
+ const primaryColorRgb = hexToRgb(primaryColor);
38
+ cssVars["--nut-address-region-tab-line"] = `linear-gradient(90deg, ${primaryColor} 0%, rgba(${primaryColorRgb}, 0.15) 100%)`;
39
+ cssVars["--nut-tabs-horizontal-tab-line-color"] = `linear-gradient(90deg, ${primaryColor} 0%, rgba(${primaryColorRgb}, 0.15) 100%)`;
40
+ cssVars["--nut-tabs-vertical-tab-line-color"] = `linear-gradient(180deg, ${primaryColor} 0%, rgba(${primaryColorRgb}, 0.15) 100%)`;
41
+ }
42
+ Object.keys(themeVars).forEach((key) => {
43
+ cssVars[`--nut-${kebabCase(key)}`] = themeVars[key];
44
+ });
45
+ return cssVars;
46
+ };
47
+ const themeStyle = computed(() => mapThemeVarsToCSSVars(props.themeVars));
61
48
  const defaultSlots = (_a = slots.default) == null ? void 0 : _a.call(slots);
62
- return h(
63
- props.tag,
64
- {
65
- class: `nut-theme-${props.theme}`,
66
- style: mapThemeVarsToCSSVars(props.themeVars)
67
- },
68
- defaultSlots
69
- );
70
- };
71
- }
72
- });
49
+ return () => {
50
+ return h(
51
+ props.tag,
52
+ {
53
+ class: `nut-theme-${props.theme}`,
54
+ style: themeStyle.value
55
+ },
56
+ defaultSlots
57
+ );
58
+ };
59
+ }
60
+ };
61
+ };
62
+ const { create } = createComponent("config-provider");
63
+ const _sfc_main = create(component("div"));
73
64
  export {
74
65
  _sfc_main as default
75
66
  };
@@ -76,7 +76,17 @@ const _sfc_main = create({
76
76
  default: 0
77
77
  }
78
78
  },
79
- emits: ["input", "onEnd", "onRestart", "onPaused", "update:modelValue"],
79
+ emits: [
80
+ "input",
81
+ "update:modelValue",
82
+ "end",
83
+ "restart",
84
+ "paused",
85
+ // will be deprecated
86
+ "onEnd",
87
+ "onRestart",
88
+ "onPaused"
89
+ ],
80
90
  setup(props, { emit, slots }) {
81
91
  const state = reactive({
82
92
  restTime: 0,
@@ -115,6 +125,7 @@ const _sfc_main = create({
115
125
  if (!remainTime) {
116
126
  state.counting = false;
117
127
  pause();
128
+ emit("end");
118
129
  emit("onEnd");
119
130
  }
120
131
  if (remainTime > 0) {
@@ -186,12 +197,14 @@ const _sfc_main = create({
186
197
  state.counting = true;
187
198
  state.handleEndTime = Date.now() + Number(state.restTime);
188
199
  tick();
200
+ emit("restart", state.restTime);
189
201
  emit("onRestart", state.restTime);
190
202
  }
191
203
  };
192
204
  const pause = () => {
193
205
  cancelAnimationFrame(state.timer);
194
206
  state.counting = false;
207
+ emit("paused", state.restTime);
195
208
  emit("onPaused", state.restTime);
196
209
  };
197
210
  const reset = () => {
@@ -228,6 +241,7 @@ const _sfc_main = create({
228
241
  state.handleEndTime = Date.now() + Number(state.restTime);
229
242
  tick();
230
243
  }
244
+ emit("restart", state.restTime);
231
245
  emit("onRestart", state.restTime);
232
246
  }
233
247
  }
@@ -356,15 +356,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
356
356
  return openBlock(), createBlock(_component_nut_picker, {
357
357
  modelValue: _ctx.selectedValue,
358
358
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.selectedValue = $event),
359
- okText: _ctx.okText,
360
- cancelText: _ctx.cancelText,
359
+ "ok-text": _ctx.okText,
360
+ "cancel-text": _ctx.cancelText,
361
361
  columns: _ctx.columns,
362
362
  title: _ctx.title,
363
- threeDimensional: _ctx.threeDimensional,
364
- swipeDuration: _ctx.swipeDuration,
365
- showToolbar: _ctx.showToolbar,
366
- visibleOptionNum: _ctx.visibleOptionNum,
367
- optionHeight: _ctx.optionHeight,
363
+ "three-dimensional": _ctx.threeDimensional,
364
+ "swipe-duration": _ctx.swipeDuration,
365
+ "show-toolbar": _ctx.showToolbar,
366
+ "visible-option-num": _ctx.visibleOptionNum,
367
+ "option-height": _ctx.optionHeight,
368
368
  onCancel: _ctx.closeHandler,
369
369
  onChange: _ctx.changeHandler,
370
370
  onConfirm: _ctx.confirm
@@ -376,7 +376,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
376
376
  renderSlot(_ctx.$slots, "default")
377
377
  ]),
378
378
  _: 3
379
- }, 8, ["modelValue", "okText", "cancelText", "columns", "title", "threeDimensional", "swipeDuration", "showToolbar", "visibleOptionNum", "optionHeight", "onCancel", "onChange", "onConfirm"]);
379
+ }, 8, ["modelValue", "ok-text", "cancel-text", "columns", "title", "three-dimensional", "swipe-duration", "show-toolbar", "visible-option-num", "option-height", "onCancel", "onChange", "onConfirm"]);
380
380
  }
381
381
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
382
382
  export {
@@ -421,7 +421,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
421
421
  visible: _ctx.showPop,
422
422
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPop = $event),
423
423
  "pop-class": "nut-image-preview-custom-pop",
424
- teleportDisable: _ctx.teleportDisable,
424
+ "teleport-disable": _ctx.teleportDisable,
425
425
  teleport: _ctx.teleport,
426
426
  "lock-scroll": "",
427
427
  onClosed: _ctx.onClose
@@ -433,7 +433,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
433
433
  "auto-play": _ctx.autoplay,
434
434
  class: "nut-image-preview-swiper",
435
435
  loop: _ctx.isLoop,
436
- "is-preventDefault": false,
436
+ "is-prevent-default": false,
437
437
  direction: "horizontal",
438
438
  "init-page": _ctx.initNo,
439
439
  "pagination-visible": _ctx.paginationVisible,
@@ -446,15 +446,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
446
446
  key: index,
447
447
  video: index < _ctx.videos.length ? item : {},
448
448
  image: index >= _ctx.videos.length ? item : {},
449
- rootHeight: _ctx.rootHeight,
450
- rootWidth: _ctx.rootWidth,
449
+ "root-height": _ctx.rootHeight,
450
+ "root-width": _ctx.rootWidth,
451
451
  show: _ctx.showPop,
452
452
  "init-no": _ctx.active + 1,
453
453
  "content-close": _ctx.contentClose,
454
- maxZoom: _ctx.maxZoom,
455
- minZoom: _ctx.minZoom,
454
+ "max-zoom": _ctx.maxZoom,
455
+ "min-zoom": _ctx.minZoom,
456
456
  onClose: _ctx.onClose
457
- }, null, 8, ["video", "image", "rootHeight", "rootWidth", "show", "init-no", "content-close", "maxZoom", "minZoom", "onClose"]);
457
+ }, null, 8, ["video", "image", "root-height", "root-width", "show", "init-no", "content-close", "max-zoom", "min-zoom", "onClose"]);
458
458
  }), 128))
459
459
  ]),
460
460
  _: 1
@@ -472,7 +472,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
472
472
  ], 2)) : createCommentVNode("", true)
473
473
  ]),
474
474
  _: 3
475
- }, 8, ["visible", "teleportDisable", "teleport", "onClosed"]);
475
+ }, 8, ["visible", "teleport-disable", "teleport", "onClosed"]);
476
476
  }
477
477
  const ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
478
478
  class ImagePreviewOptions {
@@ -332,7 +332,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
332
332
  disabled: _ctx.disabled,
333
333
  readonly: _ctx.readonly,
334
334
  value: _ctx.modelValue,
335
- formatTrigger: _ctx.formatTrigger,
335
+ "format-trigger": _ctx.formatTrigger,
336
336
  autofocus: _ctx.autofocus,
337
337
  enterkeyhint: _ctx.confirmType,
338
338
  onInput: _ctx.onInput,
@@ -342,7 +342,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
342
342
  onChange: _ctx.endComposing,
343
343
  onCompositionend: _ctx.endComposing,
344
344
  onCompositionstart: _ctx.startComposing
345
- }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
345
+ }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "format-trigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
346
346
  _ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_5, [
347
347
  createElementVNode("span", _hoisted_6, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
348
348
  createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
@@ -54,7 +54,12 @@ const _sfc_main = create({
54
54
  default: true
55
55
  }
56
56
  },
57
- emits: ["onSubmit", "scrollBottom"],
57
+ emits: [
58
+ "submit",
59
+ "scrollBottom",
60
+ // will be deprecated
61
+ "onSubmit"
62
+ ],
58
63
  setup(props, { emit }) {
59
64
  const formRef = ref();
60
65
  const list = ref([]);
@@ -75,6 +80,7 @@ const _sfc_main = create({
75
80
  };
76
81
  const submitFun = () => {
77
82
  formRef.value.validate().then(({ valid, errors }) => {
83
+ emit("submit", valid, errors);
78
84
  emit("onSubmit", valid, errors);
79
85
  });
80
86
  };
@@ -148,13 +148,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
148
148
  visible: _ctx.state.showPopup,
149
149
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
150
150
  style: { position: "absolute" },
151
- overlayStyle: { position: "absolute" },
151
+ "overlay-style": { position: "absolute" },
152
152
  position: _ctx.parent.props.direction === "down" ? "top" : "bottom",
153
153
  duration: _ctx.parent.props.duration,
154
154
  "destroy-on-close": false,
155
155
  overlay: _ctx.parent.props.overlay,
156
- lockScroll: _ctx.parent.props.lockScroll,
157
- teleportDisable: false,
156
+ "lock-scroll": _ctx.parent.props.lockScroll,
157
+ "teleport-disable": false,
158
158
  "close-on-click-overlay": _ctx.parent.props.closeOnClickOverlay,
159
159
  onClosed: _ctx.handleClose
160
160
  }), {
@@ -187,7 +187,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
187
187
  ])
188
188
  ]),
189
189
  _: 3
190
- }, 16, ["visible", "position", "duration", "overlay", "lockScroll", "close-on-click-overlay", "onClosed"])
190
+ }, 16, ["visible", "position", "duration", "overlay", "lock-scroll", "close-on-click-overlay", "onClosed"])
191
191
  ], 4)), [
192
192
  [vShow, _ctx.state.showWrapper]
193
193
  ]);
@@ -39,7 +39,17 @@ const _sfc_main = create({
39
39
  default: 10
40
40
  }
41
41
  },
42
- emits: ["onClickBack", "onClickTitle", "onClickIcon", "onClickRight"],
42
+ emits: [
43
+ "clickBack",
44
+ "clickTitle",
45
+ "clickIcon",
46
+ "clickRight",
47
+ // will be deprecated
48
+ "onClickBack",
49
+ "onClickTitle",
50
+ "onClickIcon",
51
+ "onClickRight"
52
+ ],
43
53
  setup(props, { emit }) {
44
54
  const { border, fixed, safeAreaInsetTop, placeholder } = toRefs(props);
45
55
  const navHeight = ref("auto");
@@ -75,15 +85,19 @@ const _sfc_main = create({
75
85
  }
76
86
  });
77
87
  const handleLeft = () => {
88
+ emit("clickBack");
78
89
  emit("onClickBack");
79
90
  };
80
91
  const handleCenter = () => {
92
+ emit("clickTitle");
81
93
  emit("onClickTitle");
82
94
  };
83
95
  const handleCenterIcon = () => {
96
+ emit("clickIcon");
84
97
  emit("onClickIcon");
85
98
  };
86
99
  const handleRight = () => {
100
+ emit("clickRight");
87
101
  emit("onClickRight");
88
102
  };
89
103
  return {
@@ -102,7 +102,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
102
102
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.isShowPopup = $event),
103
103
  position: _ctx.position,
104
104
  overlay: false,
105
- teleportDisable: _ctx.teleportDisable
105
+ "teleport-disable": _ctx.teleportDisable
106
106
  }, {
107
107
  default: withCtx(() => [
108
108
  createElementVNode("div", {
@@ -116,7 +116,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
116
116
  ], 6)
117
117
  ]),
118
118
  _: 3
119
- }, 8, ["visible", "position", "teleportDisable"]);
119
+ }, 8, ["visible", "position", "teleport-disable"]);
120
120
  }
121
121
  const Notify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
122
122
  const defaultOptions = {
@@ -46,6 +46,10 @@ const _sfc_main = create({
46
46
  popClass: {
47
47
  type: String,
48
48
  default: ""
49
+ },
50
+ lockScroll: {
51
+ type: Boolean,
52
+ default: true
49
53
  }
50
54
  },
51
55
  emits: ["input", "delete", "close", "blur", "update:modelValue", "update:visible"],
@@ -210,9 +214,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
210
214
  visible: _ctx.show,
211
215
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => _ctx.show = $event),
212
216
  position: "bottom",
213
- popClass: _ctx.popClass,
217
+ "pop-class": _ctx.popClass,
214
218
  overlay: false,
215
- teleportDisable: false
219
+ "lock-scroll": _ctx.lockScroll,
220
+ "teleport-disable": false
216
221
  }, {
217
222
  default: withCtx(() => [
218
223
  createElementVNode("div", _hoisted_2, [
@@ -278,7 +283,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
278
283
  ])
279
284
  ]),
280
285
  _: 1
281
- }, 8, ["visible", "popClass"])
286
+ }, 8, ["visible", "pop-class", "lock-scroll"])
282
287
  ], 512);
283
288
  }
284
289
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -236,15 +236,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
236
236
  createVNode(_component_nut_popup, {
237
237
  visible: _ctx.showPopup,
238
238
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.showPopup = $event),
239
- popClass: `nut-popover-content nut-popover-content--${_ctx.location}`,
239
+ "pop-class": `nut-popover-content nut-popover-content--${_ctx.location}`,
240
240
  style: normalizeStyle(_ctx.customStyle),
241
241
  position: "",
242
242
  transition: "nut-popover",
243
243
  overlay: _ctx.overlay,
244
244
  duration: _ctx.duration,
245
- overlayStyle: _ctx.overlayStyle,
246
- overlayClass: _ctx.overlayClass,
247
- closeOnClickOverlay: _ctx.closeOnClickOverlay
245
+ "overlay-style": _ctx.overlayStyle,
246
+ "overlay-class": _ctx.overlayClass,
247
+ "close-on-click-overlay": _ctx.closeOnClickOverlay
248
248
  }, {
249
249
  default: withCtx(() => [
250
250
  createElementVNode("view", _hoisted_1, [
@@ -270,7 +270,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
270
270
  ], 512)
271
271
  ]),
272
272
  _: 3
273
- }, 8, ["visible", "popClass", "style", "overlay", "duration", "overlayStyle", "overlayClass", "closeOnClickOverlay"])
273
+ }, 8, ["visible", "pop-class", "style", "overlay", "duration", "overlay-style", "overlay-class", "close-on-click-overlay"])
274
274
  ], 6)
275
275
  ], 64);
276
276
  }
@@ -44,6 +44,10 @@ const _sfc_main = create({
44
44
  type: [String, Number],
45
45
  //4~6
46
46
  default: 6
47
+ },
48
+ lockScroll: {
49
+ type: Boolean,
50
+ default: true
47
51
  }
48
52
  },
49
53
  emits: ["update:modelValue", "update:visible", "complete", "tips", "close", "focus"],
@@ -120,7 +124,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
120
124
  },
121
125
  closeable: true,
122
126
  "close-on-click-overlay": _ctx.closeOnClickOverlay,
123
- teleportDisable: false,
127
+ "teleport-disable": false,
128
+ "lock-scroll": _ctx.lockScroll,
124
129
  onClickCloseIcon: _ctx.close,
125
130
  onClickOverlay: _ctx.close
126
131
  }, {
@@ -157,7 +162,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
157
162
  ])
158
163
  ]),
159
164
  _: 1
160
- }, 8, ["visible", "close-on-click-overlay", "onClickCloseIcon", "onClickOverlay"])
165
+ }, 8, ["visible", "close-on-click-overlay", "lock-scroll", "onClickCloseIcon", "onClickOverlay"])
161
166
  ]);
162
167
  }
163
168
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);