qsyx-element 1.0.15 → 1.0.17

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,5 +1,5 @@
1
1
  import { defineComponent as t, openBlock as o, createElementBlock as e } from "vue";
2
- import { w as n } from "./utils-DOtOkkjL.js";
2
+ import { w as n } from "./utils-B7P5eY99.js";
3
3
  const s = { style: { color: "red" } }, r = /* @__PURE__ */ t({
4
4
  name: "QsyxButton",
5
5
  __name: "Button",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as B, ref as D, reactive as V, onMounted as E, openBlock as c, createElementBlock as j, createBlock as u, unref as p, withCtx as a, renderSlot as F, createVNode as b, createTextVNode as y, createCommentVNode as g } from "vue";
2
- import { F as I } from "./Form-B95vx78W.js";
3
- import { E as N, a as w } from "./vendor-DVd1Om2h.js";
4
- import { w as P } from "./utils-DOtOkkjL.js";
2
+ import { F as I } from "./Form-1kpep5ys.js";
3
+ import { E as N, a as w } from "./vendor-D1jCzKsf.js";
4
+ import { w as P } from "./utils-B7P5eY99.js";
5
5
  let C = /* @__PURE__ */ new WeakMap();
6
6
  function h(o) {
7
7
  if (typeof o != "object" || o === null)
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, onMounted, watch, openBlock, createElementBlock, createVNode, unref, normalizeStyle, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, normalizeClass, createCommentVNode } from "vue";
2
- import { b as ElCheckboxGroup, c as ElCheckbox, d as axios$1, e as ElDatePicker, f as ElInput, g as ElRadioGroup, h as ElRadio, i as ElSelect, j as ElOption, k as ElForm, l as ElRow, m as ElCol, n as ElFormItem } from "./vendor-DVd1Om2h.js";
3
- import { w as withInstall } from "./utils-DOtOkkjL.js";
2
+ import { b as ElCheckboxGroup, c as ElCheckbox, d as axios$1, e as ElDatePicker, f as ElInput, g as ElRadioGroup, h as ElRadio, i as ElSelect, j as ElOption, k as ElForm, l as ElRow, m as ElCol, n as ElFormItem } from "./vendor-D1jCzKsf.js";
3
+ import { w as withInstall } from "./utils-B7P5eY99.js";
4
4
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5
5
  name: "QsyxCheckBox",
6
6
  __name: "index",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as A, ref as i, useSlots as G, reactive as $, onMounted as J, openBlock as n, createElementBlock as S, createElementVNode as B, unref as o, renderSlot as d, createBlock as c, withModifiers as T, withCtx as s, createTextVNode as v, createCommentVNode as u, Fragment as E, renderList as K, createVNode as f, toDisplayString as P } from "vue";
