@94ai/nf-confirm 3.1.38 → 3.1.40

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