@nutui/nutui 4.2.0 → 4.2.1

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 (69) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +4867 -4913
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +22 -29
  6. package/dist/packages/_es/Address.js +2 -1
  7. package/dist/packages/_es/Barrage.js +9 -14
  8. package/dist/packages/_es/Calendar.js +7 -4
  9. package/dist/packages/_es/CalendarItem.js +1 -1
  10. package/dist/packages/_es/Cascader.js +3 -2
  11. package/dist/packages/_es/Collapse.js +9 -14
  12. package/dist/packages/_es/DatePicker.js +1 -1
  13. package/dist/packages/_es/Dialog.js +11 -2
  14. package/dist/packages/_es/Drag.js +4 -11
  15. package/dist/packages/_es/Elevator.js +27 -43
  16. package/dist/packages/_es/Ellipsis.js +5 -11
  17. package/dist/packages/_es/Input.js +15 -7
  18. package/dist/packages/_es/List.js +4 -11
  19. package/dist/packages/_es/Noticebar.js +16 -24
  20. package/dist/packages/_es/Rate.js +5 -13
  21. package/dist/packages/_es/SideNavbar.js +10 -18
  22. package/dist/packages/_es/SideNavbarItem.js +6 -13
  23. package/dist/packages/_es/Sku.js +15 -29
  24. package/dist/packages/_es/SubSideNavbar.js +6 -13
  25. package/dist/packages/_es/Swiper.js +11 -10
  26. package/dist/packages/_es/SwiperItem.js +5 -12
  27. package/dist/packages/_es/Table.js +25 -37
  28. package/dist/packages/_es/TimeDetail.js +15 -26
  29. package/dist/packages/_es/TimeSelect.js +20 -29
  30. package/dist/packages/_es/TrendArrow.js +6 -13
  31. package/dist/packages/_es/{index-b53aec83.js → index-a187a5aa.js} +3 -2
  32. package/dist/packages/address/index.css +1 -1
  33. package/dist/packages/checkbox/index.css +1 -1
  34. package/dist/packages/checkbox/index.scss +1 -0
  35. package/dist/packages/elevator/index.css +1 -1
  36. package/dist/packages/elevator/index.scss +0 -13
  37. package/dist/packages/imagepreview/index.css +1 -1
  38. package/dist/packages/swiper/index.css +1 -1
  39. package/dist/packages/swiper/index.scss +0 -1
  40. package/dist/smartips/web-types.json +20 -2
  41. package/dist/style.css +1 -1
  42. package/dist/types/__VUE/actionsheet/index.vue.d.ts +0 -3
  43. package/dist/types/__VUE/barrage/index.vue.d.ts +0 -3
  44. package/dist/types/__VUE/calendar/index.vue.d.ts +4 -2
  45. package/dist/types/__VUE/calendaritem/index.vue.d.ts +3 -0
  46. package/dist/types/__VUE/collapse/index.vue.d.ts +0 -3
  47. package/dist/types/__VUE/dialog/index.d.ts +10 -8
  48. package/dist/types/__VUE/dialog/index.vue.d.ts +9 -0
  49. package/dist/types/__VUE/drag/index.vue.d.ts +0 -3
  50. package/dist/types/__VUE/elevator/index.vue.d.ts +0 -6
  51. package/dist/types/__VUE/ellipsis/index.vue.d.ts +0 -3
  52. package/dist/types/__VUE/imagepreview/index.d.ts +1 -0
  53. package/dist/types/__VUE/input/index.vue.d.ts +7 -4
  54. package/dist/types/__VUE/input/type.d.ts +5 -0
  55. package/dist/types/__VUE/list/index.vue.d.ts +0 -3
  56. package/dist/types/__VUE/noticebar/index.vue.d.ts +0 -20
  57. package/dist/types/__VUE/rate/index.vue.d.ts +3 -4
  58. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +0 -3
  59. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +0 -3
  60. package/dist/types/__VUE/sku/index.vue.d.ts +8 -176
  61. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +0 -3
  62. package/dist/types/__VUE/swiper/index.vue.d.ts +0 -3
  63. package/dist/types/__VUE/swiperitem/index.vue.d.ts +0 -3
  64. package/dist/types/__VUE/table/index.vue.d.ts +3 -6
  65. package/dist/types/__VUE/timedetail/index.vue.d.ts +4 -6
  66. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -5
  67. package/dist/types/__VUE/trendarrow/index.vue.d.ts +0 -3
  68. package/dist/types/index.d.ts +1 -1
  69. package/package.json +1 -1
