@nutui/nutui 3.1.12-beta.1 → 3.1.14

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 (131) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +139 -37
  3. package/dist/nutui.d.ts +9 -2
  4. package/dist/nutui.es.js +4830 -2950
  5. package/dist/nutui.umd.js +4910 -2953
  6. package/dist/packages/_es/ActionSheet.js +12 -13
  7. package/dist/packages/_es/Address.js +64 -77
  8. package/dist/packages/_es/Avatar.js +5 -4
  9. package/dist/packages/_es/BackTop.js +109 -72
  10. package/dist/packages/_es/Badge.js +5 -4
  11. package/dist/packages/_es/Barrage.js +57 -63
  12. package/dist/packages/_es/Button.js +6 -5
  13. package/dist/packages/_es/Calendar.js +18 -27
  14. package/dist/packages/_es/Card.js +8 -7
  15. package/dist/packages/_es/Cascader.js +547 -0
  16. package/dist/packages/_es/Cell.js +13 -5
  17. package/dist/packages/_es/CellGroup.js +14 -7
  18. package/dist/packages/_es/Checkbox.js +3 -3
  19. package/dist/packages/_es/CheckboxGroup.js +4 -9
  20. package/dist/packages/_es/CircleProgress.js +46 -142
  21. package/dist/packages/_es/Col.js +5 -4
  22. package/dist/packages/_es/Collapse.js +10 -35
  23. package/dist/packages/_es/CollapseItem.js +35 -80
  24. package/dist/packages/_es/CountDown.js +7 -10
  25. package/dist/packages/_es/CountUp.js +33 -34
  26. package/dist/packages/_es/DatePicker.js +219 -451
  27. package/dist/packages/_es/Dialog.js +98 -46
  28. package/dist/packages/_es/Divider.js +6 -5
  29. package/dist/packages/_es/Drag.js +50 -76
  30. package/dist/packages/_es/Elevator.js +53 -81
  31. package/dist/packages/_es/Empty.js +74 -0
  32. package/dist/packages/_es/FixedNav.js +9 -8
  33. package/dist/packages/_es/Form.js +23 -9
  34. package/dist/packages/_es/FormItem.js +5 -4
  35. package/dist/packages/_es/Grid.js +12 -0
  36. package/dist/packages/_es/GridItem.js +149 -0
  37. package/dist/packages/_es/Icon.js +40 -6
  38. package/dist/packages/_es/ImagePreview.js +158 -44
  39. package/dist/packages/_es/Indicator.js +66 -0
  40. package/dist/packages/_es/InfiniteLoading.js +109 -95
  41. package/dist/packages/_es/Input.js +21 -22
  42. package/dist/packages/_es/InputNumber.js +18 -24
  43. package/dist/packages/_es/Layout.js +2 -2
  44. package/dist/packages/_es/Menu.js +14 -16
  45. package/dist/packages/_es/MenuItem.js +11 -9
  46. package/dist/packages/_es/Navbar.js +7 -7
  47. package/dist/packages/_es/NoticeBar.js +31 -46
  48. package/dist/packages/_es/Notify.js +166 -30
  49. package/dist/packages/_es/NumberKeyboard.js +7 -9
  50. package/dist/packages/_es/OverLay.js +29 -22
  51. package/dist/packages/_es/Pagination.js +9 -8
  52. package/dist/packages/_es/Picker.js +447 -61
  53. package/dist/packages/_es/Popover.js +34 -161
  54. package/dist/packages/_es/Popup.js +77 -17
  55. package/dist/packages/_es/Price.js +7 -18
  56. package/dist/packages/_es/Progress.js +12 -23
  57. package/dist/packages/_es/Radio.js +3 -3
  58. package/dist/packages/_es/RadioGroup.js +2 -2
  59. package/dist/packages/_es/Range.js +31 -38
  60. package/dist/packages/_es/Rate.js +35 -17
  61. package/dist/packages/_es/Row.js +5 -4
  62. package/dist/packages/_es/SearchBar.js +5 -7
  63. package/dist/packages/_es/ShortPassword.js +59 -89
  64. package/dist/packages/_es/Signature.js +71 -70
  65. package/dist/packages/_es/Skeleton.js +138 -0
  66. package/dist/packages/_es/Sku.js +43 -53
  67. package/dist/packages/_es/Step.js +8 -10
  68. package/dist/packages/_es/Steps.js +2 -2
  69. package/dist/packages/_es/Swipe.js +28 -43
  70. package/dist/packages/_es/Swiper.js +418 -17
  71. package/dist/packages/_es/SwiperItem.js +39 -14
  72. package/dist/packages/_es/Switch.js +47 -16
  73. package/dist/packages/_es/TabPane.js +5 -4
  74. package/dist/packages/_es/Tabbar.js +5 -4
  75. package/dist/packages/_es/TabbarItem.js +9 -8
  76. package/dist/packages/_es/Table.js +191 -0
  77. package/dist/packages/_es/Tabs.js +21 -23
  78. package/dist/packages/_es/Tag.js +6 -5
  79. package/dist/packages/_es/TextArea.js +12 -16
  80. package/dist/packages/_es/TimeDetail.js +5 -7
  81. package/dist/packages/_es/TimePannel.js +5 -7
  82. package/dist/packages/_es/TimeSelect.js +7 -12
  83. package/dist/packages/_es/Toast.js +178 -46
  84. package/dist/packages/_es/Uploader.js +149 -109
  85. package/dist/packages/_es/Video.js +405 -0
  86. package/dist/packages/_es/common.js +136 -0
  87. package/dist/packages/_es/component.js +1 -1
  88. package/dist/packages/_es/index.js +7 -58
  89. package/dist/packages/_es/index2.js +58 -43
  90. package/dist/packages/_es/index3.js +28 -411
  91. package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
  92. package/dist/packages/_es/pxCheck.js +1 -1
  93. package/dist/packages/_es/raf.js +1 -1
  94. package/dist/packages/_es/util.js +1 -1
  95. package/dist/packages/cascader/index.scss +81 -0
  96. package/dist/packages/cellgroup/index.scss +9 -0
  97. package/dist/packages/dialog/index.scss +17 -0
  98. package/dist/packages/drag/index.scss +4 -0
  99. package/dist/packages/empty/index.scss +33 -0
  100. package/dist/packages/fixednav/index.scss +6 -1
  101. package/dist/packages/formitem/index.scss +4 -1
  102. package/dist/packages/grid/index.scss +10 -0
  103. package/dist/packages/griditem/index.scss +92 -0
  104. package/dist/packages/icon/index.scss +2 -1
  105. package/dist/packages/indicator/index.scss +48 -0
  106. package/dist/packages/numberkeyboard/index.scss +1 -1
  107. package/dist/packages/popover/index.scss +2 -2
  108. package/dist/packages/rate/index.scss +1 -0
  109. package/dist/packages/skeleton/index.scss +57 -0
  110. package/dist/packages/table/index.scss +81 -0
  111. package/dist/packages/tabs/index.scss +16 -0
  112. package/dist/packages/textarea/index.scss +1 -0
  113. package/dist/packages/timedetail/index.scss +1 -2
  114. package/dist/packages/timeselect/index.scss +3 -0
  115. package/dist/packages/toast/index.scss +6 -0
  116. package/dist/style.css +1 -1
  117. package/dist/style.es.js +2 -1
  118. package/dist/styles/font/config.json +2 -1
  119. package/dist/styles/font/demo_index.html +26 -3
  120. package/dist/styles/font/iconfont.css +7 -3
  121. package/dist/styles/font/iconfont.js +31 -32
  122. package/dist/styles/font/iconfont.json +7 -0
  123. package/dist/styles/font/iconfont.ttf +0 -0
  124. package/dist/styles/font/iconfont.woff +0 -0
  125. package/dist/styles/font/iconfont.woff2 +0 -0
  126. package/dist/styles/themes/default.scss +40 -33
  127. package/dist/styles/variables.scss +54 -1
  128. package/package.json +2 -3
  129. package/dist/packages/_es/commonProps.js +0 -30
  130. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
  131. package/dist/packages/_es/use-lock-scroll.js +0 -23
