@nutui/nutui 4.0.0-beta.8 → 4.0.0-beta.9
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.
- package/dist/nutui.es.js +8 -4
- package/dist/nutui.umd.cjs +7 -19974
- package/dist/packages/_es/Dialog.js +11 -16
- package/dist/packages/_es/ImagePreview.js +6 -8
- package/dist/packages/_es/Notify.js +4 -5
- package/dist/packages/_es/Toast.js +6 -7
- package/dist/packages/dialog/index.mjs +2 -1
- package/dist/packages/imagepreview/index.mjs +2 -1
- package/dist/packages/notify/index.mjs +2 -1
- package/dist/packages/toast/index.mjs +2 -1
- package/dist/smartips/attributes.json +6 -6
- package/dist/smartips/tags.json +6 -6
- package/dist/smartips/web-types.json +7 -7
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +46 -46
- package/dist/styles/themes/jdb.scss +46 -46
- package/dist/styles/themes/jddkh.scss +46 -46
- package/dist/styles/themes/jdt.scss +46 -46
- package/dist/types/__VUE/dialog/index.d.ts +9 -9
- package/dist/types/__VUE/imagepreview/index.d.ts +12 -12
- package/dist/types/__VUE/notify/index.d.ts +3 -3
- package/dist/types/__VUE/toast/index.d.ts +3 -3
- package/dist/types/index.d.ts +10 -6
- package/package.json +1 -1
|
@@ -235,16 +235,11 @@ class DialogOptions {
|
|
|
235
235
|
__publicField(this, "teleport", "body");
|
|
236
236
|
__publicField(this, "id", new Date().getTime());
|
|
237
237
|
__publicField(this, "footerDirection", "horizontal");
|
|
238
|
-
__publicField(this, "onUpdate"
|
|
239
|
-
|
|
240
|
-
__publicField(this, "
|
|
241
|
-
|
|
242
|
-
__publicField(this, "
|
|
243
|
-
});
|
|
244
|
-
__publicField(this, "onOpened", () => {
|
|
245
|
-
});
|
|
246
|
-
__publicField(this, "onClosed", () => {
|
|
247
|
-
});
|
|
238
|
+
__publicField(this, "onUpdate");
|
|
239
|
+
__publicField(this, "onOk");
|
|
240
|
+
__publicField(this, "onCancel");
|
|
241
|
+
__publicField(this, "onOpened");
|
|
242
|
+
__publicField(this, "onClosed");
|
|
248
243
|
__publicField(this, "beforeClose");
|
|
249
244
|
__publicField(this, "visible", true);
|
|
250
245
|
__publicField(this, "noFooter", false);
|
|
@@ -259,7 +254,7 @@ class DialogFunction {
|
|
|
259
254
|
constructor(_options) {
|
|
260
255
|
__publicField(this, "options", new DialogOptions());
|
|
261
256
|
__publicField(this, "instance");
|
|
262
|
-
|
|
257
|
+
const options = Object.assign(this.options, _options);
|
|
263
258
|
const { unmount } = CreateComponent(options, {
|
|
264
259
|
name: "dialog",
|
|
265
260
|
components: [Popup, Button, Overlay],
|
|
@@ -284,15 +279,15 @@ class DialogFunction {
|
|
|
284
279
|
});
|
|
285
280
|
}
|
|
286
281
|
}
|
|
287
|
-
const
|
|
282
|
+
const showDialog = function(options) {
|
|
288
283
|
return new DialogFunction(options);
|
|
289
284
|
};
|
|
290
|
-
|
|
285
|
+
showDialog.install = (app) => {
|
|
291
286
|
app.use(Dialog);
|
|
292
|
-
app.config.globalProperties.$dialog =
|
|
287
|
+
app.config.globalProperties.$dialog = showDialog;
|
|
293
288
|
};
|
|
294
289
|
export {
|
|
295
|
-
Dialog,
|
|
296
290
|
DialogOptions,
|
|
297
|
-
|
|
291
|
+
Dialog as default,
|
|
292
|
+
showDialog
|
|
298
293
|
};
|
|
@@ -470,8 +470,6 @@ class ImagePreviewOptions {
|
|
|
470
470
|
__publicField(this, "maxZoom", 3);
|
|
471
471
|
__publicField(this, "minZoom", 1 / 3);
|
|
472
472
|
__publicField(this, "isLoop", true);
|
|
473
|
-
__publicField(this, "onClose", () => {
|
|
474
|
-
});
|
|
475
473
|
__publicField(this, "teleport", "body");
|
|
476
474
|
}
|
|
477
475
|
}
|
|
@@ -479,7 +477,7 @@ class ImagePreviewFunction {
|
|
|
479
477
|
constructor(_options) {
|
|
480
478
|
__publicField(this, "options", new ImagePreviewOptions());
|
|
481
479
|
const options = Object.assign(this.options, _options);
|
|
482
|
-
const {
|
|
480
|
+
const { unmount } = CreateComponent(options, {
|
|
483
481
|
name: "image-preview",
|
|
484
482
|
components: [Popup, Video, Swiper, SwiperItem, Overlay],
|
|
485
483
|
wrapper: () => {
|
|
@@ -497,13 +495,13 @@ class ImagePreviewFunction {
|
|
|
497
495
|
});
|
|
498
496
|
}
|
|
499
497
|
}
|
|
500
|
-
const
|
|
501
|
-
|
|
498
|
+
const showImagePreview = (options) => new ImagePreviewFunction(options);
|
|
499
|
+
showImagePreview.install = (app) => {
|
|
502
500
|
app.use(ImagePreview);
|
|
503
|
-
app.config.globalProperties.$imagepreview =
|
|
501
|
+
app.config.globalProperties.$imagepreview = showImagePreview;
|
|
504
502
|
};
|
|
505
503
|
export {
|
|
506
|
-
ImagePreview,
|
|
507
504
|
ImagePreviewOptions,
|
|
508
|
-
|
|
505
|
+
ImagePreview as default,
|
|
506
|
+
showImagePreview
|
|
509
507
|
};
|
|
@@ -188,7 +188,7 @@ const errorMsg = (msg) => {
|
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
const
|
|
191
|
+
const showNotify = {
|
|
192
192
|
text(msg, obj = {}) {
|
|
193
193
|
errorMsg(msg);
|
|
194
194
|
return mountNotify({ ...obj, msg });
|
|
@@ -214,11 +214,10 @@ const NotifyFunction = {
|
|
|
214
214
|
},
|
|
215
215
|
install(app) {
|
|
216
216
|
app.use(Notify);
|
|
217
|
-
app.config.globalProperties.$notify =
|
|
217
|
+
app.config.globalProperties.$notify = showNotify;
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
export {
|
|
221
|
-
Notify,
|
|
222
|
-
|
|
223
|
-
NotifyFunction as default
|
|
221
|
+
Notify as default,
|
|
222
|
+
showNotify
|
|
224
223
|
};
|
|
@@ -245,7 +245,7 @@ const updateToast = (opts) => {
|
|
|
245
245
|
}
|
|
246
246
|
const instance = createVNode(Toast, opts);
|
|
247
247
|
render(instance, container);
|
|
248
|
-
return
|
|
248
|
+
return showToast;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
const mountToast = (opts) => {
|
|
@@ -266,7 +266,7 @@ const mountToast = (opts) => {
|
|
|
266
266
|
CreateComponent(opts, {
|
|
267
267
|
wrapper: Toast
|
|
268
268
|
});
|
|
269
|
-
return
|
|
269
|
+
return showToast;
|
|
270
270
|
};
|
|
271
271
|
const errorMsg = (msg) => {
|
|
272
272
|
if (!msg) {
|
|
@@ -274,7 +274,7 @@ const errorMsg = (msg) => {
|
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
|
-
const
|
|
277
|
+
const showToast = {
|
|
278
278
|
text(msg, opts = {}) {
|
|
279
279
|
errorMsg(msg);
|
|
280
280
|
return mountToast({ ...opts, type: "text", msg });
|
|
@@ -304,11 +304,10 @@ const ToastFunction = {
|
|
|
304
304
|
},
|
|
305
305
|
install(app) {
|
|
306
306
|
app.use(Toast);
|
|
307
|
-
app.config.globalProperties.$toast =
|
|
307
|
+
app.config.globalProperties.$toast = showToast;
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
export {
|
|
311
|
-
Toast,
|
|
312
|
-
|
|
313
|
-
ToastFunction as default
|
|
311
|
+
Toast as default,
|
|
312
|
+
showToast
|
|
314
313
|
};
|
|
@@ -2487,27 +2487,27 @@
|
|
|
2487
2487
|
"type": "boolean",
|
|
2488
2488
|
"description": "属性说明:背景是否锁定,默认值:`false`"
|
|
2489
2489
|
},
|
|
2490
|
-
"nut-toast/
|
|
2490
|
+
"nut-toast/showToast.text": {
|
|
2491
2491
|
"type": "message| options",
|
|
2492
2492
|
"description": "属性说明:展示文字提示,默认值:toast 实例(message支持传入HTML)"
|
|
2493
2493
|
},
|
|
2494
|
-
"nut-toast/
|
|
2494
|
+
"nut-toast/showToast.success": {
|
|
2495
2495
|
"type": "message| options",
|
|
2496
2496
|
"description": "属性说明:展示成功提示,默认值:toast 实例"
|
|
2497
2497
|
},
|
|
2498
|
-
"nut-toast/
|
|
2498
|
+
"nut-toast/showToast.fail": {
|
|
2499
2499
|
"type": "message| options",
|
|
2500
2500
|
"description": "属性说明:展示失败提示,默认值:toast 实例"
|
|
2501
2501
|
},
|
|
2502
|
-
"nut-toast/
|
|
2502
|
+
"nut-toast/showToast.warn": {
|
|
2503
2503
|
"type": "message| options",
|
|
2504
2504
|
"description": "属性说明:展示警告提示,默认值:toast 实例"
|
|
2505
2505
|
},
|
|
2506
|
-
"nut-toast/
|
|
2506
|
+
"nut-toast/showToast.hide": {
|
|
2507
2507
|
"type": "默认关闭所有实例,可传id关闭指定实例",
|
|
2508
2508
|
"description": "属性说明:关闭提示,默认值:void"
|
|
2509
2509
|
},
|
|
2510
|
-
"nut-toast/
|
|
2510
|
+
"nut-toast/showToast.loading": {
|
|
2511
2511
|
"type": "message| options",
|
|
2512
2512
|
"description": "属性说明:展示加载提示,默认值:toast 实例"
|
|
2513
2513
|
},
|
package/dist/smartips/tags.json
CHANGED
|
@@ -942,12 +942,12 @@
|
|
|
942
942
|
},
|
|
943
943
|
"nut-toast": {
|
|
944
944
|
"attributes": [
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
-
"
|
|
949
|
-
"
|
|
950
|
-
"
|
|
945
|
+
"showToast.text",
|
|
946
|
+
"showToast.success",
|
|
947
|
+
"showToast.fail",
|
|
948
|
+
"showToast.warn",
|
|
949
|
+
"showToast.hide",
|
|
950
|
+
"showToast.loading"
|
|
951
951
|
]
|
|
952
952
|
},
|
|
953
953
|
"nut-tour": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.0.0-beta.
|
|
5
|
+
"version": "4.0.0-beta.9",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -6169,7 +6169,7 @@
|
|
|
6169
6169
|
"events": [],
|
|
6170
6170
|
"attributes": [
|
|
6171
6171
|
{
|
|
6172
|
-
"name": "
|
|
6172
|
+
"name": "showToast.text",
|
|
6173
6173
|
"default": "toast 实例(message支持传入HTML)",
|
|
6174
6174
|
"description": "展示文字提示",
|
|
6175
6175
|
"value": {
|
|
@@ -6178,7 +6178,7 @@
|
|
|
6178
6178
|
}
|
|
6179
6179
|
},
|
|
6180
6180
|
{
|
|
6181
|
-
"name": "
|
|
6181
|
+
"name": "showToast.success",
|
|
6182
6182
|
"default": "toast 实例",
|
|
6183
6183
|
"description": "展示成功提示",
|
|
6184
6184
|
"value": {
|
|
@@ -6187,7 +6187,7 @@
|
|
|
6187
6187
|
}
|
|
6188
6188
|
},
|
|
6189
6189
|
{
|
|
6190
|
-
"name": "
|
|
6190
|
+
"name": "showToast.fail",
|
|
6191
6191
|
"default": "toast 实例",
|
|
6192
6192
|
"description": "展示失败提示",
|
|
6193
6193
|
"value": {
|
|
@@ -6196,7 +6196,7 @@
|
|
|
6196
6196
|
}
|
|
6197
6197
|
},
|
|
6198
6198
|
{
|
|
6199
|
-
"name": "
|
|
6199
|
+
"name": "showToast.warn",
|
|
6200
6200
|
"default": "toast 实例",
|
|
6201
6201
|
"description": "展示警告提示",
|
|
6202
6202
|
"value": {
|
|
@@ -6205,7 +6205,7 @@
|
|
|
6205
6205
|
}
|
|
6206
6206
|
},
|
|
6207
6207
|
{
|
|
6208
|
-
"name": "
|
|
6208
|
+
"name": "showToast.hide",
|
|
6209
6209
|
"default": "void",
|
|
6210
6210
|
"description": "关闭提示",
|
|
6211
6211
|
"value": {
|
|
@@ -6214,7 +6214,7 @@
|
|
|
6214
6214
|
}
|
|
6215
6215
|
},
|
|
6216
6216
|
{
|
|
6217
|
-
"name": "
|
|
6217
|
+
"name": "showToast.loading",
|
|
6218
6218
|
"default": "toast 实例",
|
|
6219
6219
|
"description": "展示加载提示",
|
|
6220
6220
|
"value": {
|