@@ -18,13 +18,13 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { c as createComponent } from "./component-f86a70df.js";
21
- import { useSlots, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle } from "vue";
21
+ import { useSlots, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeClass, normalizeStyle } from "vue";
22
22
  import { P as Popup, p as popupProps } from "./index-5a1e6d22.js";
23
23
  import { Loading } from "@nutui/icons-vue";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
26
26
  import "./Overlay.js";
27
- const { componentName, create } = createComponent("action-sheet");
27
+ const { create } = createComponent("action-sheet");
28
28
  const _sfc_main = create({
29
29
  components: {
30
30
  [Popup.name]: Popup,
@@ -71,12 +71,6 @@ const _sfc_main = create({
71
71
  emits: ["cancel", "close", "choose", "update:visible"],
72
72
  setup(props, { emit }) {
73
73
  const slotDefault = !!useSlots().default;
74
- const classes = computed(() => {
75
- const prefixCls = componentName;
76
- return {
77
- [prefixCls]: true
78
- };
79
- });
80
74
  const isHighlight = (item) => {
81
75
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag] ? props.color : "";
82
76
  };
@@ -101,27 +95,27 @@ const _sfc_main = create({
101
95
  isHighlight,
102
96
  cancelActionSheet,
103
97
  chooseItem,
104
- close,
105
- classes
98
+ close
106
99
  };
107
100
  }
108
101
  });
109
- const _hoisted_1 = {
102
+ const _hoisted_1 = { class: "nut-action-sheet" };
103
+ const _hoisted_2 = {
110
104
  key: 0,
111
105
  class: "nut-action-sheet__title"
112
106
  };
113
- const _hoisted_2 = { key: 1 };
114
- const _hoisted_3 = {
107
+ const _hoisted_3 = { key: 1 };
108
+ const _hoisted_4 = {
115
109
  key: 0,
116
110
  class: "nut-action-sheet__item nut-action-sheet__desc"
117
111
  };
118
- const _hoisted_4 = {
112
+ const _hoisted_5 = {
119
113
  key: 1,
120
114
  class: "nut-action-sheet__menu"
121
115
  };
122
- const _hoisted_5 = ["onClick"];
123
- const _hoisted_6 = { key: 1 };
124
- const _hoisted_7 = { class: "nut-action-sheet__subdesc" };
116
+ const _hoisted_6 = ["onClick"];
117
+ const _hoisted_7 = { key: 1 };
118
+ const _hoisted_8 = { class: "nut-action-sheet__subdesc" };
125
119
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
126
120
  const _component_Loading = resolveComponent("Loading");
127
121
  const _component_nut_popup = resolveComponent("nut-popup");
@@ -131,17 +125,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
131
125
  round: "",
132
126
  "close-on-click-overlay": _ctx.closeAbled,
133
127
  "lock-scroll": _ctx.lockScroll,
128
+ "z-index": _ctx.zIndex,
134
129
  onClickOverlay: _ctx.close
135
130
  }, {
136
131
  default: withCtx(() => [
137
- createElementVNode("view", {
138
- class: normalizeClass(_ctx.classes)
139
- }, [
140
- _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
132
+ createElementVNode("view", _hoisted_1, [
133
+ _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
141
134
  renderSlot(_ctx.$slots, "default"),
142
- !_ctx.slotDefault ? (openBlock(), createElementBlock("view", _hoisted_2, [
143
- _ctx.description ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
144
- _ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_4, [
135
+ !_ctx.slotDefault ? (openBlock(), createElementBlock("view", _hoisted_3, [
136
+ _ctx.description ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true),
137
+ _ctx.menuItems.length ? (openBlock(), createElementBlock("view", _hoisted_5, [
145
138
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuItems, (item, index2) => {
146
139
  return openBlock(), createElementBlock("view", {
147
140
  key: index2,
@@ -155,9 +148,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
155
148
  item.loading ? (openBlock(), createBlock(_component_Loading, {
156
149
  key: 0,
157
150
  name: "loading"
158
- })) : (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(item[_ctx.optionTag]), 1)),
159
- createElementVNode("view", _hoisted_7, toDisplayString(item[_ctx.optionSubTag]), 1)
160
- ], 14, _hoisted_5);
151
+ })) : (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(item[_ctx.optionTag]), 1)),
152
+ createElementVNode("view", _hoisted_8, toDisplayString(item[_ctx.optionSubTag]), 1)
153
+ ], 14, _hoisted_6);
161
154
  }), 128))
162
155
  ])) : createCommentVNode("", true),
163
156
  _ctx.cancelTxt ? (openBlock(), createElementBlock("view", {
@@ -166,10 +159,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
159
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.cancelActionSheet && _ctx.cancelActionSheet(...args))
167
160
  }, toDisplayString(_ctx.cancelTxt), 1)) : createCommentVNode("", true)
168
161
  ])) : createCommentVNode("", true)
169
- ], 2)
162
+ ])
170
163
  ]),