@@ -17,18 +17,16 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __require = typeof require !== "undefined" ? require : (x) => {
21
- throw new Error('Dynamic require of "' + x + '" is not supported');
22
- };
23
20
  /*!
24
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
25
22
  * (c) 2021 @jdf2e.
26
23
  * Released under the MIT License.
27
24
  */
28
25
  import { inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString } from "vue";
29
26
  import { c as createComponent } from "./component.js";
27
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
30
28
  const { componentName, create } = createComponent("timepannel");
31
- var _sfc_main = create({
29
+ const _sfc_main = create({
32
30
  name: "timepannel",
33
31
  props: {
34
32
  name: {
@@ -68,5 +66,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
68
66
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
69
67
  }, toDisplayString(_ctx.name), 3);
70
68
  }
71
- _sfc_main.render = _sfc_render;
72
- export { _sfc_main as default };
69
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
70
+ export { index as default };
@@ -1,12 +1,13 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, toDisplayString, renderSlot } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
8
9
  const { componentName, create } = createComponent("timeselect");
9
- var _sfc_main = create({
10
+ const _sfc_main = create({
10
11
  props: {
11
12
  visible: {
12
13
  type: Boolean,
@@ -29,13 +30,9 @@ var _sfc_main = create({
29
30
  default: () => {
30
31
  return [];
31
32
  }
32
- },
33
- muti: {
34
- type: [Boolean],
35
- default: false
36
33
  }
37
34
  },
38
- emits: ["update:visible", "selected"],
35
+ emits: ["update:visible", "select"],
39
36
  setup: (props, context) => {
40
37
  const classes = computed(() => {
41
38
  const prefixCls = componentName;
@@ -51,14 +48,12 @@ var _sfc_main = create({
51
48
  });
52
49
  const currentKey = computed(() => props.currentKey);
53
50
  const currentTime = computed(() => props.currentTime);
54
- const muti = computed(() => props.muti);
55
51
  const close = () => {
56
52
  context.emit("update:visible", false);
57
- context.emit("selected", currentTime.value);
53
+ context.emit("select", currentTime.value);
58
54
  };
59
55
  provide("currentKey", currentKey);
60
56
  provide("currentTime", currentTime);
61
- provide("muti", muti);
62
57
  return {
63
58
  classes,
64
59
  popStyle,
@@ -102,5 +97,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
102
97
  _: 3
103
98
  }, 8, ["visible", "style", "onClickOverlay", "onClickCloseIcon"]);
104
99
  }
105
- _sfc_main.render = _sfc_render;
106
- export { _sfc_main as default };
100
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
101
+ export { index as default };
@@ -1,11 +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.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.14 Wed Dec 22 2021 20:49:10 GMT+0800 (中国标准时间)
3
22
  * (c) 2021 @jdf2e.
4
23
  * Released under the MIT License.
5
24
  */
6
- import { watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, createVNode, createCommentVNode, vShow } from "vue";
25
+ import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, createCommentVNode, toDisplayString, vShow, render } from "vue";
7
26
  import { c as createComponent } from "./component.js";
8
- import { _ as _sfc_main$1 } from "./index.taro.vue_vue&type=script&lang.js";
27
+ import _sfc_main$1 from "./Icon.js";
28
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
29
  import "./pxCheck.js";
10
30
  const { create } = createComponent("toast");
11
31
  const _sfc_main = create({
@@ -23,14 +43,11 @@ const _sfc_main = create({
23
43
  type: Boolean,
24
44
  default: true
25
45
  },
26
- type: {
27
- type: String,
28
- default: "text"
29
- },
46
+ type: String,
30
47
  customClass: String,
31
48
  bottom: {
32
- type: Number,
33
- default: 30
49
+ type: String,
50
+ default: "30px"
34
51
  },
35
52
  size: {
36
53
  type: [String, Number],
@@ -59,18 +76,23 @@ const _sfc_main = create({
59
76
  type: String,
60
77
  default: "rgba(0, 0, 0, 0)"
61
78
  },
62
- closeOnClickOverlay: {
63
- type: Boolean,
64
- default: false
79
+ title: {
80
+ type: String,
81
+ default: ""
65
82
  },
66
- visible: {
83
+ closeOnClickOverlay: {
67
84
  type: Boolean,
68
85
  default: false
69
86
  }
70
87
  },
71
- emits: ["update:visible", "closed"],
72
- setup(props, { emit }) {
88
+ setup(props) {
73
89
  let timer;
90
+ const state = reactive({
91
+ mounted: false
92
+ });
93
+ onMounted(() => {
94
+ state.mounted = true;
95
+ });
74
96
  const clearTimer = () => {
75
97
  if (timer) {
76
98
  clearTimeout(timer);
@@ -78,8 +100,7 @@ const _sfc_main = create({
78
100
  }
79
101
  };
80
102
  const hide = () => {
81
- emit("update:visible", false);
82
- emit("closed");
103
+ state.mounted = false;
83
104
  };
84
105
  const show = () => {
85
106
  clearTimer();
@@ -94,7 +115,10 @@ const _sfc_main = create({
94
115
  hide();
95
116
  }
96
117
  };
97
- watch(() => props.visible, (val) => {
118
+ if (props.duration) {
119
+ show();
120
+ }
121
+ watch(() => props.duration, (val) => {
98
122
  if (val) {
99
123
  show();
100
124
  }
@@ -106,18 +130,6 @@ const _sfc_main = create({
106
130
  return !!props.icon;
107
131
  }
108
132
  });
109
- const iconName = computed(() => {
110
- if (props.icon) {
111
- return props.icon;
112
- } else {
113
- return {
114
- success: "success",
115
- fail: "failure",
116
- warn: "tips",
117
- loading: "loading"
118
- }[props.type];
119
- }
120
- });
121
133
  const toastBodyClass = computed(() => {
122
134
  return [
123
135
  "nut-toast",
@@ -130,15 +142,15 @@ const _sfc_main = create({
130
142
  ];
131
143
  });
132
144
  const onAfterLeave = () => {
133
- if (props.visible) {
134
- clearTimer();
135
- hide();
136
- }
145
+ clearTimer();
146
+ props.unmount(props.id);
147
+ props.onClose && props.onClose();
137
148
  };
138
149
  return {
150
+ state,
151
+ hide,
139
152
  clickCover,
140
153
  hasIcon,
141
- iconName,
142
154
  toastBodyClass,
143
155
  onAfterLeave
144
156
  };
@@ -148,7 +160,11 @@ const _hoisted_1 = {
148
160
  key: 0,
149
161
  class: "nut-toast-icon-wrapper"
150
162
  };
151
- const _hoisted_2 = ["innerHTML"];
163
+ const _hoisted_2 = {
164
+ key: 1,
165
+ class: "nut-toast-title"
166
+ };
167
+ const _hoisted_3 = ["innerHTML"];
152
168
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
153
169
  const _component_nut_icon = resolveComponent("nut-icon");
154
170
  return openBlock(), createBlock(Transition, {
@@ -159,13 +175,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
159
175
  withDirectives(createElementVNode("view", {
160
176
  class: normalizeClass(_ctx.toastBodyClass),
161
177
  style: normalizeStyle({
162
- bottom: _ctx.center ? "auto" : _ctx.bottom + "px",
178
+ bottom: _ctx.center ? "auto" : _ctx.bottom,
163
179
  "background-color": _ctx.coverColor
164
180
  }),
165
181
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
166
182
  }, [
167
- _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock("view", {
168
- key: 1,
183
+ createElementVNode("view", {
169
184
  class: "nut-toast-inner",
170
185
  style: normalizeStyle({
171
186
  "text-align": _ctx.textAlignCenter ? "center" : "left",
@@ -176,20 +191,137 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
176
191
  createVNode(_component_nut_icon, {
177
192
  size: "20",
178
193
  color: "#ffffff",
179
- name: _ctx.iconName
194
+ name: _ctx.icon
180
195
  }, null, 8, ["name"])
181
196
  ])) : createCommentVNode("", true),
197
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
182
198
  createElementVNode("view", {
183
199
  class: "nut-toast-text",
184
200
  innerHTML: _ctx.msg
185
- }, null, 8, _hoisted_2)
186
- ], 4))
201
+ }, null, 8, _hoisted_3)
202
+ ], 4)
187
203
  ], 6), [
188
- [vShow, _ctx.visible]
204
+ [vShow, _ctx.state.mounted]
189
205
  ])
190
206
  ]),
191
- _: 3
207
+ _: 1
192
208
  }, 8, ["onAfterLeave"]);
193
209
  }
194
- _sfc_main.render = _sfc_render;
195
- export { _sfc_main as default };
210
+ var Toast = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
211
+ const defaultOptions = {
212
+ msg: "",
213
+ id: "",
214
+ duration: 2e3,
215
+ center: true,
216
+ type: "text",
217
+ title: "",
218
+ customClass: "",
219
+ bottom: "30px",
220
+ size: "base",
221
+ icon: null,
222
+ textAlignCenter: true,
223
+ loadingRotate: true,
224
+ bgColor: "rgba(0, 0, 0, .8)",
225
+ onClose: null,
226
+ unmount: null,
227
+ cover: false,
228
+ coverColor: "rgba(0, 0, 0, 0)",
229
+ closeOnClickOverlay: false
230
+ };
231
+ let idsMap = [];
232
+ let optsMap = [];
233
+ const clearToast = (id) => {
234
+ if (id) {
235
+ const container = document.getElementById(id);
236
+ optsMap = optsMap.filter((item) => item.id !== id);
237
+ idsMap = idsMap.filter((item) => item !== id);
238
+ if (container) {
239
+ document.body.removeChild(container);
240
+ }
241
+ } else {
242
+ idsMap.forEach((item) => {
243
+ const container = document.getElementById(item);
244
+ if (container) {
245
+ document.body.removeChild(container);
246
+ }
247
+ });
248
+ optsMap = [];
249
+ idsMap = [];
250
+ }
251
+ };
252
+ const updateToast = (opts) => {
253
+ const container = document.getElementById(opts.id);
254
+ if (container) {
255
+ const currentOpt = optsMap.find((item) => item.id === opts.id);
256
+ if (currentOpt) {
257
+ opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
258
+ } else {
259
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
260
+ }
261
+ const instance = createVNode(Toast, opts);
262
+ render(instance, container);
263
+ return instance.component.ctx;
264
+ }
265
+ };
266
+ const mountToast = (opts) => {
267
+ opts.unmount = clearToast;
268
+ let _id;
269
+ if (opts.id) {
270
+ _id = opts.id;
271
+ if (idsMap.find((item) => item === opts.id)) {
272
+ return updateToast(opts);
273
+ }
274
+ } else {
275
+ _id = new Date().getTime() + "";
276
+ }
277
+ opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
278
+ opts.id = _id;
279
+ idsMap.push(opts.id);
280
+ optsMap.push(opts);
281
+ const container = document.createElement("div");
282
+ container.id = opts.id;
283
+ const instance = createVNode(Toast, opts);
284
+ render(instance, container);
285
+ document.body.appendChild(container);
286
+ return instance.component.ctx;
287
+ };
288
+ const errorMsg = (msg) => {
289
+ if (!msg) {
290
+ console.warn("[NutUI Toast]: msg\u4E0D\u80FD\u4E3A\u7A7A");
291
+ return;
292
+ }
293
+ };
294
+ const ToastFunction = {
295
+ text(msg, opts = {}) {
296
+ errorMsg(msg);
297
+ return mountToast(__spreadProps(__spreadValues({}, opts), { type: "text", msg }));
298
+ },
299
+ success(msg, opts = {}) {
300
+ errorMsg(msg);
301
+ return mountToast(__spreadProps(__spreadValues({ icon: "success" }, opts), { msg, type: "success" }));
302
+ },
303
+ fail(msg, opts = {}) {
304
+ errorMsg(msg);
305
+ return mountToast(__spreadProps(__spreadValues({ icon: "failure" }, opts), { msg, type: "fail" }));
306
+ },
307
+ warn(msg, opts = {}) {
308
+ errorMsg(msg);
309
+ return mountToast(__spreadProps(__spreadValues({ icon: "tips" }, opts), { msg, type: "warn" }));
310
+ },
311
+ loading(msg, opts = {}) {
312
+ return mountToast(__spreadProps(__spreadValues({
313
+ icon: "loading"
314
+ }, opts), {
315
+ msg,
316
+ type: "loading"
317
+ }));
318
+ },
319
+ hide(id) {
320
+ clearToast(id);
321
+ },
322
+ install(app) {
323
+ app.use(Toast);
324
+ app.config.globalProperties.$toast = ToastFunction;
325
+ }
326
+ };
327
+ export { Toast, ToastFunction, ToastFunction as default };