@94ai/nf-confirm 3.1.42 → 3.1.44

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,
@@ -27,28 +27,27 @@ var _sfc_main = vueDemi.defineComponent({
27
27
  };
28
28
  },
29
29
  computed: {
30
- typeClass: function typeClass() {
31
- return this.type && typeMap[this.type] ? "el-icon-".concat(typeMap[this.type]) : "";
30
+ typeClass() {
31
+ return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : "";
32
32
  }
33
33
  },
34
34
  methods: {
35
- close: function close() {
36
- var _this = this;
35
+ close() {
37
36
  this.loading = false;
38
37
  this.visible = false;
39
- this.$nextTick(function() {
40
- _this.$destroy(true);
41
- _this.$el.parentNode.removeChild(_this.$el);
38
+ this.$nextTick(() => {
39
+ this.$destroy(true);
40
+ this.$el.parentNode.removeChild(this.$el);
42
41
  });
43
42
  },
44
- handleCancel: function handleCancel() {
43
+ handleCancel() {
45
44
  if (typeof this.onCancel === "function") {
46
45
  this.onCancel(this.close);
47
46
  } else {
48
47
  this.close();
49
48
  }
50
49
  },
51
- handleConfirm: function handleConfirm() {
50
+ handleConfirm() {
52
51
  if (typeof this.onConfirm === "function") {
53
52
  this.loading = true;
54
53
  this.onConfirm(this.close);
@@ -60,16 +59,16 @@ var _sfc_render = function render() {
60
59
  var _vm = this, _c = _vm._self._c;
61
60
  _vm._self._setupProxy;
62
61
  return _c("div", {
63
- "class": ["nf-confirm", _vm.customClass]
62
+ class: ["nf-confirm", _vm.customClass]
64
63
  }, [_c("el-dialog", {
65
64
  attrs: {
66
65
  "visible": _vm.visible,
67
66
  "showClose": false,
68
- "width": "".concat(_vm.width, "px"),
67
+ "width": `${_vm.width}px`,
69
68
  "close-on-click-modal": false
70
69
  },
71
70
  on: {
72
- "update:visible": function updateVisible($event) {
71
+ "update:visible": function($event) {
73
72
  _vm.visible = $event;
74
73
  }
75
74
  }
@@ -77,7 +76,7 @@ var _sfc_render = function render() {
77
76
  staticClass: "nf-confirm__wrapper"
78
77
  }, [_vm.type || _vm.iconClass ? _c("i", {
79
78
  staticClass: "nf-confirm__icon",
80
- "class": [_vm.typeClass, _vm.iconClass]
79
+ class: [_vm.typeClass, _vm.iconClass]
81
80
  }) : _vm._e(), _c("div", {
82
81
  staticClass: "nf-confirm__inner"
83
82
  }, [_c("h2", {
@@ -117,12 +116,12 @@ function merge(target) {
117
116
  }
118
117
  return target;
119
118
  }
120
- var ConfirmConstructor = vueDemi.Vue2.extend(NfConfirm);
121
- var Confirm = function Confirm2(options) {
119
+ const ConfirmConstructor = vueDemi.Vue2.extend(NfConfirm);
120
+ const Confirm = function(options) {
122
121
  if (vueDemi.Vue2.prototype.$isServer)
123
122
  return;
124
123
  options = merge({}, options);
125
- var instance = new ConfirmConstructor({
124
+ const instance = new ConfirmConstructor({
126
125
  data: options
127
126
  });
128
127
  instance.$mount();
@@ -130,7 +129,7 @@ var Confirm = function Confirm2(options) {
130
129
  instance.visible = true;
131
130
  return instance;
132
131
  };
133
- NfConfirm.install = function(app) {
132
+ NfConfirm.install = (app) => {
134
133
  app.component("nf-confirm", NfConfirm);
135
134
  app.prototype.$openConfirm = Confirm;
136
135
  };
@@ -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,
@@ -25,28 +25,27 @@ var _sfc_main = defineComponent({
25
25
  };
26
26
  },
27
27
  computed: {
28
- typeClass: function typeClass() {
29
- return this.type && typeMap[this.type] ? "el-icon-".concat(typeMap[this.type]) : "";
28
+ typeClass() {
29
+ return this.type && typeMap[this.type] ? `el-icon-${typeMap[this.type]}` : "";
30
30
  }
31
31
  },
32
32
  methods: {
33
- close: function close() {
34
- var _this = this;
33
+ close() {
35
34
  this.loading = false;
36
35
  this.visible = false;
37
- this.$nextTick(function() {
38
- _this.$destroy(true);
39
- _this.$el.parentNode.removeChild(_this.$el);
36
+ this.$nextTick(() => {
37
+ this.$destroy(true);
38
+ this.$el.parentNode.removeChild(this.$el);
40
39
  });
41
40
  },
42
- handleCancel: function handleCancel() {
41
+ handleCancel() {
43
42
  if (typeof this.onCancel === "function") {
44
43
  this.onCancel(this.close);
45
44
  } else {
46
45
  this.close();
47
46
  }
48
47
  },
49
- handleConfirm: function handleConfirm() {
48
+ handleConfirm() {
50
49
  if (typeof this.onConfirm === "function") {
51
50
  this.loading = true;
52
51
  this.onConfirm(this.close);
@@ -58,16 +57,16 @@ var _sfc_render = function render() {
58
57
  var _vm = this, _c = _vm._self._c;
59
58
  _vm._self._setupProxy;
60
59
  return _c("div", {
61
- "class": ["nf-confirm", _vm.customClass]
60
+ class: ["nf-confirm", _vm.customClass]
62
61
  }, [_c("el-dialog", {
63
62
  attrs: {
64
63
  "visible": _vm.visible,
65
64
  "showClose": false,
66
- "width": "".concat(_vm.width, "px"),
65
+ "width": `${_vm.width}px`,
67
66
  "close-on-click-modal": false
68
67
  },
69
68
  on: {
70
- "update:visible": function updateVisible($event) {
69
+ "update:visible": function($event) {
71
70
  _vm.visible = $event;
72
71
  }
73
72
  }
@@ -75,7 +74,7 @@ var _sfc_render = function render() {
75
74
  staticClass: "nf-confirm__wrapper"
76
75
  }, [_vm.type || _vm.iconClass ? _c("i", {
77
76
  staticClass: "nf-confirm__icon",
78
- "class": [_vm.typeClass, _vm.iconClass]
77
+ class: [_vm.typeClass, _vm.iconClass]
79
78
  }) : _vm._e(), _c("div", {
80
79
  staticClass: "nf-confirm__inner"
81
80
  }, [_c("h2", {
@@ -115,12 +114,12 @@ function merge(target) {
115
114
  }
116
115
  return target;
117
116
  }
118
- var ConfirmConstructor = Vue2.extend(NfConfirm);
119
- var Confirm = function Confirm2(options) {
117
+ const ConfirmConstructor = Vue2.extend(NfConfirm);
118
+ const Confirm = function(options) {
120
119
  if (Vue2.prototype.$isServer)
121
120
  return;
122
121
  options = merge({}, options);
123
- var instance = new ConfirmConstructor({
122
+ const instance = new ConfirmConstructor({
124
123
  data: options
125
124
  });
126
125
  instance.$mount();
@@ -128,7 +127,7 @@ var Confirm = function Confirm2(options) {
128
127
  instance.visible = true;
129
128
  return instance;
130
129
  };
131
- NfConfirm.install = function(app) {
130
+ NfConfirm.install = (app) => {
132
131
  app.component("nf-confirm", NfConfirm);
133
132
  app.prototype.$openConfirm = Confirm;
134
133
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-confirm",
3
- "version": "3.1.42",
3
+ "version": "3.1.44",
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.1.42",
17
+ "@94ai/nf-theme-chalk": "^3.1.44",
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": "2b60696b405feafbbaeed385e5bcf666ceefbf2c"
33
+ "gitHead": "5248a62b4d86306b5e1de04357452a1a591ebaee"
34
34
  }