171
164
  _: 3
172
- }, 8, ["visible", "close-on-click-overlay", "lock-scroll", "onClickOverlay"]);
165
+ }, 8, ["visible", "close-on-click-overlay", "lock-scroll", "z-index", "onClickOverlay"]);
173
166
  }
174
167
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
175
168
  export {
@@ -396,6 +396,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
396
396
  round: _ctx.round,
397
397
  "teleport-disable": _ctx.teleportDisable,
398
398
  teleport: _ctx.teleport,
399
+ "z-index": _ctx.zIndex,
399
400
  onClose: _ctx.close,
400
401
  onClickOverlay: _ctx.clickOverlay,
401
402
  onOpen: _cache[4] || (_cache[4] = ($event) => _ctx.closeWay = "self")
@@ -518,7 +519,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
518
519
  ])
519
520
  ]),
520
521
  _: 3
521
- }, 8, ["visible", "lock-scroll", "round", "teleport-disable", "teleport", "onClose", "onClickOverlay"]);
522
+ }, 8, ["visible", "lock-scroll", "round", "teleport-disable", "teleport", "z-index", "onClose", "onClickOverlay"]);
522
523
  }
523
524
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
524
525
  export {
@@ -1,8 +1,8 @@
1
- import { useSlots, computed, ref, onMounted, onUnmounted, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode } from "vue";
1
+ import { useSlots, ref, onMounted, onUnmounted, watch, nextTick, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("barrage");
5
+ const { create } = createComponent("barrage");
6
6
  const _sfc_main = create({
7
7
  name: "barrage",
8
8
  props: {
@@ -34,12 +34,6 @@ const _sfc_main = create({
34
34
  setup(props) {
35
35
  const classTime = (/* @__PURE__ */ new Date()).getTime();
36
36
  const slotDefault = !!useSlots().default;
37
- const classes = computed(() => {
38
- const prefixCls = componentName;
39
- return {
40
- [prefixCls]: true
41
- };
42
- });
43
37
  let dmBody = ref(document.createElement("div"));
44
38
  let dmContainer = ref(document.createElement("div"));
45
39
  let timer = null;
@@ -168,14 +162,15 @@ const _sfc_main = create({
168
162
  run();
169
163
  });
170
164
  };
171
- return { classTime, classes, danmuList, dmBody, dmContainer, add };
165
+ return { classTime, danmuList, dmBody, dmContainer, add };
172
166
  }
173
167
  });
168
+ const _hoisted_1 = {
169
+ ref: "dmBody",
170
+ class: "nut-barrage"
171
+ };
174
172
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
175
- return openBlock(), createElementBlock("div", {
176
- ref: "dmBody",
177
- class: normalizeClass(_ctx.classes)
178
- }, [
173
+ return openBlock(), createElementBlock("div", _hoisted_1, [
179
174
  createElementVNode("div", {
180
175
  ref: "dmContainer",
181
176
  class: normalizeClass(["dmContainer", _ctx.$slots.default && "slotContainer"])
@@ -187,7 +182,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
187
182
  renderSlot(_ctx.$slots, "default")
188
183
  ], 2)) : createCommentVNode("", true)
189
184
  ], 2)
190
- ], 2);
185
+ ], 512);
191
186
  }
