qsyx-element 1.0.9 → 1.0.11
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,44 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as L, ref as k, useSlots as M, reactive as T, onMounted as D, openBlock as u, createElementBlock as N, createVNode as r, unref as o, withCtx as n, Fragment as F, renderList as O, createBlock as E, renderSlot as g, createCommentVNode as v, createElementVNode as d, withModifiers as B, createTextVNode as b } from "vue";
|
|
2
2
|
import { _ as j } from "./Dialog-B0OvoS7J.js";
|
|
3
3
|
import { l as q, m as I, n as y } from "./vendor-DfydgTBg.js";
|
|
4
4
|
import { w as A } from "./utils-BFYGwXom.js";
|
|
5
|
-
const G = { style: { "text-align": "center" } }, H = /* @__PURE__ */
|
|
5
|
+
const G = { style: { "text-align": "center" } }, H = /* @__PURE__ */ L({
|
|
6
6
|
name: "QsyxTable",
|
|
7
7
|
__name: "Table",
|
|
8
8
|
props: {
|
|
9
9
|
table: {}
|
|
10
10
|
},
|
|
11
11
|
setup(Q) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const a = Q, i = k(!1), C = M(), m = k(NaN);
|
|
13
|
+
let p = T([]);
|
|
14
|
+
const f = T([]), c = k(!1), V = () => {
|
|
15
|
+
for (let l in a.table.data)
|
|
16
|
+
for (let e = 0; e < a.table.items.length; e++)
|
|
17
|
+
l === a.table.items[e].code && (a.table.items[e].type === "select" ? f.push({ prop: l + "Label", label: a.table.items[e].label }) : f.push({ prop: l, label: a.table.items[e].label }));
|
|
18
|
+
p.push(a.table.data);
|
|
17
19
|
}, $ = (l, e) => {
|
|
18
|
-
|
|
20
|
+
p = p.splice(e, 1);
|
|
19
21
|
}, x = (l, e) => {
|
|
20
|
-
|
|
22
|
+
c.value = !1, m.value = e, i.value = !0;
|
|
21
23
|
}, z = (l, e) => {
|
|
22
|
-
|
|
24
|
+
m.value = e, c.value = !0, i.value = !0;
|
|
23
25
|
}, R = () => {
|
|
24
|
-
|
|
26
|
+
i.value = !1;
|
|
25
27
|
}, S = () => {
|
|
26
28
|
};
|
|
27
|
-
return
|
|
29
|
+
return D(() => {
|
|
28
30
|
V();
|
|
29
|
-
}), (l, e) => (u(),
|
|
30
|
-
|
|
31
|
-
data:
|
|
31
|
+
}), (l, e) => (u(), N("div", null, [
|
|
32
|
+
r(o(q), {
|
|
33
|
+
data: o(p),
|
|
32
34
|
style: { width: "100%" }
|
|
33
35
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
(u(!0),
|
|
36
|
+
default: n(() => [
|
|
37
|
+
(u(!0), N(F, null, O(f, (t, s) => (u(), E(o(I), {
|
|
36
38
|
prop: t.prop,
|
|
37
39
|
label: t.label,
|
|
38
|
-
key:
|
|
40
|
+
key: s
|
|
39
41
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
|
|
42
|
+
default: n(() => [
|
|
43
|
+
o(C)[t.prop] ? g(l.$slots, t.prop, {
|
|
42
44
|
key: 0,
|
|
43
45
|
index: l.$index,
|
|
44
46
|
row: l.row
|
|
@@ -46,43 +48,43 @@ const G = { style: { "text-align": "center" } }, H = /* @__PURE__ */ D({
|
|
|
46
48
|
]),
|
|
47
49
|
_: 2
|
|
48
50
|
}, 1032, ["prop", "label"]))), 128)),
|
|
49
|
-
|
|
50
|
-
default:
|
|
51
|
-
|
|
51
|
+
r(o(I), { label: "操作" }, {
|
|
52
|
+
default: n(({ row: t, $index: s }) => [
|
|
53
|
+
o(C).opreate ? g(l.$slots, "opreate", {
|
|
52
54
|
key: 0,
|
|
53
|
-
index:
|
|
55
|
+
index: s,
|
|
54
56
|
row: t
|
|
55
57
|
}) : v("", !0),
|
|
56
58
|
d("div", null, [
|
|
57
|
-
|
|
59
|
+
r(o(y), {
|
|
58
60
|
link: "",
|
|
59
61
|
type: "primary",
|
|
60
62
|
size: "small",
|
|
61
|
-
onClick: B((w) => z(t,
|
|
63
|
+
onClick: B((w) => z(t, s), ["prevent"])
|
|
62
64
|
}, {
|
|
63
|
-
default:
|
|
65
|
+
default: n(() => e[2] || (e[2] = [
|
|
64
66
|
b(" 查看 ")
|
|
65
67
|
])),
|
|
66
68
|
_: 2
|
|
67
69
|
}, 1032, ["onClick"]),
|
|
68
|
-
|
|
70
|
+
r(o(y), {
|
|
69
71
|
link: "",
|
|
70
72
|
type: "primary",
|
|
71
73
|
size: "small",
|
|
72
|
-
onClick: B((w) => x(t,
|
|
74
|
+
onClick: B((w) => x(t, s), ["prevent"])
|
|
73
75
|
}, {
|
|
74
|
-
default:
|
|
76
|
+
default: n(() => e[3] || (e[3] = [
|
|
75
77
|
b(" 编辑 ")
|
|
76
78
|
])),
|
|
77
79
|
_: 2
|
|
78
80
|
}, 1032, ["onClick"]),
|
|
79
|
-
|
|
81
|
+
r(o(y), {
|
|
80
82
|
link: "",
|
|
81
83
|
type: "primary",
|
|
82
84
|
size: "small",
|
|
83
|
-
onClick: (w) => $(t,
|
|
85
|
+
onClick: (w) => $(t, s)
|
|
84
86
|
}, {
|
|
85
|
-
default:
|
|
87
|
+
default: n(() => e[4] || (e[4] = [
|
|
86
88
|
b(" 删除 ")
|
|
87
89
|
])),
|
|
88
90
|
_: 2
|
|
@@ -94,18 +96,18 @@ const G = { style: { "text-align": "center" } }, H = /* @__PURE__ */ D({
|
|
|
94
96
|
]),
|
|
95
97
|
_: 3
|
|
96
98
|
}, 8, ["data"]),
|
|
97
|
-
|
|
99
|
+
i.value ? (u(), E(j, {
|
|
98
100
|
key: 0,
|
|
99
|
-
form:
|
|
101
|
+
form: a.table,
|
|
100
102
|
activeIndex: m.value,
|
|
101
103
|
onOpen: S,
|
|
102
104
|
onClose: R,
|
|
103
|
-
disabled:
|
|
105
|
+
disabled: c.value
|
|
104
106
|
}, {
|
|
105
|
-
header:
|
|
107
|
+
header: n(() => e[5] || (e[5] = [
|
|
106
108
|
b(" 123 ")
|
|
107
109
|
])),
|
|
108
|
-
footer:
|
|
110
|
+
footer: n(() => [
|
|
109
111
|
d("div", G, [
|
|
110
112
|
d("button", {
|
|
111
113
|
onClick: e[0] || (e[0] = //@ts-ignore
|
package/dist/es/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { w as s, m as o } from "./utils-BFYGwXom.js";
|
|
|
2
2
|
import { Q as a } from "./Button-DwFNqnO-.js";
|
|
3
3
|
import { a as t, b as r, c as m, d as x, e as Q, f as n, Q as c, g as e, h as i } from "./Form-BB4u_L5j.js";
|
|
4
4
|
import { Q as y } from "./Dialog-B0OvoS7J.js";
|
|
5
|
-
import { Q as f } from "./Table-
|
|
5
|
+
import { Q as f } from "./Table-Dm-jHN-I.js";
|
|
6
6
|
import { Q as p } from "./wordSee-Bg6XeDsu.js";
|
|
7
7
|
import { Q as l } from "./excelSee-Blf1y7aY.js";
|
|
8
8
|
import { Q as _ } from "./pdfSee-Bt2kUOLa.js";
|