@94ai/nf-toast-demo 8.3.23 → 10.0.0
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/lib/createInstants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const toast: (options: any) => any;
|
|
2
|
-
declare const success: (options: any) =>
|
|
3
|
-
declare const errorFunc: (options: any) =>
|
|
4
|
-
declare const warning: (options: any) =>
|
|
5
|
-
declare const info: (options: any) =>
|
|
2
|
+
declare const success: (options: any) => any;
|
|
3
|
+
declare const errorFunc: (options: any) => any;
|
|
4
|
+
declare const warning: (options: any) => any;
|
|
5
|
+
declare const info: (options: any) => any;
|
|
6
6
|
export { toast, success, errorFunc, warning, info };
|
package/lib/nf-toast-demo.cjs.js
CHANGED
|
@@ -175,8 +175,6 @@ const NotificationConstructor = vueDemi.Vue2.extend(Component);
|
|
|
175
175
|
const instances = [];
|
|
176
176
|
let seed = 1;
|
|
177
177
|
const removeInstance = (instance) => {
|
|
178
|
-
if (!instance)
|
|
179
|
-
return;
|
|
180
178
|
const len = instances.length;
|
|
181
179
|
const index = instances.findIndex((inst) => instance.id === inst.id);
|
|
182
180
|
instances.splice(index, 1);
|
|
@@ -224,16 +222,16 @@ const toast = (options) => {
|
|
|
224
222
|
return instance.vm;
|
|
225
223
|
};
|
|
226
224
|
const success = (options) => {
|
|
227
|
-
toast(Object.assign(options, {
|
|
225
|
+
return toast(Object.assign({}, options, { tip: "success" }));
|
|
228
226
|
};
|
|
229
227
|
const errorFunc = (options) => {
|
|
230
|
-
toast(Object.assign(options, {
|
|
228
|
+
return toast(Object.assign({}, options, { tip: "error" }));
|
|
231
229
|
};
|
|
232
230
|
const warning = (options) => {
|
|
233
|
-
toast(Object.assign(options, {
|
|
231
|
+
return toast(Object.assign({}, options, { tip: "warning" }));
|
|
234
232
|
};
|
|
235
233
|
const info = (options) => {
|
|
236
|
-
toast(Object.assign(options, {
|
|
234
|
+
return toast(Object.assign({}, options, { tip: "info" }));
|
|
237
235
|
};
|
|
238
236
|
NfToastDemo.install = (app) => {
|
|
239
237
|
app.component("nf-toast-demo", NfToastDemo);
|
|
@@ -173,8 +173,6 @@ const NotificationConstructor = Vue2.extend(Component);
|
|
|
173
173
|
const instances = [];
|
|
174
174
|
let seed = 1;
|
|
175
175
|
const removeInstance = (instance) => {
|
|
176
|
-
if (!instance)
|
|
177
|
-
return;
|
|
178
176
|
const len = instances.length;
|
|
179
177
|
const index = instances.findIndex((inst) => instance.id === inst.id);
|
|
180
178
|
instances.splice(index, 1);
|
|
@@ -222,16 +220,16 @@ const toast = (options) => {
|
|
|
222
220
|
return instance.vm;
|
|
223
221
|
};
|
|
224
222
|
const success = (options) => {
|
|
225
|
-
toast(Object.assign(options, {
|
|
223
|
+
return toast(Object.assign({}, options, { tip: "success" }));
|
|
226
224
|
};
|
|
227
225
|
const errorFunc = (options) => {
|
|
228
|
-
toast(Object.assign(options, {
|
|
226
|
+
return toast(Object.assign({}, options, { tip: "error" }));
|
|
229
227
|
};
|
|
230
228
|
const warning = (options) => {
|
|
231
|
-
toast(Object.assign(options, {
|
|
229
|
+
return toast(Object.assign({}, options, { tip: "warning" }));
|
|
232
230
|
};
|
|
233
231
|
const info = (options) => {
|
|
234
|
-
toast(Object.assign(options, {
|
|
232
|
+
return toast(Object.assign({}, options, { tip: "info" }));
|
|
235
233
|
};
|
|
236
234
|
NfToastDemo.install = (app) => {
|
|
237
235
|
app.component("nf-toast-demo", NfToastDemo);
|
|
@@ -4,7 +4,6 @@ const NotificationConstructor = Vue2!.extend(Component) as any
|
|
|
4
4
|
const instances = []
|
|
5
5
|
let seed = 1
|
|
6
6
|
const removeInstance = (instance) => {
|
|
7
|
-
if (!instance) return
|
|
8
7
|
const len = instances.length
|
|
9
8
|
// @ts-ignore
|
|
10
9
|
const index = instances.findIndex((inst) => instance.id === inst.id)
|
|
@@ -56,16 +55,16 @@ const toast = (options) => {
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
const success = (options) => {
|
|
59
|
-
toast(Object.assign(options, {
|
|
58
|
+
return toast(Object.assign({}, options, { tip: 'success' }))
|
|
60
59
|
}
|
|
61
60
|
const errorFunc = (options) => {
|
|
62
|
-
toast(Object.assign(options, {
|
|
61
|
+
return toast(Object.assign({}, options, { tip: 'error' }))
|
|
63
62
|
}
|
|
64
63
|
const warning = (options) => {
|
|
65
|
-
toast(Object.assign(options, {
|
|
64
|
+
return toast(Object.assign({}, options, { tip: 'warning' }))
|
|
66
65
|
}
|
|
67
66
|
const info = (options) => {
|
|
68
|
-
toast(Object.assign(options, {
|
|
67
|
+
return toast(Object.assign({}, options, { tip: 'info' }))
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
export { toast, success, errorFunc, warning, info }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-toast-demo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "toast示例组件",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"toast"
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "http://94ai.
|
|
16
|
+
"url": "http://gitlab.94ai.pro/zoujiahe/common-ui.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@94ai/nf-theme-chalk": "^
|
|
20
|
-
"vue-demi": "^0.14.5"
|
|
19
|
+
"@94ai/nf-theme-chalk": "^10.0.0",
|
|
20
|
+
"vue-demi": "^0.14.5",
|
|
21
|
+
"@94ai/vue2-runtime-helpers": "1.0.1"
|
|
21
22
|
},
|
|
22
23
|
"peerDependenciesMeta": {
|
|
23
24
|
"@vue/composition-api": {
|
|
@@ -26,11 +27,10 @@
|
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"@vue/composition-api": "^1.0.0-rc.1",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
30
|
+
"vue": "^2.0.0 || >=3.0.0",
|
|
31
|
+
"element-ui": ">=2.13.2"
|
|
31
32
|
},
|
|
32
33
|
"types": "lib/index.d.ts",
|
|
33
34
|
"main": "lib/nf-toast-demo.cjs.js",
|
|
34
|
-
"module": "lib/nf-toast-demo.esm-bundler.js"
|
|
35
|
-
"gitHead": "74e871c7972dc4576480bee02b1dc61a3eafc6ba"
|
|
35
|
+
"module": "lib/nf-toast-demo.esm-bundler.js"
|
|
36
36
|
}
|