192
187
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
193
188
  export {
@@ -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-f86a70df.js";
3
- import { C as CalendarItem, U as Utils } from "./index-b53aec83.js";
3
+ import { C as CalendarItem, U as Utils } from "./index-a187a5aa.js";
4
4
  import { P as Popup } from "./index-5a1e6d22.js";
5
5
  import { u as useExpose } from "./index-79c5dc33.js";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -82,7 +82,8 @@ const _sfc_main = create({
82
82
  lockScroll: {
83
83
  type: Boolean,
84
84
  default: true
85
- }
85
+ },
86
+ disabledDate: Function
86
87
  },
87
88
  emits: ["choose", "close", "update:visible", "select"],
88
89
  setup(props, { emit, slots }) {
@@ -179,6 +180,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
179
180
  "show-sub-title": _ctx.showSubTitle,
180
181
  "to-date-animation": _ctx.toDateAnimation,
181
182
  "first-day-of-week": _ctx.firstDayOfWeek,
183
+ "disabled-date": _ctx.disabledDate,
182
184
  onUpdate: _ctx.update,
183
185
  onClose: _ctx.close,
184
186
  onChoose: _ctx.choose,
@@ -227,7 +229,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
227
229
  ]),
228
230
  key: "4"
229
231
  } : void 0
230
- ]), 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"])
232
+ ]), 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", "disabled-date", "onUpdate", "onClose", "onChoose", "onSelect"])
231
233
  ]),
232
234
  _: 3
233
235
  }, 16, ["visible", "lock-scroll", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
@@ -248,6 +250,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
248
250
  "to-date-animation": _ctx.toDateAnimation,
249
251
  "show-today": _ctx.showToday,
250
252
  "first-day-of-week": _ctx.firstDayOfWeek,
253
+ "disabled-date": _ctx.disabledDate,
251
254
  onUpdate: _ctx.update,
252
255
  onClose: _ctx.close,
253
256
  onChoose: _ctx.choose,
@@ -287,7 +290,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
287
290
  ]),
288
291
  key: "3"
289
292
  } : void 0
290
- ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "show-title", "show-sub-title", "to-date-animation", "show-today", "first-day-of-week", "onUpdate", "onClose", "onChoose", "onSelect"]));
293
+ ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "show-title", "show-sub-title", "to-date-animation", "show-today", "first-day-of-week", "disabled-date", "onUpdate", "onClose", "onChoose", "onSelect"]));
291
294
  }
