@94ai/nf-confirm 3.2.47 → 3.2.49

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