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 D, ref as k, useSlots as L, reactive as g, onMounted as M, openBlock as u, createElementBlock as T, createVNode as i, unref as n, withCtx as s, Fragment as F, renderList as O, createBlock as N, renderSlot as E, createCommentVNode as v, createElementVNode as d, withModifiers as B, createTextVNode as b } from "vue";
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__ */ D({
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 o = Q, p = k(!1), C = L(), m = k(NaN), a = g([]), c = g([]), f = k(!1), V = () => {
13
- for (let l in o.table.data)
14
- for (let e = 0; e < o.table.items.length; e++)
15
- l === o.table.items[e].code && (o.table.items[e].type === "select" ? c.push({ prop: l + "Label", label: o.table.items[e].label }) : c.push({ prop: l, label: o.table.items[e].label }));
16
- a.push(o.table.data), console.log("tableData", a);
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
- console.log("123", a), a = a.splice(e, 1);
20
+ p = p.splice(e, 1);
19
21
  }, x = (l, e) => {
20
- console.log("123", a), f.value = !1, m.value = e, p.value = !0;
22
+ c.value = !1, m.value = e, i.value = !0;
21
23
  }, z = (l, e) => {
22
- console.log("123", a), m.value = e, f.value = !0, p.value = !0;
24
+ m.value = e, c.value = !0, i.value = !0;
23
25
  }, R = () => {
24
- p.value = !1;
26
+ i.value = !1;
25
27
  }, S = () => {
26
28
  };
27
- return M(() => {
29
+ return D(() => {
28
30
  V();
29
- }), (l, e) => (u(), T("div", null, [
30
- i(n(q), {
31
- data: a,
31
+ }), (l, e) => (u(), N("div", null, [
32
+ r(o(q), {
33
+ data: o(p),
32
34
  style: { width: "100%" }
33
35
  }, {
34
- default: s(() => [
35
- (u(!0), T(F, null, O(c, (t, r) => (u(), N(n(I), {
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: r
40
+ key: s
39
41
  }, {
40
- default: s(() => [
41
- n(C)[t.prop] ? E(l.$slots, t.prop, {
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
- i(n(I), { label: "操作" }, {
50
- default: s(({ row: t, $index: r }) => [
51
- n(C).opreate ? E(l.$slots, "opreate", {
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: r,
55
+ index: s,
54
56
  row: t
55
57
  }) : v("", !0),
56
58
  d("div", null, [
57
- i(n(y), {
59
+ r(o(y), {
58
60
  link: "",
59
61
  type: "primary",
60
62
  size: "small",
61
- onClick: B((w) => z(t, r), ["prevent"])
63
+ onClick: B((w) => z(t, s), ["prevent"])
62
64
  }, {
63
- default: s(() => e[2] || (e[2] = [
65
+ default: n(() => e[2] || (e[2] = [
64
66
  b(" 查看 ")
65
67
  ])),
66
68
  _: 2
67
69
  }, 1032, ["onClick"]),
68
- i(n(y), {
70
+ r(o(y), {
69
71
  link: "",
70
72
  type: "primary",
71
73
  size: "small",
72
- onClick: B((w) => x(t, r), ["prevent"])
74
+ onClick: B((w) => x(t, s), ["prevent"])
73
75
  }, {
74
- default: s(() => e[3] || (e[3] = [
76
+ default: n(() => e[3] || (e[3] = [
75
77
  b(" 编辑 ")
76
78
  ])),
77
79
  _: 2
78
80
  }, 1032, ["onClick"]),
79
- i(n(y), {
81
+ r(o(y), {
80
82
  link: "",
81
83
  type: "primary",
82
84
  size: "small",
83
- onClick: (w) => $(t, r)
85
+ onClick: (w) => $(t, s)
84
86
  }, {
85
- default: s(() => e[4] || (e[4] = [
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
- p.value ? (u(), N(j, {
99
+ i.value ? (u(), E(j, {
98
100
  key: 0,
99
- form: o.table,
101
+ form: a.table,
100
102
  activeIndex: m.value,
101
103
  onOpen: S,
102
104
  onClose: R,
103
- disabled: f.value
105
+ disabled: c.value
104
106
  }, {
105
- header: s(() => e[5] || (e[5] = [
107
+ header: n(() => e[5] || (e[5] = [
106
108
  b(" 123 ")
107
109
  ])),
108
- footer: s(() => [
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-C5-yv_ug.js";
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";