292
295
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
293
296
  export {
@@ -1,4 +1,4 @@
1
- import { C } from "./index-b53aec83.js";
1
+ import { C } from "./index-a187a5aa.js";
2
2
  import "vue";
3
3
  import "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "./component-f86a70df.js";
@@ -574,7 +574,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
574
574
  round: "",
575
575
  closeable: _ctx.closeable,
576
576
  "destroy-on-close": false,
577
- "close-icon-position": _ctx.closeIconPosition
577
+ "close-icon-position": _ctx.closeIconPosition,
578
+ "z-index": _ctx.zIndex
578
579
  }, {
579
580
  default: withCtx(() => [
580
581
  _ctx.title ? (openBlock(), createElementBlock("view", {
@@ -597,7 +598,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
597
598
  }, null, 8, ["model-value", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible", "onChange", "onPathChange"])
598
599
  ]),
599
600
  _: 1
600
- }, 8, ["visible", "closeable", "close-icon-position"])) : (openBlock(), createBlock(_component_nut_cascader_item, {
601
+ }, 8, ["visible", "closeable", "close-icon-position", "z-index"])) : (openBlock(), createBlock(_component_nut_cascader_item, {
601
602
  key: 1,
602
603
  "model-value": _ctx.innerValue,
603
604
  options: _ctx.options,
@@ -1,8 +1,8 @@
1
- import { ref, computed, watch, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
1
+ import { ref, watch, provide, openBlock, createElementBlock, renderSlot } from "vue";
2
2
  import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
- const { create, componentName } = createComponent("collapse");
5
+ const { create } = createComponent("collapse");
6
6
  const _sfc_main = create({
7
7
  props: {
8
8
  modelValue: {
@@ -18,12 +18,6 @@ const _sfc_main = create({
18
18
  setup(props, { emit }) {
19
19
  const collapseDom = ref(null);
20
20
  const innerValue = ref(props.modelValue || (props.accordion ? "" : []));
21
- const classes = computed(() => {
22
- const prefixCls = componentName;
23
- return {
24
- [prefixCls]: true
25
- };
26
- });
27
21
  watch(
28
22
  () => props.modelValue,
29
23
  (val) => {
@@ -68,16 +62,17 @@ const _sfc_main = create({
68
62
  updateVal,
69
63
  isExpanded
70
64
  });
71
- return { collapseDom, classes };
65
+ return { collapseDom };
72
66
  }
73
67
  });
68
+ const _hoisted_1 = {
69
+ ref: "collapseDom",
70
+ class: "nut-collapse"
71
+ };
74
72
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
75
- return openBlock(), createElementBlock("view", {
76
- ref: "collapseDom",
77
- class: normalizeClass(_ctx.classes)
78
- }, [
73
+ return openBlock(), createElementBlock("view", _hoisted_1, [
79
74
  renderSlot(_ctx.$slots, "default")
80
- ], 2);
75
+ ], 512);
81
76
  }
82
77
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
83
78
  export {
@@ -34,7 +34,7 @@ const zhCNType = {
34
34
  year: translate("year"),
35
35
  month: translate("month"),
36
36
  hour: translate("hour"),
37
- minute: translate("minute"),
37
+ minute: translate("min"),
38
38
  seconds: translate("seconds")
39
39
  };
40
40
  const _sfc_main = create({
@@ -75,6 +75,10 @@ const _sfc_main = create({
75
75
  type: Boolean,
76
76
  default: true
77
77
  },
78
+ okAutoClose: {
79
+ type: Boolean,
80
+ default: true
81
+ },
78
82
  textAlign: {
79
83
  type: String,
80
84
  default: "center"
@@ -145,7 +149,9 @@ const _sfc_main = create({
145
149
  };
146
150
  const onOk = () => {
147
151
  emit("ok");
148
- closed("ok");
152
+ if (props.okAutoClose) {
153
+ closed("ok");
154
+ }
149
155
  };
150
156
  const onClickOverlay = () => {
151
157
  if (props.closeOnClickOverlay) {
@@ -188,6 +194,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
188
194
  "overlay-style": _ctx.overlayStyle,
189
195
  style: normalizeStyle(_ctx.popStyle),
190
196
  round: "",
197
+ "z-index": _ctx.zIndex,
191
198
  onClickOverlay: _ctx.onClickOverlay,
192
199
  onClickCloseIcon: _ctx.closed
193
200
  }, {
@@ -244,7 +251,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
244
251
  ], 2)
245
252
  ]),
246
253
  _: 3
247
- }, 8, ["visible", "teleport", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
254
+ }, 8, ["visible", "teleport", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "z-index", "onClickOverlay", "onClickCloseIcon"]);
248
255
  }
249
256
  const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
250
257
  class DialogOptions {
@@ -278,6 +285,8 @@ class DialogOptions {
278
285
  __publicField(this, "closeOnPopstate", false);
279
286
  __publicField(this, "closeOnClickOverlay", true);
280
287
  __publicField(this, "lockScroll", true);
288
+ __publicField(this, "cancelAutoClose", true);
289
+ __publicField(this, "okAutoClose", true);
281
290
  }
282
291
  }
283
292
  class DialogFunction {
@@ -1,9 +1,9 @@
1
- import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
1
+ import { ref, reactive, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, renderSlot } from "vue";
2
2
  import { c as createComponent } from "./component-f86a70df.js";
3
3
  import { r as requestAniFrame } from "./raf-729dad54.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
- const { componentName, create } = createComponent("drag");
6
+ const { create } = createComponent("drag");
7
7
  const _sfc_main = create({
8
8
  props: {
9
9
  attract: {
@@ -48,12 +48,6 @@ const _sfc_main = create({
48
48
  bottom: 0
49
49
  }
50
50
  });
51
- const classes = computed(() => {
52
- const prefixCls = componentName;
53
- return {
54
- [prefixCls]: true
55
- };
56
- });
57
51
  function getInfo() {
58
52
  const domElem = document.documentElement;
59
53
  state.elWidth = myDrag.value.offsetWidth;
@@ -176,7 +170,6 @@ const _sfc_main = create({
176
170
  myDrag.value.removeEventListener("touchend", touchEnd);
177
171
  });
178
172
  return {
179
- classes,
180
173
  myDrag,
181
174
  touchStart,
182
175
  touchMove,
@@ -187,13 +180,13 @@ const _sfc_main = create({
187
180
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
188
181
  return openBlock(), createElementBlock("view", {
189
182
  ref: "myDrag",
190
- class: normalizeClass(_ctx.classes),
183
+ class: "nut-drag",
191
184
  onTouchstart: _cache[0] || (_cache[0] = ($event) => _ctx.touchStart($event)),
192
185
  onTouchmove: _cache[1] || (_cache[1] = ($event) => _ctx.touchMove($event)),
193
186
  onTouchend: _cache[2] || (_cache[2] = ($event) => _ctx.touchEnd($event))
194
187
  }, [
195
188
  renderSlot(_ctx.$slots, "default")
196
- ], 34);
189
+ ], 544);
197
190
  }
198
191
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
199
192
  export {
@@ -17,12 +17,12 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
20
+ import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
21
21
  import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { u as useExpose } from "./index-79c5dc33.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
25
- const { componentName, create } = createComponent("elevator");
25
+ const { create } = createComponent("elevator");
26
26
  const _sfc_main = create({
27
27
  props: {
28
28
  height: {
@@ -72,17 +72,6 @@ const _sfc_main = create({
72
72
  diff: -1,
73
73
  fixedTop: 0
74
74
  });
75
- const classes = computed(() => {
76
- const prefixCls = componentName;
77
- return {
78
- [prefixCls]: true
79
- };
80
- });
81
- const fixedStyle = computed(() => {
82
- return {
83
- transform: `translate3d(0, ${state.scrollY + state.fixedTop}px, 0)`
84
- };
85
- });
86
75
  const clientHeight = computed(() => {
87
76
  return listview.value.clientHeight;
88
77
  });
@@ -161,7 +150,9 @@ const _sfc_main = create({
161
150
  state.currentIndex = listHeight.length - 2;
162
151
  };
163
152
  onMounted(() => {
164
- listview.value.addEventListener("scroll", listViewScroll);
153
+ if (listview.value) {
154
+ listview.value.addEventListener("scroll", listViewScroll);
155
+ }
165
156
  });
166
157
  useExpose({
167
158
  scrollTo
@@ -193,10 +184,7 @@ const _sfc_main = create({
193
184
  context.emit("change", newVal);
194
185
  }
195
186
  );
196
- return __spreadProps(__spreadValues({
197
- classes
198
- }, toRefs(state)), {
199
- fixedStyle,
187
+ return __spreadProps(__spreadValues({}, toRefs(state)), {
200
188
  clientHeight,
201
189
  setListGroup,
202
190
  listview,
@@ -208,16 +196,16 @@ const _sfc_main = create({
208
196
  });
209
197
  }
210
198
  });
211
- const _hoisted_1 = { class: "nut-elevator__list__item__code" };
212
- const _hoisted_2 = ["onClick"];
213
- const _hoisted_3 = ["innerHTML"];
214
- const _hoisted_4 = { class: "nut-elevator__fixed-title" };
215
- const _hoisted_5 = { class: "nut-elevator__bars__inner" };
216
- const _hoisted_6 = ["data-index", "onClick"];
199
+ const _hoisted_1 = { class: "nut-elevator" };
200
+ const _hoisted_2 = { class: "nut-elevator__list__item__code" };
201
+ const _hoisted_3 = ["onClick"];
202
+ const _hoisted_4 = ["innerHTML"];
203
+ const _hoisted_5 = { class: "nut-elevator__list__fixed" };
204
+ const _hoisted_6 = { class: "nut-elevator__list__fixed-title" };
205
+ const _hoisted_7 = { class: "nut-elevator__bars__inner" };
206
+ const _hoisted_8 = ["data-index", "onClick"];
217
207
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
218
- return openBlock(), createElementBlock("view", {
219
- class: normalizeClass(_ctx.classes)
220
- }, [
208
+ return openBlock(), createElementBlock("view", _hoisted_1, [
221
209
  createElementVNode("view", {
222
210
  ref: "listview",
223
211
  class: "nut-elevator__list",
@@ -230,7 +218,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
230
218
  ref: _ctx.setListGroup,
231
219
  class: "nut-elevator__list__item"
232
220
  }, [
233
- createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
221
+ createElementVNode("view", _hoisted_2, toDisplayString(item[_ctx.acceptKey]), 1),
234
222
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
235
223
  return openBlock(), createElementBlock("view", {
236
224
  key: subitem["id"],
@@ -242,24 +230,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
242
230
  !_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
243
231
  key: 0,
244
232
  innerHTML: subitem.name
245
- }, null, 8, _hoisted_3)) : renderSlot(_ctx.$slots, "default", {
233
+ }, null, 8, _hoisted_4)) : renderSlot(_ctx.$slots, "default", {
246
234
  key: 1,
247
235
  item: subitem
248
236
  })
249
- ], 10, _hoisted_2);
237
+ ], 10, _hoisted_3);
250
238
  }), 128))
251
239
  ]);
252
- }), 128)),
253
- _ctx.isSticky ? withDirectives((openBlock(), createElementBlock("view", {
254
- key: 0,
255
- class: "nut-elevator__list__fixed",
256
- style: normalizeStyle(_ctx.fixedStyle)
257
- }, [
258
- createElementVNode("span", _hoisted_4, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 1)
259
- ], 4)), [
260
- [vShow, _ctx.scrollY > 0]
261
- ]) : createCommentVNode("", true)
240
+ }), 128))
262
241
  ], 4),
242
+ withDirectives(createElementVNode("view", _hoisted_5, [
243
+ createElementVNode("view", _hoisted_6, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 1)
244
+ ], 512), [
245
+ [vShow, _ctx.scrollY > 0 && _ctx.isSticky]
246
+ ]),
263
247
  _ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
264
248
  key: 0,
265
249
  class: "nut-elevator__code--current"
@@ -272,18 +256,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
272
256
  onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
273
257
  onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
274
258
  }, [
275
- createElementVNode("view", _hoisted_5, [
259
+ createElementVNode("view", _hoisted_7, [
276
260
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
277
261
  return openBlock(), createElementBlock("view", {
278
262
  key: item[_ctx.acceptKey],
279
263
  class: normalizeClass(["nut-elevator__bars__inner__item", { active: item[_ctx.acceptKey] === _ctx.indexList[_ctx.currentIndex][_ctx.acceptKey] }]),
280
264
  "data-index": index,
281
265
  onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
282
- }, toDisplayString(item[_ctx.acceptKey]), 11, _hoisted_6);
266
+ }, toDisplayString(item[_ctx.acceptKey]), 11, _hoisted_8);
283
267
  }), 128))
284
268
  ])
285
269
  ], 32)
286
- ], 2);
270
+ ]);
287
271
  }
