@94ai/nf-confirm 3.2.44 → 3.2.47
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/nf-confirm.cjs.js +20 -19
- package/lib/nf-confirm.esm-bundler.js +20 -19
- package/package.json +3 -3
package/lib/nf-confirm.cjs.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vueDemi = require("vue-demi");
|
|
4
4
|
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
5
|
-
|
|
5
|
+
var typeMap = {
|
|
6
6
|
success: "success",
|
|
7
7
|
info: "info",
|
|
8
8
|
warning: "warning",
|
|
9
9
|
error: "error"
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
var _sfc_main = vueDemi.defineComponent({
|
|
12
12
|
name: "nf-confirm",
|
|
13
|
-
data() {
|
|
13
|
+
data: function data() {
|
|
14
14
|
return {
|
|
15
15
|
visible: false,
|
|
16
16
|
width: 400,
|
|
@@ -28,27 +28,28 @@ const _sfc_main = vueDemi.defineComponent({
|
|
|
28
28
|
};
|
|
29
29
|
},
|
|
30
30
|
computed: {
|
|
31
|
-
typeClass() {
|
|
32
|
-
return this.type && typeMap[this.type] ?
|
|
31
|
+
typeClass: function typeClass() {
|
|
32
|
+
return this.type && typeMap[this.type] ? "el-icon-".concat(typeMap[this.type]) : "";
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
methods: {
|
|
36
|
-
close() {
|
|
36
|
+
close: function close() {
|
|
37
|
+
var _this = this;
|
|
37
38
|
this.loading = false;
|
|
38
39
|
this.visible = false;
|
|
39
|
-
this.$nextTick(()
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
this.$nextTick(function() {
|
|
41
|
+
_this.$destroy(true);
|
|
42
|
+
_this.$el.parentNode.removeChild(_this.$el);
|
|
42
43
|
});
|
|
43
44
|
},
|
|
44
|
-
handleCancel() {
|
|
45
|
+
handleCancel: function handleCancel() {
|
|
45
46
|
if (typeof this.onCancel === "function") {
|
|
46
47
|
this.onCancel(this.close);
|
|
47
48
|
} else {
|
|
48
49
|
this.close();
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
|
-
handleConfirm() {
|
|
52
|
+
handleConfirm: function handleConfirm() {
|
|
52
53
|
if (typeof this.onConfirm === "function") {
|
|
53
54
|
this.loading = true;
|
|
54
55
|
this.onConfirm(this.close);
|
|
@@ -60,16 +61,16 @@ var _sfc_render = function render() {
|
|
|
60
61
|
var _vm = this, _c = _vm._self._c;
|
|
61
62
|
_vm._self._setupProxy;
|
|
62
63
|
return _c("div", {
|
|
63
|
-
class: ["nf-confirm", _vm.customClass]
|
|
64
|
+
"class": ["nf-confirm", _vm.customClass]
|
|
64
65
|
}, [_c("el-dialog", {
|
|
65
66
|
attrs: {
|
|
66
67
|
"visible": _vm.visible,
|
|
67
68
|
"showClose": false,
|
|
68
|
-
"width":
|
|
69
|
+
"width": "".concat(_vm.width, "px"),
|
|
69
70
|
"close-on-click-modal": false
|
|
70
71
|
},
|
|
71
72
|
on: {
|
|
72
|
-
"update:visible": function($event) {
|
|
73
|
+
"update:visible": function updateVisible($event) {
|
|
73
74
|
_vm.visible = $event;
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -77,7 +78,7 @@ var _sfc_render = function render() {
|
|
|
77
78
|
staticClass: "nf-confirm__wrapper"
|
|
78
79
|
}, [_vm.type || _vm.iconClass ? _c("i", {
|
|
79
80
|
staticClass: "nf-confirm__icon",
|
|
80
|
-
class: [_vm.typeClass, _vm.iconClass]
|
|
81
|
+
"class": [_vm.typeClass, _vm.iconClass]
|
|
81
82
|
}) : _vm._e(), _c("div", {
|
|
82
83
|
staticClass: "nf-confirm__inner"
|
|
83
84
|
}, [_c("h2", {
|
|
@@ -122,12 +123,12 @@ function merge(target) {
|
|
|
122
123
|
}
|
|
123
124
|
return target;
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
var ConfirmConstructor = vueDemi.Vue2.extend(NfConfirm);
|
|
127
|
+
var Confirm = function Confirm2(options) {
|
|
127
128
|
if (vueDemi.Vue2.prototype.$isServer)
|
|
128
129
|
return;
|
|
129
130
|
options = merge({}, options);
|
|
130
|
-
|
|
131
|
+
var instance = new ConfirmConstructor({
|
|
131
132
|
data: options
|
|
132
133
|
});
|
|
133
134
|
instance.$mount();
|
|
@@ -135,7 +136,7 @@ const Confirm = function(options) {
|
|
|
135
136
|
instance.visible = true;
|
|
136
137
|
return instance;
|
|
137
138
|
};
|
|
138
|
-
NfConfirm.install = (app)
|
|
139
|
+
NfConfirm.install = function(app) {
|
|
139
140
|
app.component("nf-confirm", NfConfirm);
|
|
140
141
|
app.prototype.$openConfirm = Confirm;
|
|
141
142
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent, Vue2 } from "vue-demi";
|
|
2
2
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
|
-
|
|
3
|
+
var typeMap = {
|
|
4
4
|
success: "success",
|
|
5
5
|
info: "info",
|
|
6
6
|
warning: "warning",
|
|
7
7
|
error: "error"
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
var _sfc_main = defineComponent({
|
|
10
10
|
name: "nf-confirm",
|
|
11
|
-
data() {
|
|
11
|
+
data: function data() {
|
|
12
12
|
return {
|
|
13
13
|
visible: false,
|
|
14
14
|
width: 400,
|
|
@@ -26,27 +26,28 @@ const _sfc_main = defineComponent({
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
|
-
typeClass() {
|
|
30
|
-
return this.type && typeMap[this.type] ?
|
|
29
|
+
typeClass: function typeClass() {
|
|
30
|
+
return this.type && typeMap[this.type] ? "el-icon-".concat(typeMap[this.type]) : "";
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
methods: {
|
|
34
|
-
close() {
|
|
34
|
+
close: function close() {
|
|
35
|
+
var _this = this;
|
|
35
36
|
this.loading = false;
|
|
36
37
|
this.visible = false;
|
|
37
|
-
this.$nextTick(()
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
this.$nextTick(function() {
|
|
39
|
+
_this.$destroy(true);
|
|
40
|
+
_this.$el.parentNode.removeChild(_this.$el);
|
|
40
41
|
});
|
|
41
42
|
},
|
|
42
|
-
handleCancel() {
|
|
43
|
+
handleCancel: function handleCancel() {
|
|
43
44
|
if (typeof this.onCancel === "function") {
|
|
44
45
|
this.onCancel(this.close);
|
|
45
46
|
} else {
|
|
46
47
|
this.close();
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
|
-
handleConfirm() {
|
|
50
|
+
handleConfirm: function handleConfirm() {
|
|
50
51
|
if (typeof this.onConfirm === "function") {
|
|
51
52
|
this.loading = true;
|
|
52
53
|
this.onConfirm(this.close);
|
|
@@ -58,16 +59,16 @@ var _sfc_render = function render() {
|
|
|
58
59
|
var _vm = this, _c = _vm._self._c;
|
|
59
60
|
_vm._self._setupProxy;
|
|
60
61
|
return _c("div", {
|
|
61
|
-
class: ["nf-confirm", _vm.customClass]
|
|
62
|
+
"class": ["nf-confirm", _vm.customClass]
|
|
62
63
|
}, [_c("el-dialog", {
|
|
63
64
|
attrs: {
|
|
64
65
|
"visible": _vm.visible,
|
|
65
66
|
"showClose": false,
|
|
66
|
-
"width":
|
|
67
|
+
"width": "".concat(_vm.width, "px"),
|
|
67
68
|
"close-on-click-modal": false
|
|
68
69
|
},
|
|
69
70
|
on: {
|
|
70
|
-
"update:visible": function($event) {
|
|
71
|
+
"update:visible": function updateVisible($event) {
|
|
71
72
|
_vm.visible = $event;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -75,7 +76,7 @@ var _sfc_render = function render() {
|
|
|
75
76
|
staticClass: "nf-confirm__wrapper"
|
|
76
77
|
}, [_vm.type || _vm.iconClass ? _c("i", {
|
|
77
78
|
staticClass: "nf-confirm__icon",
|
|
78
|
-
class: [_vm.typeClass, _vm.iconClass]
|
|
79
|
+
"class": [_vm.typeClass, _vm.iconClass]
|
|
79
80
|
}) : _vm._e(), _c("div", {
|
|
80
81
|
staticClass: "nf-confirm__inner"
|
|
81
82
|
}, [_c("h2", {
|
|
@@ -120,12 +121,12 @@ function merge(target) {
|
|
|
120
121
|
}
|
|
121
122
|
return target;
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
var ConfirmConstructor = Vue2.extend(NfConfirm);
|
|
125
|
+
var Confirm = function Confirm2(options) {
|
|
125
126
|
if (Vue2.prototype.$isServer)
|
|
126
127
|
return;
|
|
127
128
|
options = merge({}, options);
|
|
128
|
-
|
|
129
|
+
var instance = new ConfirmConstructor({
|
|
129
130
|
data: options
|
|
130
131
|
});
|
|
131
132
|
instance.$mount();
|
|
@@ -133,7 +134,7 @@ const Confirm = function(options) {
|
|
|
133
134
|
instance.visible = true;
|
|
134
135
|
return instance;
|
|
135
136
|
};
|
|
136
|
-
NfConfirm.install = (app)
|
|
137
|
+
NfConfirm.install = function(app) {
|
|
137
138
|
app.component("nf-confirm", NfConfirm);
|
|
138
139
|
app.prototype.$openConfirm = Confirm;
|
|
139
140
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-confirm",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.47",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zhongzhenjie <1476686104@qq.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^3.2.
|
|
17
|
+
"@94ai/nf-theme-chalk": "^3.2.47",
|
|
18
18
|
"vue-demi": "^0.14.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"types": "lib/index.d.ts",
|
|
31
31
|
"main": "lib/nf-confirm.cjs.js",
|
|
32
32
|
"module": "lib/nf-confirm.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "91145bb7df8dad2c0cb3eefb101c6158ec854269"
|
|
34
34
|
}
|