qsyx-element 1.0.37 → 1.0.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.
@@ -1,19 +1,19 @@
1
- import { defineComponent as B, ref as D, reactive as V, onMounted as I, createElementBlock as _, openBlock as c, createBlock as u, createCommentVNode as b, unref as p, withCtx as i, createVNode as g, createTextVNode as y, renderSlot as E } from "vue";
2
- import { F as j } from "./Form-DpHr8PuL.js";
3
- import { E as F, a as w } from "./vendor-BnmCRiB_.js";
1
+ import { defineComponent as B, ref as D, reactive as V, onMounted as _, createElementBlock as E, openBlock as c, createBlock as u, createCommentVNode as b, unref as p, withCtx as a, createVNode as y, createTextVNode as g, renderSlot as j } from "vue";
2
+ import { F } from "./Form-DORlJgXJ.js";
3
+ import { E as I, a as w } from "./vendor-BnmCRiB_.js";
4
4
  import { w as N } from "./utils-DCPG9S9d.js";
5
5
  let C = /* @__PURE__ */ new WeakMap();
6
6
  function h(o) {
7
7
  if (typeof o != "object" || o === null)
8
8
  return o;
9
- const d = C.get(o);
10
- if (d)
11
- return d;
12
- const s = Array.isArray(o) ? [] : {};
13
- Object.setPrototypeOf(s, Object.getPrototypeOf(o)), C.set(o, s);
9
+ const i = C.get(o);
10
+ if (i)
11
+ return i;
12
+ const n = Array.isArray(o) ? [] : {};
13
+ Object.setPrototypeOf(n, Object.getPrototypeOf(o)), C.set(o, n);
14
14
  for (const t in o)
15
- o.hasOwnProperty(t) && (s[t] = h(o[t]));
16
- return s;
15
+ o.hasOwnProperty(t) && (n[t] = h(o[t]));
16
+ return n;
17
17
  }
