@web-utils/component 2.9.1 → 2.9.3

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.
@@ -1,12 +1,12 @@
1
1
  var c = Object.defineProperty;
2
- var r = Object.getOwnPropertySymbols;
2
+ var d = Object.getOwnPropertySymbols;
3
3
  var f = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
- var d = (t, e, i) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, h = (t, e) => {
4
+ var r = (t, e, i) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, h = (t, e) => {
5
5
  for (var i in e || (e = {}))
6
- f.call(e, i) && d(t, i, e[i]);
7
- if (r)
8
- for (var i of r(e))
9
- g.call(e, i) && d(t, i, e[i]);
6
+ f.call(e, i) && r(t, i, e[i]);
7
+ if (d)
8
+ for (var i of d(e))
9
+ g.call(e, i) && r(t, i, e[i]);
10
10
  return t;
11
11
  };
12
12
  import * as o from "monaco-editor/esm/vs/editor/editor.api";
@@ -81,7 +81,8 @@ const p = {
81
81
  this.initMonaco();
82
82
  },
83
83
  beforeDestroy() {
84
- this.editor && this.editor.dispose();
84
+ var t;
85
+ (t = this.editor) == null || t.dispose();
85
86
  },
86
87
  methods: {
87
88
  initMonaco() {
@@ -106,17 +107,17 @@ const p = {
106
107
  }, t.classList.add("editor-fullscreen"), this.editor.layout({
107
108
  height: document.body.clientHeight,
108
109
  width: document.body.clientWidth
109
- }), document.addEventListener("keyup", (e) => {
110
- e.keyCode === 27 && this.minEditor();
111
- });
110
+ }), document.addEventListener("keyup", this.handleEsc);
111
+ },
112
+ handleEsc(t) {
113
+ t.keyCode === 27 && this.minEditor();
112
114
  },
113
115
  // 缩小
114
116
  minEditor() {
115
117
  this.isMaximum = !1, this.$el.classList.remove("editor-fullscreen"), this.editor.layout({
116
118
  height: this.originSize.height,
117
119
  width: this.originSize.width
118
- }), document.removeEventListener("keyup", () => {
119
- });
120
+ }), document.removeEventListener("keyup", this.handleEsc);
120
121
  },
121
122
  _getEditor() {
122
123
  return this.editor ? this.diffEditor ? this.editor.modifiedEditor : this.editor : null;
@@ -179,12 +180,12 @@ var M = /* @__PURE__ */ m(
179
180
  _,
180
181
  y,
181
182
  !1,
182
- v,
183
+ E,
183
184
  null,
184
185
  null,
185
186
  null
186
187
  );
187
- function v(t) {
188
+ function E(t) {
188
189
  for (let e in u)
189
190
  this[e] = u[e];
190
191
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "2.9.1",
4
+ "version": "2.9.3",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",