qsyx-element 1.0.28 → 1.0.29

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.
package/dist/es/index.js CHANGED
@@ -1,82 +1,140 @@
1
- import { w as o, m as x } from "./utils-B1qoKEZu.js";
2
- import { Q as p } from "./Button-CY-LzkbQ.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 as v } from "./Form-sjCW5qrR.js";
4
- import { Q as h } from "./Dialog-CckCLAtF.js";
5
- import { Q as T } from "./Table-DCcLVthx.js";
6
- import { Q as I } from "./wordSee-BpyL5TCN.js";
7
- import { Q as M } from "./excelSee-BtixnZQs.js";
8
- import { Q as b } from "./pdfSee-Ci6jhB9h.js";
9
- import { Q as D, a as $, b as g } from "./exportWord-DPKW5Nyh.js";
10
- import { Q as B, a as C } from "./insertExcel-YDQdiLi1.js";
11
- import { defineComponent as L, ref as R, computed as U, createElementBlock as W, openBlock as F, createElementVNode as n, withDirectives as N, vModelText as H } from "vue";
12
- import { N as O } from "./vendor-_o5V4Y5M.js";
13
- import { Q as P } from "./exportExcel-DSc_tUCI.js";
14
- import { Q as S } from "./imToText-C5BGPHJv.js";
15
- import { Q as V } from "./onlineExcel-4ggybKld.js";
16
- const pe = o(d), de = o(Q), Qe = o(f), fe = o(y), ye = o(_), _e = o(u), ue = o(k), ke = o(w), j = { class: "markdown-app" }, A = ["innerHTML"], q = /* @__PURE__ */ L({
1
+ import { w as r, m as v } from "./utils-B1qoKEZu.js";
2
+ import { Q as w } from "./Button-CY-LzkbQ.js";
3
+ import { a as k, b, c as T, d as M, e as $, f as E, Q as I, g as L, _ as S, h as D } from "./Form-sjCW5qrR.js";
4
+ import { Q as C } from "./Dialog-CckCLAtF.js";
5
+ import { Q as B } from "./Table-DCcLVthx.js";
6
+ import { Q as N } from "./wordSee-BpyL5TCN.js";
7
+ import { Q as R } from "./excelSee-BtixnZQs.js";
8
+ import { Q as F } from "./pdfSee-Ci6jhB9h.js";
9
+ import { Q as j, a as H, b as U } from "./exportWord-DPKW5Nyh.js";
10
+ import { Q as V, a as W } from "./insertExcel-YDQdiLi1.js";
11
+ import { defineComponent as g, ref as d, computed as A, createElementBlock as h, openBlock as Q, createElementVNode as u, withDirectives as O, vModelText as q, onMounted as P, resolveComponent as z, createBlock as G, createCommentVNode as J, unref as _ } from "vue";
12
+ import { N as K } from "./vendor-_o5V4Y5M.js";
13
+ import { Q as X } from "./exportExcel-DSc_tUCI.js";
14
+ import { Q as Y } from "./imToText-C5BGPHJv.js";
15
+ import { Q as Z } from "./onlineExcel-4ggybKld.js";
16
+ const Te = r(k), Me = r(b), $e = r(T), Ee = r(M), Ie = r($), Le = r(E), Se = r(I), De = r(L), ee = { class: "markdown-app" }, te = ["innerHTML"], se = /* @__PURE__ */ g({
17
17
  name: "QsyxMarkDownText",
18
18
  __name: "index",
19
- setup(K, { expose: c }) {
20
- const t = R("");
21
- function m(s) {
22
- const e = s.target.files[0];
23
- if (e) {
24
- const a = new FileReader();
25
- a.onload = (i) => t.value = i.target.result, a.readAsText(e);
19
+ setup(x, { expose: l }) {
20
+ const n = d("");
21
+ function a(e) {
22
+ const s = e.target.files[0];
23
+ if (s) {
24
+ const c = new FileReader();
25
+ c.onload = (f) => n.value = f.target.result, c.readAsText(s);
26
26
  }
27
27
  }
28
- function l() {
29
- const s = new Blob([t.value], { type: "text/markdown;charset=utf-8" }), e = document.createElement("a");
30
- e.href = URL.createObjectURL(s), e.download = "document.md", e.click();
28
+ function i() {
29
+ const e = new Blob([n.value], { type: "text/markdown;charset=utf-8" }), s = document.createElement("a");
30
+ s.href = URL.createObjectURL(e), s.download = "document.md", s.click();
31
31
  }
32
- const r = U(() => O.parse(t.value));
33
- return c({
34
- content: t,
35
- compiledMarkdown: r
36
- }), (s, e) => (F(), W("div", j, [
37
- n("input", {
32
+ const t = A(() => K.parse(n.value));
33
+ return l({
34
+ content: n,
35
+ compiledMarkdown: t
36
+ }), (e, s) => (Q(), h("div", ee, [
37
+ u("input", {
38
38
  type: "file",
39
39
  accept: ".md",
40
- onChange: m
40
+ onChange: a
41
41
  }, null, 32),
42
- n("button", { onClick: l }, "Export Markdown"),
43
- N(n("textarea", {
44
- "onUpdate:modelValue": e[0] || (e[0] = (a) => t.value = a),
42
+ u("button", { onClick: i }, "Export Markdown"),
43
+ O(u("textarea", {
44
+ "onUpdate:modelValue": s[0] || (s[0] = (c) => n.value = c),
45
45
  placeholder: "Write your markdown here..."
46
46
  }, null, 512), [
47
- [H, t.value]
47
+ [q, n.value]
48
48
  ]),
49
- n("div", {
50
- innerHTML: r.value,
49
+ u("div", {
50
+ innerHTML: t.value,
51
51
  class: "markdown-preview"
52
- }, null, 8, A)
52
+ }, null, 8, te)
53
53
  ]));
54
54
  }
55
- }), z = /* @__PURE__ */ E(q, [["__scopeId", "data-v-4a853a11"]]), G = o(z), J = [p, h, T, v, G, I, b, B, M, D, C, $, g, P, S, V], we = x(J);
55
+ }), oe = /* @__PURE__ */ S(se, [["__scopeId", "data-v-4a853a11"]]), ne = r(oe);
56
+ function re(x) {
57
+ let l = [];
58
+ return { result: x.replace(/<img\b([^>]*)>/gi, function(a, i) {
59
+ let t = i.replace(/\bstyle\s*=\s*(["'])(.*?)\1/i, "style=$1width:100%$1");
60
+ if (t === i && (t = t.replace(/\bstyle\s*=\s*([^\s>]+)/i, 'style="width:100%"')), i.includes("style")) {
61
+ let e = (Math.random() * 1e5).toFixed(0);
62
+ return l.push("img" + e), '<img id="img' + e + '"' + t + ">";
63
+ } else {
64
+ let e = (Math.random() * 1e5).toFixed(6);
65
+ return l.push("img" + e), '<img id="img' + e + '"' + t + ">";
66
+ }
67
+ }), idList: l };
68
+ }
69
+ const ae = ["innerHTML"], le = /* @__PURE__ */ g({
70
+ name: "QsyxRichTextImgSee",
71
+ __name: "main",
72
+ props: {
73
+ html: String
74
+ },
75
+ setup(x) {
76
+ let l = '<p><img src="https://pic1.zhimg.com/v2-a58fa2ab84be291418da2652805f8270_b.jpg" alt="" data-href="" style=""/><img src="http://127.0.0.1:8585/uploads/123456/2025/06/20/efaa422c-9e94-49a2-bf57-98512b4c4412.png" alt="错误" data-href="" style=""/>模拟 Ajax </p><p><br></p><p>1231293异步设置内容</p><p><br></p><p><strong>123123. &nbsp; </strong></p><p><br></p>', { result: n, idList: a } = re(l);
77
+ console.log("idList", a), console.log("result", n);
78
+ const i = x;
79
+ let t = d([]);
80
+ const e = d(!1), s = d([]), c = d(0), f = (p) => {
81
+ s.value.push(p), e.value = !0;
82
+ };
83
+ return P(() => {
84
+ let p = {};
85
+ setTimeout(() => {
86
+ for (let o = 0; o < a.length; o++) {
87
+ const m = document.querySelector(`#${a[o]}`);
88
+ p[m.src] = o, t.value.push(m.src);
89
+ }
90
+ for (let o = 0; o < a.length; o++) {
91
+ const m = document.querySelector(`#${a[o]}`);
92
+ m.onclick = (y) => {
93
+ c.value = p[y.target.currentSrc], f(y.target.currentSrc);
94
+ };
95
+ }
96
+ }, 300);
97
+ }), (p, o) => {
98
+ const m = z("el-image-viewer");
99
+ return Q(), h("div", null, [
100
+ u("div", {
101
+ innerHTML: i.html || _(n)
102
+ }, null, 8, ae),
103
+ e.value ? (Q(), G(m, {
104
+ key: 0,
105
+ "url-list": _(t),
106
+ "initial-index": c.value,
107
+ onClose: o[0] || (o[0] = (y) => e.value = !1)
108
+ }, null, 8, ["url-list", "initial-index"])) : J("", !0)
109
+ ]);
110
+ };
111
+ }
112
+ }), ie = r(le), ce = [w, C, B, D, ne, N, F, V, R, j, W, H, U, X, Y, Z, ie], Ce = v(ce);
56
113
  export {
57
- p as QsyxButton,
58
- pe as QsyxCheckBox,
59
- Qe as QsyxDateInterval,
60
- de as QsyxDatePicker,
61
- h as QsyxDialog,
62
- I as QsyxDocx,
63
- M as QsyxExcel,
64
- P as QsyxExportExcel,
65
- D as QsyxExportWord,
66
- g as QsyxExportWordEcharts,
67
- $ as QsyxExportWordImage,
68
- v as QsyxForm,
69
- S as QsyxImgToText,
70
- fe as QsyxInput,
71
- ye as QsyxInputMoney,
72
- C as QsyxInsertExcel,
73
- B as QsyxInsertExcelNew,
74
- G as QsyxMarkDownText,
75
- V as QsyxOnlineExcel,
76
- b as QsyxPdf,
77
- _e as QsyxRadio,
78
- ue as QsyxSelect,
79
- T as QsyxTable,
80
- ke as QsyxTextarea,
81
- we as default
114
+ w as QsyxButton,
115
+ Te as QsyxCheckBox,
116
+ $e as QsyxDateInterval,
117
+ Me as QsyxDatePicker,
118
+ C as QsyxDialog,
119
+ N as QsyxDocx,
120
+ R as QsyxExcel,
121
+ X as QsyxExportExcel,
122
+ j as QsyxExportWord,
123
+ U as QsyxExportWordEcharts,
124
+ H as QsyxExportWordImage,
125
+ D as QsyxForm,
126
+ Y as QsyxImgToText,
127
+ Ee as QsyxInput,
128
+ Ie as QsyxInputMoney,
129
+ W as QsyxInsertExcel,
130
+ V as QsyxInsertExcelNew,
131
+ ne as QsyxMarkDownText,
132
+ Z as QsyxOnlineExcel,
133
+ F as QsyxPdf,
134
+ Le as QsyxRadio,
135
+ ie as QsyxRichTextImgSee,
136
+ Se as QsyxSelect,
137
+ B as QsyxTable,
138
+ De as QsyxTextarea,
139
+ Ce as default
82
140
  };