18
18
  const P = /* @__PURE__ */ B({
19
19
  name: "QsyxDialog",
@@ -25,8 +25,8 @@ const P = /* @__PURE__ */ B({
25
25
  tableData: {}
26
26
  },
27
27
  emits: ["open", "close", "save"],
28
- setup(o, { expose: d, emit: s }) {
29
- const t = s, f = D(), l = o, e = V({
28
+ setup(o, { expose: i, emit: n }) {
29
+ const t = n, f = D(), d = o, e = V({
30
30
  visible: !0,
31
31
  alignCenter: !0,
32
32
  center: !0,
@@ -37,9 +37,9 @@ const P = /* @__PURE__ */ B({
37
37
  showClose: !0,
38
38
  appendToBody: !1
39
39
  });
40
- I(() => {
41
- let r = h(l.form);
42
- console.log("props.form", l.form), console.log("props.activeIndex", l.activeIndex), r.data = l.tableData.find((n, a) => a === l.activeIndex), console.log("form.data", r), f.value = r;
40
+ _(() => {
41
+ let s = h(d.form);
42
+ s.data = d.tableData.find((r, l) => l === d.activeIndex), f.value = s;
43
43
  });
44
44
  const k = () => {
45
45
  e.visible = !0;
@@ -48,57 +48,57 @@ const P = /* @__PURE__ */ B({
48
48
  }, m = () => {
49
49
  t("close");
50
50
  };
51
- return d({
51
+ return i({
52
52
  open: k
53
- }), (r, n) => (c(), _("div", null, [
54
- e.visible ? (c(), u(p(F), {
53
+ }), (s, r) => (c(), E("div", null, [
54
+ e.visible ? (c(), u(p(I), {
55
55
  key: 0,
56
56
  modelValue: e.visible,
57
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.visible = a),
57
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => e.visible = l),
58
58
  "append-to-body": e.appendToBody,
59
59
  title: e.title,
60
60
  "show-close": e.showClose,
61
61
  width: e.width,
62
62
  center: e.center,
63
63
  "align-center": e.alignCenter,
64
- onOpend: r.opend,
64
+ onOpend: s.opend,
65
65
  onClose: m,
66
66
  "destroy-on-close": e.destroyOnClose,
67
67
  draggable: e.draggable,
68
68
  "close-on-click-modal": !1
69
69
  }, {
70
- header: i(({ close: a, titleId: v, titleClass: x }) => [
71
- E(r.$slots, "header", {
72
- close: a,
70
+ header: a(({ close: l, titleId: v, titleClass: x }) => [
71
+ j(s.$slots, "header", {
72
+ close: l,
73
73
  titleId: v,
74
74
  titleClass: x
75
75
  })
76
76
  ]),
77
- footer: i(() => [
78
- g(p(w), { onClick: m }, {
79
- default: i(() => n[1] || (n[1] = [
80
- y("取消")
77
+ footer: a(() => [
78
+ y(p(w), { onClick: m }, {
79
+ default: a(() => r[1] || (r[1] = [
80
+ g("取消")
81
81
  ])),
82
82
  _: 1,
83
83
  __: [1]
84
84
  }),
85
- g(p(w), {
85
+ y(p(w), {
86
86
  type: "primary",
87
87
  onClick: O
88
88
  }, {
89
- default: i(() => n[2] || (n[2] = [
90
- y("保存")
89
+ default: a(() => r[2] || (r[2] = [
90
+ g("保存")
91
91
  ])),
92
92
  _: 1,
93
93
  __: [2]
94
94
  })
95
95
  ]),
96
- default: i(() => [
97
- e.visible ? (c(), u(j, {
96
+ default: a(() => [
97
+ e.visible ? (c(), u(F, {
98
98
  key: 0,
99
99
  ref: "formRef",
100
100
  form: f.value,
101
- disabled: r.disabled
101
+ disabled: s.disabled
102
102
  }, null, 8, ["form", "disabled"])) : b("", !0)
103
103
  ]),
104
104
  _: 3
@@ -557,7 +557,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
557
557
  let t = ref(!0);
558
558
  if (formRef.value)
559
559
  return await formRef.value.validate((r) => {
560
- r ? (console.log("submit!"), t.value = !0) : (console.log("error submit!"), t.value = !1);
560
+ r ? t.value = !0 : t.value = !1;
561
561
  }), t.value;
562
562
  }, emit = __emit, props = __props;
563
563
  computed(() => props), watch(
@@ -905,7 +905,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
905
905
  }, 8, ["model", "label-width", "rules"])
906
906
  ]));
907
907
  }
908
- }), Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0b873e61"]]), QsyxForm = withInstall(Form);
908
+ }), Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bf804284"]]), QsyxForm = withInstall(Form);
909
909
  export {
910
910
  Form as F,
911
911
  QsyxSelect as Q,
@@ -1,6 +1,6 @@
1
- import { defineComponent as A, ref as u, useSlots as G, reactive as $, onMounted as J, createElementBlock as S, openBlock as n, createElementVNode as B, createBlock as c, createCommentVNode as p, renderSlot as d, unref as o, withModifiers as D, withCtx as s, createTextVNode as f, createVNode as y, Fragment as E, renderList as K, toDisplayString as P } from "vue";
2
- import { _ as U } from "./Dialog-B-znQHW2.js";
3
- import { a as k, o as W, p as T } from "./vendor-BnmCRiB_.js";
1
+ import { defineComponent as A, ref as i, useSlots as G, reactive as $, onMounted as J, createElementBlock as g, openBlock as n, createElementVNode as B, createBlock as d, createCommentVNode as u, renderSlot as c, unref as o, withModifiers as S, withCtx as s, createTextVNode as v, createVNode as f, Fragment as E, renderList as K, toDisplayString as P } from "vue";
2
+ import { _ as U } from "./Dialog-DbXk3UWu.js";
3
+ import { a as y, o as W, p as T } from "./vendor-BnmCRiB_.js";
4
4
  import { w as X } from "./utils-DCPG9S9d.js";
5
5
  const Y = { style: { float: "right" } }, Z = /* @__PURE__ */ A({
6
6
  name: "QsyxTable",
@@ -12,133 +12,132 @@ const Y = { style: { float: "right" } }, Z = /* @__PURE__ */ A({
12
12
  },
13
13
  emits: ["open", "close", "save"],
14
14
  setup(H, { expose: I, emit: R }) {
15
- const l = H, C = R, g = u([]);
15
+ const l = H, k = R, D = i([]);
16
16
  I({
17
- multipleSelection: g
17
+ multipleSelection: D
18
18
  });
19
19
  const V = (e) => {
20
- g.value = e, console.log("multipleSelection", g.value);
21
- }, m = u(!1), b = u(!0), h = G(), _ = u(NaN);
22
- let r = $([]);
23
- const z = u(), v = $([]), w = u(!1), F = () => {
24
- console.log("<props.table.items", l.table.items);
20
+ D.value = e;
21
+ }, m = i(!1), p = i(!0), C = G(), h = i(NaN);
22
+ let b = $([]);
23
+ const z = i(), _ = $([]), w = i(!1), F = () => {
25
24
  for (let e = 0; e < l.table.items.length; e++)
26
- l.table.items[e].type === "select" ? v.push({
25
+ l.table.items[e].type === "select" ? _.push({
27
26
  prop: l.table.items[e].code + "Label",
28
27
  label: l.table.items[e].label,
29
28
  tableHeader: l.table.items[e].tableHeader,
30
29
  visiable: l.table.items[e].visiable
31
- }) : v.push({
30
+ }) : _.push({
32
31
  prop: l.table.items[e].code,
33
32
  label: l.table.items[e].label,
34
33
  tableHeader: l.table.items[e].tableHeader,
35
34
  visiable: l.table.items[e].visiable
36
35
  });
37
- r.push(...l.table.data), console.log("tableColumn", v);
36
+ b.push(...l.table.data);
38
37
  }, Q = (e, t) => {
39
- b.value = !1, r.splice(t, 1), b.value = !0;
38
+ p.value = !1, b.splice(t, 1), p.value = !0;
40
39
  }, x = () => {
41
- b.value = !1;
40
+ p.value = !1;
42
41
  let e = {};
43
42
  for (let t = 0; t < l.table.items.length; t++)
44
43
  e[l.table.items[t].code] = "";
45
- r.push(e), b.value = !0, console.log("tableData", r);
44
+ b.push(e), p.value = !0;
46
45
  }, L = (e, t) => {
47
- w.value = !1, _.value = t, m.value = !0;
46
+ w.value = !1, h.value = t, m.value = !0;
48
47
  }, M = (e, t) => {
49
- _.value = t, w.value = !0, m.value = !0;
48
+ h.value = t, w.value = !0, m.value = !0;
50
49
  }, O = () => {
51
- C("close"), m.value = !1;
50
+ k("close"), m.value = !1;
52
51
  }, j = () => {
53
- C("open");
52
+ k("open");
54
53
  }, q = () => {
55
- C("save");
54
+ k("save");
56
55
  };
57
56
  return J(() => {
58
57
  F();
59
- }), (e, t) => (n(), S("div", null, [
58
+ }), (e, t) => (n(), g("div", null, [
60
59
  B("div", Y, [
61
- o(h).add ? d(e.$slots, "add", { key: 0 }) : (n(), c(o(k), {
60
+ o(C).add ? c(e.$slots, "add", { key: 0 }) : (n(), d(o(y), {
62
61
  key: 1,
63
62
  type: "primary",
64
- onClick: D(x, ["prevent"])
63
+ onClick: S(x, ["prevent"])
65
64
  }, {
66
65
  default: s(() => t[0] || (t[0] = [
67
- f(" 新增 ")
66
+ v(" 新增 ")
68
67
  ])),
69
68
  _: 1,
70
69
  __: [0]
71
70
  }))
72
71
  ]),
73
- b.value ? (n(), c(o(W), {
72
+ p.value ? (n(), d(o(W), {
74
73
  key: 0,
75
- data: o(r),
74
+ data: o(b),
76
75
  style: { width: "100%" },
77
76
  onSelectionChange: V
78
77
  }, {
79
78
  default: s(() => [
80
- l.isSelection ? (n(), c(o(T), {
79
+ l.isSelection ? (n(), d(o(T), {
81
80
  key: 0,
82
81
  type: "selection",
83
82
  selectable: l.selectable ? l.selectable : (a) => a,
84
83
  width: "55"
85
- }, null, 8, ["selectable"])) : p("", !0),
86
- (n(!0), S(E, null, K(v, (a, i) => (n(), S(E, null, [
87
- a.tableHeader && a.visiable ? (n(), c(o(T), {
84
+ }, null, 8, ["selectable"])) : u("", !0),
85
+ (n(!0), g(E, null, K(_, (a, r) => (n(), g(E, null, [
86
+ a.tableHeader && a.visiable ? (n(), d(o(T), {
88
87
  prop: a.prop,
89
88
  label: a.label,
90
- key: i
89
+ key: r
91
90
  }, {
92
91
  default: s(() => [
93
- o(h)[a.prop] ? d(e.$slots, a.prop, {
92
+ o(C)[a.prop] ? c(e.$slots, a.prop, {
94
93
  key: 0,
95
94
  index: e.$index,
96
95
  row: e.row
97
- }) : p("", !0)
96
+ }) : u("", !0)
98
97
  ]),
99
98
  _: 2
100
- }, 1032, ["prop", "label"])) : p("", !0)
99
+ }, 1032, ["prop", "label"])) : u("", !0)
101
100
  ], 64))), 256)),
102
- y(o(T), { label: "操作" }, {
103
- default: s(({ row: a, $index: i }) => [
104
- o(h).opreate ? d(e.$slots, "opreate", {
101
+ f(o(T), { label: "操作" }, {
102
+ default: s(({ row: a, $index: r }) => [
103
+ o(C).opreate ? c(e.$slots, "opreate", {
105
104
  key: 0,
106
- index: i,
105
+ index: r,
107
106
  row: a
108
- }) : p("", !0),
107
+ }) : u("", !0),
109
108
  B("div", null, [
110
- y(o(k), {
109
+ f(o(y), {
111
110
  link: "",
112
111
  type: "primary",
113
112
  size: "small",
114
- onClick: D((N) => M(a, i), ["prevent"])
113
+ onClick: S((N) => M(a, r), ["prevent"])
115
114
  }, {
116
115
  default: s(() => t[1] || (t[1] = [
117
- f(" 查看 ")
116
+ v(" 查看 ")
118
117
  ])),
119
118
  _: 2,
120
119
  __: [1]
121
120
  }, 1032, ["onClick"]),
122
- y(o(k), {
121
+ f(o(y), {
123
122
  link: "",
124
123
  type: "primary",
125
124
  size: "small",
126
- onClick: D((N) => L(a, i), ["prevent"])
125
+ onClick: S((N) => L(a, r), ["prevent"])
127
126
  }, {
128
127
  default: s(() => t[2] || (t[2] = [
129
- f(" 编辑 ")
128
+ v(" 编辑 ")
130
129
  ])),
131
130
  _: 2,
132
131
  __: [2]
133
132
  }, 1032, ["onClick"]),
134
- y(o(k), {
133
+ f(o(y), {
135
134
  link: "",
136
135
  type: "primary",
137
136
  size: "small",
138
- onClick: (N) => Q(a, i)
137
+ onClick: (N) => Q(a, r)
139
138
  }, {
140
139
  default: s(() => [
141
- f(" 删除" + P(i), 1)
140
+ v(" 删除" + P(r), 1)
142
141
  ]),
143
142
  _: 2
144
143
  }, 1032, ["onClick"])
@@ -148,27 +147,27 @@ const Y = { style: { float: "right" } }, Z = /* @__PURE__ */ A({
148
147
  })
149
148
  ]),
150
149
  _: 3
151
- }, 8, ["data"])) : p("", !0),
152
- m.value ? (n(), c(U, {
150
+ }, 8, ["data"])) : u("", !0),
151
+ m.value ? (n(), d(U, {
153
152
  key: 1,
154
153
  ref_key: "Dialog",
155
154
  ref: z,
156
155
  form: l.table,
157
- tableData: o(r),
158
- activeIndex: _.value,
156
+ tableData: o(b),
157
+ activeIndex: h.value,
159
158
  onSave: q,
160
159
  onOpen: j,
161
160
  onClose: O,
162
161
  disabled: w.value
163
162
  }, {
164
163
  header: s(() => [
165
- d(e.$slots, "header")
164
+ c(e.$slots, "header")
166
165
  ]),
167
166
  footer: s(() => [
168
- d(e.$slots, "footer")
167
+ c(e.$slots, "footer")
169
168
  ]),
170
169
  _: 3
171
- }, 8, ["form", "tableData", "activeIndex", "disabled"])) : p("", !0)
170
+ }, 8, ["form", "tableData", "activeIndex", "disabled"])) : u("", !0)
172
171
  ]));
173
172
  }
174
173
  }), oe = X(Z);
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as J, ref as X, onMounted as K, onBeforeUnmount as Z, watch as ee, createElementBlock as te, openBlock as re, createElementVNode as oe } from "vue";
2
2
  import { q as ne, _ as ae, r as _, s as G, t as le, S as se } from "./vendor-BnmCRiB_.js";
3
- import { _ as ie } from "./Form-DpHr8PuL.js";
3
+ import { _ as ie } from "./Form-DORlJgXJ.js";
4
4
  import { w as fe } from "./utils-DCPG9S9d.js";
5
5
  function ce(e) {
6
6
  return typeof e == "string" ? e : e instanceof Blob ? URL.createObjectURL(e) : e instanceof ArrayBuffer ? URL.createObjectURL(new Blob([e])) : e instanceof Response ? URL.createObjectURL(e.blob()) : e;
@@ -67,7 +67,7 @@ function he(e, o, t) {
67
67
  o.cols[r.toString()] = {}, e.columns[r].width ? o.cols[r.toString()].width = e.columns[r].width * 6 : o.cols[r.toString()].width = me;
68
68
  o.cols.len = Math.max(Object.keys(o.cols).length, t.minColLength || 0);
69
69
  }
70
- function we(e) {
70
+ function be(e) {
71
71
  const { numFmt: o, value: t, type: r } = e;
72
72
  switch (r) {
73
73
  case 2:
@@ -117,7 +117,7 @@ function Y(e) {
117
117
  function E(e, o) {
118
118
  return e > 9 ? "#C7C9CC" : typeof o > "u" ? R[e] : o > 0 ? de(R[e], o) : ue(R[e], Math.abs(o));
119
119
  }
120
- function be(e) {
120
+ function we(e) {
121
121
  e.style = G.cloneDeep(e.style);
122
122
  let o = null;
123
123
  e.style.fill && e.style.fill.fgColor && (e.style.fill.fgColor.argb ? o = Y(e.style.fill.fgColor.argb) : e.style.fill.fgColor.hasOwnProperty("theme") ? o = E(e.style.fill.fgColor.theme, e.style.fill.fgColor.tint) : o = "#C7C9CC"), o && (e.style.bgcolor = o);
@@ -146,7 +146,7 @@ function ve(e, o) {
146
146
  let d = ae.find(s, function(y) {
147
147
  return y.startAddress == a._address;
148
148
  });
149
- d && a.master.address != d.startAddress || (d && (n.rows[i].cells[f].merge = [d.YRange, d.XRange]), n.rows[i].cells[f].text = we(a), n.styles.push(be(a)), n.rows[i].cells[f].style = n.styles.length - 1);
149
+ d && a.master.address != d.startAddress || (d && (n.rows[i].cells[f].merge = [d.YRange, d.XRange]), n.rows[i].cells[f].text = be(a), n.styles.push(we(a)), n.rows[i].cells[f].style = n.styles.length - 1);
150
150
  });
151
151
  }), n._media && (n.media = n._media), n.rows.len = Math.max(Object.keys(n.rows).length, 100), t.push(n);
152
152
  }), {
@@ -173,19 +173,19 @@ function _e(e, o, t) {
173
173
  f += ((M = (F = e == null ? void 0 : e._columns) == null ? void 0 : F[m]) == null ? void 0 : M.width) * 6 || k;
174
174
  for (let m = 0; m < i; m++)
175
175
  d += ((A = (j = e == null ? void 0 : e._rows) == null ? void 0 : j[m]) == null ? void 0 : A.height) || B;
176
- let y = f + l / 12700, w = d + a / 12700, {
176
+ let y = f + l / 12700, b = d + a / 12700, {
177
177
  nativeCol: v,
178
178
  nativeColOff: g,
179
179
  nativeRow: c,
180
180
  nativeRowOff: p
181
- } = n, b;
181
+ } = n, w;
182
182
  if (s === v)
183
- b = (g - l) / 12700;
183
+ w = (g - l) / 12700;
184
184
  else {
185
- b = (((H = (L = e == null ? void 0 : e._columns) == null ? void 0 : L[s]) == null ? void 0 : H.width) * 6 || k) - l / 12700;
185
+ w = (((H = (L = e == null ? void 0 : e._columns) == null ? void 0 : L[s]) == null ? void 0 : H.width) * 6 || k) - l / 12700;
186
186
  for (let m = s + 1; m < v; m++)
187
- b += ((P = ($ = e == null ? void 0 : e._columns) == null ? void 0 : $[m]) == null ? void 0 : P.width) * 6 || k;
188
- b += g / 12700;
187
+ w += ((P = ($ = e == null ? void 0 : e._columns) == null ? void 0 : $[m]) == null ? void 0 : P.width) * 6 || k;
188
+ w += g / 12700;
189
189
  }
190
190
  let u;
191
191
  if (i === c)
@@ -198,8 +198,8 @@ function _e(e, o, t) {
198
198
  }
199
199
  return {
200
200
  x: (y - (((q = t == null ? void 0 : t.scroll) == null ? void 0 : q.x) || 0)) * h,
201
- y: (w - (((I = t == null ? void 0 : t.scroll) == null ? void 0 : I.y) || 0)) * h,
202
- width: b * h,
201
+ y: (b - (((I = t == null ? void 0 : t.scroll) == null ? void 0 : I.y) || 0)) * h,
202
+ width: w * h,
203
203
  height: u * h
204
204
  };
205
205
  }
@@ -208,16 +208,16 @@ function z() {
208
208
  }
209
209
  function pe(e, o, t, r) {
210
210
  Ce(o, t).then((n) => {
211
- let s = 0, l = 0, i = n.width, a = n.height, f = r.x, d = r.y, y = r.width, w = r.height, v = y / i, g = w / a;
211
+ let s = 0, l = 0, i = n.width, a = n.height, f = r.x, d = r.y, y = r.width, b = r.height, v = y / i, g = b / a;
212
212
  if (f < D * h) {
213
213
  let c = D * h - f;
214
214
  f = D * h, y -= c, i -= c / v, s += c / v;
215
215
  }
216
216
  if (d < O * h) {
217
217
  let c = O * h - d;
218
- d = O * h, w -= c, a -= c / g, l += c / g;
218
+ d = O * h, b -= c, a -= c / g, l += c / g;
219
219
  }
220
- e.drawImage(n, s, l, i, a, f, d, y, w);
220
+ e.drawImage(n, s, l, i, a, f, d, y, b);
221
221
  }).catch((n) => {
222
222
  });
223
223
  }
@@ -268,17 +268,17 @@ const De = J({
268
268
  ye(g).then((c) => {
269
269
  if (!c._worksheets || c._worksheets.length === 0)
270
270
  throw new Error("未获取到数据,可能文件格式不正确或文件已损坏");
271
- const { workbookData: p, medias: b, workbookSource: u } = ve(c, e.options);
272
- s = b, n = u, f = null, l = 1, z(), a.loadData(p), C(i, s, n._worksheets[l], f), o("rendered");
271
+ const { workbookData: p, medias: w, workbookSource: u } = ve(c, e.options);
272
+ s = w, n = u, f = null, l = 1, z(), a.loadData(p), C(i, s, n._worksheets[l], f), o("rendered");
273
273
  }).catch((c) => {
274
- console.warn(c), s = [], n = {
274
+ s = [], n = {
275
275
  _worksheets: []
276
276
  }, z(), a.loadData({}), o("error", c);
277
277
  });
278
278
  }
279
- const y = G.debounce(xe, 200).bind(this, r), w = new MutationObserver(y), v = { attributes: !0, childList: !0, subtree: !0 };
279
+ const y = G.debounce(xe, 200).bind(this, r), b = new MutationObserver(y), v = { attributes: !0, childList: !0, subtree: !0 };
280
280
  return K(() => {
281
- w.observe(r.value, v), y(r), window.xs = a = new se(r.value, {
281
+ b.observe(r.value, v), y(r), window.xs = a = new se(r.value, {
282
282
  mode: "read",
283
283
  showToolbar: !1,
284
284
  view: {
@@ -316,7 +316,7 @@ const De = J({
316
316
  a.loadData({}), o("error", u);
317
317
  });
318
318
  }), Z(() => {
319
- w.disconnect(), a = null;
319
+ b.disconnect(), a = null;
320
320
  }), ee(() => e.src, () => {
321
321
  e.src ? Q(e.src).then(d).catch((g) => {
322
322
  a.loadData({}), o("error", g);
@@ -338,7 +338,7 @@ function Ye(e, o, t, r, n, s) {
338
338
  oe("div", Re, null, 512)
339
339
  ], 512);
340
340
  }
341
- const Ee = /* @__PURE__ */ ie(De, [["render", Ye], ["__scopeId", "data-v-4536a5fe"]]), Ae = fe(Ee);
341
+ const Ee = /* @__PURE__ */ ie(De, [["render", Ye], ["__scopeId", "data-v-108830cd"]]), Ae = fe(Ee);
342
342
  export {
343
343
  Ae as Q,
344
344
  ce as g,
@@ -1,6 +1,6 @@
1
1
  import { u as m } from "./vendor-BnmCRiB_.js";
2
2
  import { createElementBlock as x, openBlock as d, renderSlot as y, createTextVNode as h, toDisplayString as g, defineComponent as b, ref as w, reactive as p, resolveComponent as _, createBlock as k, withCtx as f, createVNode as E } from "vue";
3
- import { _ as c } from "./Form-DpHr8PuL.js";
3
+ import { _ as c } from "./Form-DORlJgXJ.js";
4
4
  import { w as V } from "./utils-DCPG9S9d.js";
5
5
  const C = {
6
6
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as A, createElementBlock as c, openBlock as y, createElementVNode as e, resolveComponent as b, createVNode as w, withCtx as h, createTextVNode as g, withDirectives as m, vModelText as f, Fragment as k, renderList as D, renderSlot as W } from "vue";
2
2
  import { J as v, P as U, v as C, F as S, w as B, I, x as O } from "./vendor-BnmCRiB_.js";
3
3
  import { w as _ } from "./utils-DCPG9S9d.js";
4
- import { _ as E } from "./Form-DpHr8PuL.js";
4
+ import { _ as E } from "./Form-DORlJgXJ.js";
5
5
  const T = /* @__PURE__ */ A({
6
6
  name: "QsyxExportWord",
7
7
  __name: "index",
@@ -179,7 +179,7 @@ const j = {
179
179
  N(this.fileUrl, r, "房屋出租审批表.docx", t);
180
180
  },
181
181
  open() {
182
- console.log("111", 111), this.editVisible = !0;
182
+ this.editVisible = !0;
183
183
  }
184
184
  }
185
185
  }, Z = { class: "page-css" }, L = { class: "search-data" }, P = {
@@ -388,7 +388,7 @@ function nt(r, t, l, n, o, a) {
388
388
  ])
389
389
  ]);
390
390
  }
391
- const rt = /* @__PURE__ */ E(j, [["render", nt], ["__scopeId", "data-v-7dcbb1dd"]]), bt = _(rt), it = {
391
+ const rt = /* @__PURE__ */ E(j, [["render", nt], ["__scopeId", "data-v-cb729f77"]]), bt = _(rt), it = {
392
392
  name: "HelloWorld",
393
393
  props: {
394
394
  options: {
@@ -0,0 +1,43 @@
1
+ import { ref as m, onMounted as g, onUnmounted as l, createElementBlock as _, openBlock as d, createElementVNode as p } from "vue";
2
+ import { y as o } from "./vendor-BnmCRiB_.js";
3
+ import { w as u } from "./utils-DCPG9S9d.js";
4
+ const x = { id: "app" }, f = ["src"], h = /* @__PURE__ */ Object.assign({
5
+ name: "QsyxImgToText"
6
+ }, {
7
+ __name: "index",
8
+ props: {
9
+ src: String
10
+ },
11
+ emits: ["getText"],
12
+ setup(n, { emit: r }) {
13
+ const i = r, s = n, a = m(null), e = o.createWorker({
14
+ // logger: m => console.log(m),
15
+ }), c = async () => {
16
+ if (a.value)
17
+ if (await e.load(), await e.loadLanguage("chi_sim+eng"), await e.initialize("chi_sim+eng", o.OEM.LSTM_ONLY), await e.setParameters({
18
+ tessedit_pageseg_mode: o.PSM.SINGLE_BLOCK
19
+ }), s.src.startsWith("http://") || s.src.startsWith("https://")) {
20
+ const { data: { text: t } } = await e.recognize(s.src);
21
+ i("getText", t), console.log("识别结果:", t);
22
+ } else {
23
+ const { data: { text: t } } = await e.recognize(a.value);
24
+ i("getText", t), console.log("识别结果:", t);
25
+ }
26
+ };
27
+ return g(() => {
28
+ c();
29
+ }), l(async () => {
30
+ await e.terminate();
31
+ }), (t, w) => (d(), _("div", x, [
32
+ p("img", {
33
+ ref_key: "imageRef",
34
+ ref: a,
35
+ alt: "Vue logo",
36
+ src: n.src
37
+ }, null, 8, f)
38
+ ]));
39
+ }
40
+ }), L = u(h);
41
+ export {
42
+ L as Q
43
+ };
package/dist/es/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { w as o, m as x } from "./utils-DCPG9S9d.js";
2
2
  import { Q as p } from "./Button-z0qLpaPM.js";
3
- import { a as d, b as Q, c as f, d as y, e as _, f as u, Q as k, g as w, _ as E, h } from "./Form-DpHr8PuL.js";
4
- import { Q as v } from "./Dialog-B-znQHW2.js";
5
- import { Q as T } from "./Table-kovrA6IU.js";
6
- import { Q as I } from "./wordSee-BrZs1xys.js";
7
- import { Q as M } from "./excelSee-DhD7z-W0.js";
8
- import { Q as b } from "./pdfSee-CCew2KkM.js";
9
- import { Q as g, a as D, b as $ } from "./exportWord-BNNACpCG.js";
10
- import { Q as B, a as R } from "./insertExcel-Blshq8lU.js";
3
+ import { a as d, b as Q, c as f, d as y, e as _, f as u, Q as k, g as w, _ as E, h } from "./Form-DORlJgXJ.js";
4
+ import { Q as v } from "./Dialog-DbXk3UWu.js";
5
+ import { Q as T } from "./Table-KIXoA4yN.js";
6
+ import { Q as I } from "./wordSee-C9FMKe-s.js";
7
+ import { Q as M } from "./excelSee-CEDuO4dl.js";
8
+ import { Q as b } from "./pdfSee-DsdcBU18.js";
9
+ import { Q as g, a as D, b as $ } from "./exportWord-DEImd5-Z.js";
10
+ import { Q as B, a as R } from "./insertExcel-BiHu0AT-.js";
11
11
  import { defineComponent as C, ref as L, computed as U, createElementBlock as W, openBlock as F, createElementVNode as n, withDirectives as O, vModelText as S } from "vue";
12
12
  import { O as H } from "./vendor-BnmCRiB_.js";
13
- import { Q as N } from "./exportExcel-CoXIH1vO.js";
14
- import { Q as P } from "./imToText-d_tgrNDi.js";
15
- import { Q as V } from "./onlineExcel-Ds3XxdQ-.js";
16
- import { Q as j } from "./richTextImgSee-CLXYR5PN.js";
13
+ import { Q as N } from "./exportExcel-D3LlQZhk.js";
14
+ import { Q as P } from "./imToText-BSK6myzw.js";
15
+ import { Q as V } from "./onlineExcel-D68HUhIU.js";
16
+ import { Q as j } from "./richTextImgSee-BVEorQ64.js";
17
17
  const Qe = o(d), fe = o(Q), ye = o(f), _e = o(y), ue = o(_), ke = o(u), we = o(k), Ee = o(w), A = { class: "markdown-app" }, q = ["innerHTML"], z = /* @__PURE__ */ C({
18
18
  name: "QsyxMarkDownText",
19
19
  __name: "index",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as M, ref as o, reactive as H, onMounted as K, createElementBlock as x, openBlock as d, createTextVNode as F, createVNode as f, toDisplayString as $, unref as s, withCtx as m, Fragment as I, renderList as J, createBlock as L, createElementVNode as q } from "vue";
2
2
  import { z as G, a as P, A as W, o as Q, p as R, B as T, C as U } from "./vendor-BnmCRiB_.js";
3
3
  import { w as D } from "./utils-DCPG9S9d.js";
4
- import { _ as X } from "./Form-DpHr8PuL.js";
4
+ import { _ as X } from "./Form-DORlJgXJ.js";
5
5
  const Y = /* @__PURE__ */ M({
6
6
  name: "QsyxInsertExcel",
7
7
  __name: "index",