288
272
  const Elevator = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
289
273
  export {
@@ -17,11 +17,11 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
20
+ import { ref, reactive, watch, onMounted, toRefs, openBlock, createElementBlock, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
21
21
  import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
23
  import "../locale/lang";
24
- const { componentName, create } = createComponent("ellipsis");
24
+ const { create } = createComponent("ellipsis");
25
25
  const _sfc_main = create({
26
26
  props: {
27
27
  content: {
@@ -65,12 +65,6 @@ const _sfc_main = create({
65
65
  expanded: false
66
66
  //是否折叠
67
67
  });
68
- const classes = computed(() => {
69
- const prefixCls = componentName;
70
- return {
71
- [prefixCls]: true
72
- };
73
- });
74
68
  watch(
75
69
  () => props.content,
76
70
  (newV, oldVal) => {
@@ -193,7 +187,7 @@ const _sfc_main = create({
193
187
  const handleClick = () => {
194
188
  emit("click");
195
189
  };
196
- return __spreadProps(__spreadValues({}, toRefs(state)), { root, ellipsis, classes, clickHandle, handleClick });
190
+ return __spreadProps(__spreadValues({}, toRefs(state)), { root, ellipsis, clickHandle, handleClick });
197
191
  }
198
192
  });
199
193
  const _hoisted_1 = { key: 0 };
@@ -202,7 +196,7 @@ const _hoisted_3 = { key: 2 };
202
196
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
203
197
  return openBlock(), createElementBlock("view", {
204
198
  ref: "root",
205
- class: normalizeClass(_ctx.classes),
199
+ class: "nut-ellipsis",
206
200
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
207
201
  }, [
208
202
  !_ctx.exceeded ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true),
@@ -223,7 +217,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
223
217
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.clickHandle(2), ["stop"]))
224
218
  }, toDisplayString(_ctx.collapseText), 1)) : createCommentVNode("", true)
225
219
  ])) : createCommentVNode("", true)
226
- ], 2);
220
+ ], 512);
227
221
  }
228
222
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
229
223
  export {