@web-utils/component 2.9.2 → 2.9.4

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.
@@ -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() {
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.2",
4
+ "version": "2.9.4",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -0,0 +1,83 @@
1
+ var o = (t, e, s) => new Promise((u, r) => {
2
+ var c = (n) => {
3
+ try {
4
+ a(s.next(n));
5
+ } catch (i) {
6
+ r(i);
7
+ }
8
+ }, _ = (n) => {
9
+ try {
10
+ a(s.throw(n));
11
+ } catch (i) {
12
+ r(i);
13
+ }
14
+ }, a = (n) => n.done ? u(n.value) : Promise.resolve(n.value).then(c, _);
15
+ a((s = s.apply(t, e)).next());
16
+ });
17
+ import { drawToCanvas as p, genDataURL as d, genSVG as h } from "@web-utils/integrations/qrcode";
18
+ import { n as f } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
19
+ const m = {
20
+ name: "VueQrCode",
21
+ props: {
22
+ /**
23
+ * 二维码内容字符串
24
+ */
25
+ text: {
26
+ type: String,
27
+ default: "0"
28
+ },
29
+ /**
30
+ * 生成二维码配置选项
31
+ * {@link https://github.com/soldair/node-qrcode#qr-code-options}
32
+ */
33
+ options: Object,
34
+ /**
35
+ * 组件根元素标签
36
+ */
37
+ tag: {
38
+ type: String,
39
+ default: "canvas"
40
+ }
41
+ },
42
+ watch: {
43
+ $props: {
44
+ deep: !0,
45
+ immediate: !0,
46
+ handler: "generate"
47
+ }
48
+ },
49
+ methods: {
50
+ generate() {
51
+ return o(this, null, function* () {
52
+ yield this.$nextTick();
53
+ const { options: t, tag: e } = this;
54
+ e === "canvas" ? yield p(this.$el, this.text, t) : e === "img" ? this.$el.src = yield d(this.text, t) : this.$el.innerHTML = yield h(this.text, t);
55
+ });
56
+ }
57
+ },
58
+ render(t) {
59
+ return t(this.tag, this.$slots.default);
60
+ }
61
+ };
62
+ let g, v;
63
+ const l = {};
64
+ var x = /* @__PURE__ */ f(
65
+ m,
66
+ g,
67
+ v,
68
+ !1,
69
+ w,
70
+ null,
71
+ null,
72
+ null
73
+ );
74
+ function w(t) {
75
+ for (let e in l)
76
+ this[e] = l[e];
77
+ }
78
+ const S = /* @__PURE__ */ function() {
79
+ return x.exports;
80
+ }();
81
+ export {
82
+ S as default
83
+ };