yxuse 1.0.55 → 1.0.56

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/lib/index.es6.js CHANGED
@@ -1,57 +1,29 @@
1
- import { d as g, o as m, c, w, m as d, r as f, a as v, b as k, F as x, e as S, f as l, g as b, i as T } from "./vue.runtime.esm-bundler.es.js";
2
- const C = {
3
- tableData: {
4
- type: Array,
5
- require: !0
6
- },
7
- rowKey: {
8
- type: String,
9
- require: !0
10
- },
11
- columns: {
12
- type: Array,
13
- require: !0,
14
- default: () => []
15
- },
16
- sortHandle: {
17
- type: String,
18
- default: "",
19
- require: !1
20
- },
21
- border: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- align: {
26
- type: String,
27
- default: "center",
28
- require: !1
29
- }
30
- }, j = /* @__PURE__ */ g({
1
+ import { d as g, o as c, c as f, w as v, m as d, r as y, a as j, b as k, F as x, e as C, f as s, g as w, i as O } from "./vue.runtime.esm-bundler.es.js";
2
+ const T = /* @__PURE__ */ g({
31
3
  __name: "DynamicComponents",
32
4
  props: {
33
5
  col: null,
34
6
  row: null
35
7
  },
36
8
  setup(t) {
37
- const a = t;
38
- return (u, s) => {
39
- var i, n, p;
40
- return m(), c(f(`el-${(i = a.col) == null ? void 0 : i.type}`), d({
41
- modelValue: t.row[(n = a.col) == null ? void 0 : n.prop],
42
- "onUpdate:modelValue": s[0] || (s[0] = (e) => {
43
- var r;
44
- return t.row[(r = a.col) == null ? void 0 : r.prop] = e;
45
- })
46
- }, (p = a.col) == null ? void 0 : p.config), {
47
- default: w(() => {
9
+ const r = t;
10
+ return (p, m) => {
11
+ var a, i, o;
12
+ return c(), f(y(`el-${(a = r.col) == null ? void 0 : a.type}`), d({
13
+ modelValue: t.row[(i = r.col) == null ? void 0 : i.prop],
14
+ "onUpdate:modelValue": m[0] || (m[0] = (l) => {
48
15
  var e;
16
+ return t.row[(e = r.col) == null ? void 0 : e.prop] = l;
17
+ })
18
+ }, (o = r.col) == null ? void 0 : o.config), {
19
+ default: v(() => {
20
+ var l;
49
21
  return [
50
- a.col.type === "select" ? (m(!0), v(x, { key: 0 }, k((e = a.col) == null ? void 0 : e.config.options, (r) => (m(), c(f("el-option"), {
51
- key: r.value,
52
- label: r.label,
53
- value: r.value
54
- }, null, 8, ["label", "value"]))), 128)) : S("", !0)
22
+ r.col.type === "select" ? (c(!0), j(x, { key: 0 }, k((l = r.col) == null ? void 0 : l.config.options, (e) => (c(), f(y("el-option"), {
23
+ key: e.value,
24
+ label: e.label,
25
+ value: e.value
26
+ }, null, 8, ["label", "value"]))), 128)) : C("", !0)
55
27
  ];
56
28
  }),
57
29
  _: 1
@@ -60,53 +32,57 @@ const C = {
60
32
  }
61
33
  });
62
34
  function N(t) {
63
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !T(t);
35
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !O(t);
64
36
  }
65
37
  const V = {
66
- "operate-handle": (t, a) => !!(t || a)
38
+ "operate-handle": (t, r) => !!(t || r)
67
39
  }, _ = /* @__PURE__ */ g({
68
40
  name: "YxTable",
69
- props: C,
41
+ props: {
42
+ tableProps: Object,
43
+ tableData: Object
44
+ },
70
45
  emits: V,
71
46
  setup(t, {
72
- attrs: a,
73
- slots: u,
74
- emit: s
47
+ attrs: r,
48
+ slots: p,
49
+ emit: m
75
50
  }) {
51
+ const a = t.tableProps;
76
52
  return () => {
77
- const i = (e, r) => {
78
- var o;
79
- return e.slotName && ((o = u[e.slotName]) == null ? void 0 : o.call(u, r));
80
- }, n = t.columns.map((e) => l(b("el-table-column"), d(e, {
81
- align: t.align
53
+ const i = (e, n) => {
54
+ var u;
55
+ return e.slotName && ((u = p[e.slotName]) == null ? void 0 : u.call(p, n));
56
+ }, o = a.columns.map((e) => s(w("el-table-column"), d(e, {
57
+ align: a.align
82
58
  }), {
83
- default: (r) => (e == null ? void 0 : e.renderType) === "operate" ? p(e, r) : e != null && e.renderType && (e == null ? void 0 : e.renderType) !== "operate" ? l(j, {
59
+ default: (n) => (e == null ? void 0 : e.renderType) === "operate" ? l(e, n) : e != null && e.renderType && (e == null ? void 0 : e.renderType) !== "operate" ? s(T, {
84
60
  col: e,
85
- row: r.row
86
- }, null) : (e == null ? void 0 : e.slotName) && i(e, r)
87
- })), p = (e, r) => {
88
- var o;
89
- return l("div", {
61
+ row: n.row
62
+ }, null) : (e == null ? void 0 : e.slotName) && i(e, n)
63
+ })), l = (e, n) => {
64
+ var u;
65
+ return s("div", {
90
66
  class: "flex justify-center cursor-pointer"
91
- }, [(o = e.operate) == null ? void 0 : o.map((y) => l("span", {
92
- onClick: () => s("operate-handle", y.key, r.row),
67
+ }, [(u = e.operate) == null ? void 0 : u.map((b) => s("span", {
68
+ onClick: () => m("operate-handle", b.key, n.row),
93
69
  class: "mr-10 whitespace-nowrap"
94
- }, [y.label]))]);
70
+ }, [b.label]))]);
95
71
  };
96
- return l("div", null, [l(b("el-table"), d(a, {
97
- "row-key": t.rowKey,
98
- data: t.tableData,
99
- border: t.border
100
- }), N(n) ? n : {
101
- default: () => [n]
72
+ return s("div", null, [s(w("el-table"), d(r, {
73
+ "row-key": a.rowKey,
74
+ data: a.tableData,
75
+ border: a.border
76
+ }), N(o) ? o : {
77
+ default: () => [o]
102
78
  })]);
103
79
  };
104
80
  }
105
- }), O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81
+ }), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
106
82
  __proto__: null,
107
83
  YxTable: _
108
84
  }, Symbol.toStringTag, { value: "Module" }));
109
85
  export {
110
86
  _ as Y,
111
- O as c
87
+ S as c
112
88
  };