qsyx-element 1.0.16 → 1.0.18

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-Cv1NDm98.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-FTmOjAyk.js";
3
+ import { E as N, a as w } from "./vendor-CH75Jh6o.js";
4
+ import { w as P } from "./utils-Cv1NDm98.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-CH75Jh6o.js";
3
+ import { w as withInstall } from "./utils-Cv1NDm98.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-aA8t1-EP.js";
3
+ import { a as y, o as W, p as _ } from "./vendor-CH75Jh6o.js";
4
+ import { w as X } from "./utils-Cv1NDm98.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-CH75Jh6o.js";
3
+ import { _ as it } from "./Form-FTmOjAyk.js";
4
+ import { w as ft } from "./utils-Cv1NDm98.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-CH75Jh6o.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-FTmOjAyk.js";
4
+ import { w as V } from "./utils-Cv1NDm98.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-CH75Jh6o.js";
3
+ import { w as k } from "./utils-Cv1NDm98.js";
4
+ import { _ as V } from "./Form-FTmOjAyk.js";
5
5
  const R = /* @__PURE__ */ W({
6
6
  name: "QsyxExportWord",
7
7
  __name: "index",
@@ -0,0 +1,54 @@
1
+ import { onBeforeUnmount as g, openBlock as l, createElementBlock as d, createElementVNode as _ } from "vue";
2
+ import { y as r } from "./vendor-CH75Jh6o.js";
3
+ import { _ as p } from "./Form-FTmOjAyk.js";
4
+ import { w as x } from "./utils-Cv1NDm98.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(a, { expose: c, emit: i }) {
17
+ const n = i, o = r.createWorker({
18
+ // logger: m => console.log(m), // 如果需要日志可以取消注释
19
+ }), s = async () => {
20
+ try {
21
+ console.log("1");
22
+ const e = document.getElementById("text-img");
23
+ console.log("2"), await o.load(), onsole.log("3"), await o.loadLanguage("chi_sim+eng"), onsole.log("4"), await o.initialize("chi_sim+eng", r.OEM.LSTM_ONLY), onsole.log("5"), await o.setParameters({
24
+ tessedit_pageseg_mode: r.PSM.SINGLE_BLOCK
25
+ }), onsole.log("6");
26
+ const { data: { text: t } } = await o.recognize(e);
27
+ return onsole.log("7", recognized), n("recognized", t), t;
28
+ } catch (e) {
29
+ throw console.error("OCR Error:", e), n("error", e), e;
30
+ }
31
+ }, m = () => {
32
+ s();
33
+ };
34
+ return c({
35
+ recognize: s
36
+ }), g(async () => {
37
+ try {
38
+ await o.terminate();
39
+ } catch (e) {
40
+ console.error("Worker termination error:", e);
41
+ }
42
+ }), (e, t) => (l(), d("div", h, [
43
+ _("img", {
44
+ id: "text-img",
45
+ alt: "Image for OCR",
46
+ src: a.src,
47
+ onLoad: m
48
+ }, null, 40, u)
49
+ ]));
50
+ }
51
+ }), f = /* @__PURE__ */ p(w, [["__scopeId", "data-v-08e30d1f"]]), z = x(f);
52
+ export {
53
+ z as Q
54
+ };
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-Cv1NDm98.js";
2
+ import { Q as F } from "./Button-CcikbzWk.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-FTmOjAyk.js";
4
+ import { Q as U } from "./Dialog-aA8t1-EP.js";
5
+ import { Q as N } from "./Table-D3wNJFzp.js";
6
+ import { Q as W } from "./wordSee-DMVY7tdm.js";
7
+ import { Q as q } from "./excelSee-DOkzTUYA.js";
8
+ import { Q as z } from "./pdfSee-CzoWEh16.js";
9
+ import { Q as G, a as J, b as K } from "./exportWord-Brj1ZvjF.js";
10
+ import { Q as X, a as Y } from "./insertExcel-TnEAnaix.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-Det1339o.js";
12
+ import { N as ae, O as se, Q as le, R as ie } from "./vendor-CH75Jh6o.js";
13
+ import { Q as ue } from "./exportExcel-B4pnzwww.js";
14
+ import { Q as ce } from "./imToText-BYxxWUTa.js";
15
+ import { Q as de } from "./onlineExcel-Cr4heSJu.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-CH75Jh6o.js";
3
+ import { w as D } from "./utils-Cv1NDm98.js";
4
+ import { _ as X } from "./Form-FTmOjAyk.js";
5
5
  const Y = /* @__PURE__ */ M({
6
6
  name: "QsyxInsertExcel",
7
7
  __name: "index",
@@ -1,7 +1,7 @@
1
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-DVd1Om2h.js";
3
- import { _ as L } from "./Form-B95vx78W.js";
4
- import { w as M } from "./utils-DOtOkkjL.js";
2
+ import { D as B, G as O, L as D } from "./vendor-CH75Jh6o.js";
3
+ import { _ as L } from "./Form-FTmOjAyk.js";
4
+ import { w as M } from "./utils-Cv1NDm98.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) {