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 +124 -66
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/richTextImgSee/img.d.ts +9 -0
- package/dist/types/components/richTextImgSee/index.d.ts +19 -0
- package/dist/types/components/richTextImgSee/main.vue.d.ts +6 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +20 -20
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1,82 +1,140 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { Q as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Q as
|
|
5
|
-
import { Q as
|
|
6
|
-
import { Q as
|
|
7
|
-
import { Q as
|
|
8
|
-
import { Q as
|
|
9
|
-
import { Q as
|
|
10
|
-
import { Q as
|
|
11
|
-
import { defineComponent as
|
|
12
|
-
import { N as
|
|
13
|
-
import { Q as
|
|
14
|
-
import { Q as
|
|
15
|
-
import { Q as
|
|
16
|
-
const
|
|
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(
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
const
|
|
25
|
-
|
|
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
|
|
29
|
-
const
|
|
30
|
-
|
|
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
|
|
33
|
-
return
|
|
34
|
-
content:
|
|
35
|
-
compiledMarkdown:
|
|
36
|
-
}), (
|
|
37
|
-
|
|
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:
|
|
40
|
+
onChange: a
|
|
41
41
|
}, null, 32),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"onUpdate:modelValue":
|
|
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
|
-
[
|
|
47
|
+
[q, n.value]
|
|
48
48
|
]),
|
|
49
|
-
|
|
50
|
-
innerHTML:
|
|
49
|
+
u("div", {
|
|
50
|
+
innerHTML: t.value,
|
|
51
51
|
class: "markdown-preview"
|
|
52
|
-
}, null, 8,
|
|
52
|
+
}, null, 8, te)
|
|
53
53
|
]));
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
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. </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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
};
|