2
- import { _ as U } from "./Dialog-BIXJDN3p.js";
3
- import { a as y, o as W, p as _ } from "./vendor-DVd1Om2h.js";
4
- import { w as X } from "./utils-DOtOkkjL.js";
2
+ import { _ as U } from "./Dialog-DEGFPEew.js";
3
+ import { a as y, o as W, p as _ } from "./vendor-D1jCzKsf.js";
4
+ import { w as X } from "./utils-B7P5eY99.js";
5
5
  const Y = { style: { float: "right" } }, Z = /* @__PURE__ */ A({
6
6
  name: "QsyxTable",
7
7
  __name: "Table",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as J, ref as X, onMounted as K, onBeforeUnmount as Z, watch as tt, openBlock as et, createElementBlock as rt, createElementVNode as ot } from "vue";
2
- import { q as nt, _ as at, r as _, s as G, t as lt, S as st } from "./vendor-DVd1Om2h.js";
3
- import { _ as it } from "./Form-B95vx78W.js";
4
- import { w as ft } from "./utils-DOtOkkjL.js";
2
+ import { q as nt, _ as at, r as _, s as G, t as lt, S as st } from "./vendor-D1jCzKsf.js";
3
+ import { _ as it } from "./Form-1kpep5ys.js";
4
+ import { w as ft } from "./utils-B7P5eY99.js";
5
5
  function ct(t) {
6
6
  return typeof t == "string" ? t : t instanceof Blob ? URL.createObjectURL(t) : t instanceof ArrayBuffer ? URL.createObjectURL(new Blob([t])) : t instanceof Response ? URL.createObjectURL(t.blob()) : t;
7
7
  }
@@ -1,7 +1,7 @@
1
- import { u as m } from "./vendor-DVd1Om2h.js";
1
+ import { u as m } from "./vendor-D1jCzKsf.js";
2
2
  import { openBlock as d, createElementBlock as x, renderSlot as y, createTextVNode as h, toDisplayString as g, defineComponent as b, ref as w, reactive as p, resolveComponent as k, createBlock as _, withCtx as f, createVNode as E } from "vue";
3
- import { _ as c } from "./Form-B95vx78W.js";
4
- import { w as V } from "./utils-DOtOkkjL.js";
3
+ import { _ as c } from "./Form-1kpep5ys.js";
4
+ import { w as V } from "./utils-B7P5eY99.js";
5
5
  const C = {
6
6
  props: {
7
7
  // mime type [xls, csv]
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as W, openBlock as c, createElementBlock as w, createElementVNode as o, resolveComponent as v, createVNode as y, withCtx as h, createTextVNode as g, withDirectives as m, vModelText as f, Fragment as I, renderList as S, ref as D, watch as z, onMounted as A, onBeforeUnmount as O, renderSlot as T } from "vue";
2
- import { J as b, P as U, v as C, F as E, w as N, I as B, x as F } from "./vendor-DVd1Om2h.js";
3
- import { w as k } from "./utils-DOtOkkjL.js";
4
- import { _ as V } from "./Form-B95vx78W.js";
2
+ import { J as b, P as U, v as C, F as E, w as N, I as B, x as F } from "./vendor-D1jCzKsf.js";
3
+ import { w as k } from "./utils-B7P5eY99.js";
4
+ import { _ as V } from "./Form-1kpep5ys.js";
5
5
  const R = /* @__PURE__ */ W({
6
6
  name: "QsyxExportWord",
7
7
  __name: "index",
@@ -0,0 +1,53 @@
1
+ import { onBeforeUnmount as d, openBlock as g, createElementBlock as _, createElementVNode as l } from "vue";
2
+ import { y as o } from "./vendor-D1jCzKsf.js";
3
+ import { _ as p } from "./Form-1kpep5ys.js";
4
+ import { w as x } from "./utils-B7P5eY99.js";
5
+ const h = { id: "app" }, u = ["src"], w = /* @__PURE__ */ Object.assign({
6
+ name: "QsyxImgToText"
7
+ }, {
8
+ __name: "index",
9
+ props: {
10
+ src: {
11
+ type: String,
12
+ required: !0
13
+ }
14
+ },
15
+ emits: ["recognized", "error"],
16
+ setup(s, { expose: i, emit: c }) {
17
+ const a = c, t = o.createWorker({
18
+ // logger: m => console.log(m), // 如果需要日志可以取消注释
19
+ }), n = async () => {
20
+ try {
21
+ const e = document.getElementById("text-img");
22
+ await t.load(), await t.loadLanguage("chi_sim+eng"), await t.initialize("chi_sim+eng", o.OEM.LSTM_ONLY), await t.setParameters({
23
+ tessedit_pageseg_mode: o.PSM.SINGLE_BLOCK
24
+ });
25
+ const { data: { text: r } } = await t.recognize(e);
26
+ return a("recognized", r), r;
27
+ } catch (e) {
28
+ throw console.error("OCR Error:", e), a("error", e), e;
29
+ }
30
+ }, m = () => {
31
+ n();
32
+ };
33
+ return i({
34
+ recognize: n
35
+ }), d(async () => {
36
+ try {
37
+ await t.terminate();
38
+ } catch (e) {
39
+ console.error("Worker termination error:", e);
40
+ }
41
+ }), (e, r) => (g(), _("div", h, [
42
+ l("img", {
43
+ id: "text-img",
44
+ alt: "Image for OCR",
45
+ src: s.src,
46
+ onLoad: m
47
+ }, null, 40, u)
48
+ ]));
49
+ }
50
+ }), y = /* @__PURE__ */ p(w, [["__scopeId", "data-v-44729e97"]]), E = x(y);
51
+ export {
52
+ E as Q
53
+ };
package/dist/es/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { w as i, m as B } from "./utils-DOtOkkjL.js";
2
- import { Q as F } from "./Button-CAM7jG5W.js";
3
- import { a as M, b as T, c as I, d as V, e as H, f as R, Q as j, g as A, _ as L, h as S } from "./Form-B95vx78W.js";
4
- import { Q as U } from "./Dialog-BIXJDN3p.js";
5
- import { Q as N } from "./Table-BH2YATJt.js";
6
- import { Q as W } from "./wordSee-jETvfkJe.js";
7
- import { Q as q } from "./excelSee-C-5AGI3L.js";
8
- import { Q as z } from "./pdfSee-B1O-PBDo.js";
9
- import { Q as G, a as J, b as K } from "./exportWord-CsrYF3fs.js";
10
- import { Q as X, a as Y } from "./insertExcel-6ikfLhPt.js";
1
+ import { w as i, m as B } from "./utils-B7P5eY99.js";
2
+ import { Q as F } from "./Button-k3vu8thg.js";
3
+ import { a as M, b as T, c as I, d as V, e as H, f as R, Q as j, g as A, _ as L, h as S } from "./Form-1kpep5ys.js";
4
+ import { Q as U } from "./Dialog-DEGFPEew.js";
5
+ import { Q as N } from "./Table-BjAxTkv0.js";
6
+ import { Q as W } from "./wordSee-DLj10NGt.js";
7
+ import { Q as q } from "./excelSee-0dUWM-Iy.js";
8
+ import { Q as z } from "./pdfSee-CGxejShv.js";
9
+ import { Q as G, a as J, b as K } from "./exportWord-PXdJbV3i.js";
10
+ import { Q as X, a as Y } from "./insertExcel-D2il4nT2.js";
11
11
  import { defineComponent as h, ref as g, computed as Z, openBlock as v, createElementBlock as w, createElementVNode as _, withDirectives as b, vModelText as O, shallowRef as P, onMounted as ee, watch as oe, watchEffect as te, toRaw as ne, onBeforeUnmount as re, createVNode as Q, unref as C } from "vue";
12
- import { N as ae, O as se, Q as le, R as ie } from "./vendor-DVd1Om2h.js";
13
- import { Q as ue } from "./exportExcel-CTaQhJoB.js";
14
- import { Q as ce } from "./imToText-BzfZwdIm.js";
15
- import { Q as de } from "./onlineExcel-85mXyYND.js";
12
+ import { N as ae, O as se, Q as le, R as ie } from "./vendor-D1jCzKsf.js";
13
+ import { Q as ue } from "./exportExcel-Bv_K065T.js";
14
+ import { Q as ce } from "./imToText-C-TF3YeV.js";
15
+ import { Q as de } from "./onlineExcel-Bxgym-3G.js";
16
16
  const Ye = i(M), Ze = i(T), eo = i(I), oo = i(V), to = i(H), no = i(R), ro = i(j), ao = i(A), fe = { class: "markdown-app" }, me = ["innerHTML"], pe = /* @__PURE__ */ h({
17
17
  name: "QsyxMarkDownText",
18
18
  __name: "index",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as M, ref as o, reactive as H, onMounted as K, openBlock as d, createElementBlock as x, createTextVNode as F, toDisplayString as $, createVNode as f, unref as s, withCtx as m, Fragment as I, renderList as J, createBlock as L, createElementVNode as q } from "vue";
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-DVd1Om2h.js";
3
- import { w as D } from "./utils-DOtOkkjL.js";
4
- import { _ as X } from "./Form-B95vx78W.js";
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-D1jCzKsf.js";
3
+ import { w as D } from "./utils-B7P5eY99.js";
4
+ import { _ as X } from "./Form-1kpep5ys.js";
5
5
  const Y = /* @__PURE__ */ M({
6
6
  name: "QsyxInsertExcel",
7
7
  __name: "index",
@@ -1,7 +1,7 @@
1
- import { ref as p, onMounted as S, openBlock as g, createElementBlock as b, Fragment as k, createElementVNode as y, withDirectives as w, renderList as T, toDisplayString as A, vModelSelect as _, vShow as j } from "vue";
2
- import { D as B, G as O, L as D } from "./vendor-DVd1Om2h.js";
3
- import { _ as L } from "./Form-B95vx78W.js";
4
- import { w as M } from "./utils-DOtOkkjL.js";
1
+ import { ref as y, onMounted as S, openBlock as g, createElementBlock as b, Fragment as k, createElementVNode as p, withDirectives as w, renderList as T, toDisplayString as A, vModelSelect as _, vShow as j } from "vue";
2
+ import { D as B, G as O, L as D } from "./vendor-D1jCzKsf.js";
3
+ import { _ as L } from "./Form-1kpep5ys.js";
4
+ import { w as M } from "./utils-B7P5eY99.js";
5
5
  const F = function(t, s) {
6
6
  const r = new B.Workbook();
7
7
  return Object.prototype.toString.call(t) === "[object Object]" && (t = [t]), t.forEach(function(e) {
@@ -220,7 +220,7 @@ function U(t) {
220
220
  function C(t) {
221
221
  return U(t) === "Function";
222
222
  }
223
- const W = { style: { position: "absolute", top: "0" } }, G = ["value"], K = { id: "tip" }, $ = /* @__PURE__ */ Object.assign({
223
+ const W = { style: { position: "absolute", top: "50px" } }, G = ["value"], K = { id: "tip" }, $ = /* @__PURE__ */ Object.assign({
224
224
  name: "QsyxOnlineExcel"
225
225
  }, {
226
226
  __name: "index",
@@ -233,7 +233,7 @@ const W = { style: { position: "absolute", top: "0" } }, G = ["value"], K = { id
233
233
  }
234
234
  },
235
235
  setup(t) {
236
- const s = p(!1), r = p(""), o = p({}), e = p([
236
+ const s = y(!1), r = y(""), o = y({}), e = y([
237
237
  { text: "Money Manager.xlsx", value: "https://minio.cnbabylon.com/public/luckysheet/money-manager-2.xlsx" },
238
238
  {
239
239
  text: "Activity costs tracker.xlsx",
@@ -313,7 +313,7 @@ const W = { style: { position: "absolute", top: "0" } }, G = ["value"], K = { id
313
313
  }));
314
314
  }, m = () => {
315
315
  F(luckysheet.getAllSheets(), "下载");
316
- }, x = p(0);
316
+ }, x = y(0);
317
317
  return S(() => {
318
318
  if (typeof window.ThirdPartyLib > "u") {
319
319
  for (let l = 0; l < c.length; l++) {
@@ -332,18 +332,18 @@ const W = { style: { position: "absolute", top: "0" } }, G = ["value"], K = { id
332
332
  }
333
333
  }
334
334
  }), (u, l) => (g(), b(k, null, [
335
- y("div", W, [
336
- y("input", {
335
+ p("div", W, [
336
+ p("input", {
337
337
  id: "uploadBtn",
338
338
  type: "file",
339
339
  onChange: a
340
340
  }, null, 32),
341
- l[2] || (l[2] = y("span", null, "Or Load remote xlsx file:", -1)),
342
- w(y("select", {
341
+ l[2] || (l[2] = p("span", null, "Or Load remote xlsx file:", -1)),
342
+ w(p("select", {
343
343
  "onUpdate:modelValue": l[0] || (l[0] = (i) => r.value = i),
344
344
  onChange: h
345
345
  }, [
346
- l[1] || (l[1] = y("option", {
346
+ l[1] || (l[1] = p("option", {
347
347
  disabled: "",
348
348
  value: ""
349
349
  }, "Choose", -1)),
@@ -354,18 +354,18 @@ const W = { style: { position: "absolute", top: "0" } }, G = ["value"], K = { id
354
354
  ], 544), [
355
355
  [_, r.value]
356
356
  ]),
357
- y("a", {
357
+ p("a", {
358
358
  href: "javascript:void(0)",
359
359
  onClick: m
360
360
  }, "Download source xlsx file")
361
361
  ]),
362
- l[3] || (l[3] = y("div", { id: "luckysheet" }, null, -1)),
363
- w(y("div", K, "Downloading", 512), [
362
+ l[3] || (l[3] = p("div", { id: "luckysheet" }, null, -1)),
363
+ w(p("div", K, "Downloading", 512), [
364
364
  [j, s.value]
365
365
  ])
366
366
  ], 64));
367
367
  }
368
- }), q = /* @__PURE__ */ L($, [["__scopeId", "data-v-9d0bab02"]]), ne = M(q);
368
+ }), q = /* @__PURE__ */ L($, [["__scopeId", "data-v-c4fe0bc5"]]), ne = M(q);
369
369
  export {
370
370
  ne as Q
371
371
  };