@dazhicheng/ui 1.5.229 → 1.5.231
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/components/tt-form/src/components/ExpandableArrow.vue.d.ts +2 -2
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +29 -23
- package/dist/components/tt-form/src/index.vue2.js +32 -29
- package/dist/components/tt-table/src/Table.vue.js +471 -393
- package/dist/components/tt-table/src/components/TableAction.vue.js +134 -105
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +49 -44
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -16,14 +16,14 @@ declare function __VLS_template(): {
|
|
|
16
16
|
icon: string;
|
|
17
17
|
};
|
|
18
18
|
refs: {};
|
|
19
|
-
rootEl:
|
|
19
|
+
rootEl: any;
|
|
20
20
|
};
|
|
21
21
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
22
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
23
|
"update:modelValue": (value: boolean) => any;
|
|
24
24
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
25
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
26
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
26
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
28
|
export default _default;
|
|
29
29
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, mergeModels as m, useModel as p, createBlock as d, openBlock as c, unref as o, normalizeClass as u, withCtx as f, renderSlot as a, createElementVNode as s, createVNode as x } from "vue";
|
|
2
2
|
import "axios";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
import "dayjs";
|
|
@@ -9,12 +9,13 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
|
|
|
9
9
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
10
10
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
11
|
import "lodash-es";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { TtIcon as
|
|
15
|
-
|
|
12
|
+
import w from "../../../../assets/svg/arrowLineDown.svg.js";
|
|
13
|
+
import _ from "../../../../assets/svg/arrowUp.svg.js";
|
|
14
|
+
import { TtIcon as b } from "../../../tt-icon/index.js";
|
|
15
|
+
import { TtButton as V } from "../../../tt-button/index.js";
|
|
16
|
+
const h = { class: "ml-1 flex items-center cursor-pointer" }, B = { class: "tt-expandable-arrow__icon flex h-[20px] w-[20px] items-center justify-center rounded-full" }, q = /* @__PURE__ */ n({
|
|
16
17
|
__name: "ExpandableArrow",
|
|
17
|
-
props: /* @__PURE__ */
|
|
18
|
+
props: /* @__PURE__ */ m({
|
|
18
19
|
class: {}
|
|
19
20
|
}, {
|
|
20
21
|
modelValue: { default: !1, type: Boolean },
|
|
@@ -22,26 +23,31 @@ const V = { class: "ml-1 flex items-center cursor-pointer" }, E = { class: "tt-e
|
|
|
22
23
|
}),
|
|
23
24
|
emits: ["update:modelValue"],
|
|
24
25
|
setup(t) {
|
|
25
|
-
const
|
|
26
|
-
return (r, l) => (
|
|
27
|
-
class: u(o(v)("flex items-center h-[28px]",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
const i = t, e = p(t, "modelValue");
|
|
27
|
+
return (r, l) => (c(), d(o(V), {
|
|
28
|
+
class: u(o(v)("tt-expandable-arrow flex items-center h-[28px]", i.class)),
|
|
29
|
+
"aria-expanded": !e.value,
|
|
30
|
+
"aria-label": e.value ? "展开" : "收起",
|
|
31
|
+
onClick: l[0] || (l[0] = (C) => e.value = !e.value)
|
|
32
|
+
}, {
|
|
33
|
+
default: f(() => [
|
|
34
|
+
a(r.$slots, "default", { isExpanded: e.value }),
|
|
35
|
+
s("div", h, [
|
|
36
|
+
a(r.$slots, "icon", {}, () => [
|
|
37
|
+
s("div", B, [
|
|
38
|
+
x(o(b), {
|
|
39
|
+
icon: e.value ? o(w) : o(_),
|
|
40
|
+
size: 12,
|
|
41
|
+
"is-custom-svg": ""
|
|
42
|
+
}, null, 8, ["icon"])
|
|
43
|
+
])
|
|
39
44
|
])
|
|
40
45
|
])
|
|
41
|
-
])
|
|
42
|
-
|
|
46
|
+
]),
|
|
47
|
+
_: 3
|
|
48
|
+
}, 8, ["class", "aria-expanded", "aria-label"]));
|
|
43
49
|
}
|
|
44
50
|
});
|
|
45
51
|
export {
|
|
46
|
-
|
|
52
|
+
q as default
|
|
47
53
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as P, ref as N, onMounted as S, nextTick as $, watch as k, createBlock as
|
|
1
|
+
import { defineComponent as P, ref as N, onMounted as S, nextTick as $, watch as k, createBlock as B, openBlock as A, unref as a, mergeProps as x, withKeys as L, createSlots as I, withCtx as m, renderSlot as u, normalizeProps as c, guardReactiveProps as f, createCommentVNode as K, renderList as U } from "vue";
|
|
2
2
|
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
3
|
import { useDesign as z } from "../../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
5
|
import "element-plus";
|
|
6
6
|
import "dayjs";
|
|
7
|
-
import { cloneDeep as
|
|
7
|
+
import { cloneDeep as H } from "../../../packages/utils/src/tool.js";
|
|
8
8
|
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
9
9
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
10
10
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
11
11
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
12
12
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
13
|
-
import { get as M, isEqual as
|
|
13
|
+
import { get as M, isEqual as q, set as G } from "lodash-es";
|
|
14
14
|
import { useForwardPriorityValues as W } from "./hooks/useForwardPriorityValues.js";
|
|
15
15
|
import { useDebounceFn as j } from "@vueuse/core";
|
|
16
16
|
import J from "./components/FormActions.vue2.js";
|
|
@@ -61,35 +61,38 @@ const Pe = /* @__PURE__ */ P({
|
|
|
61
61
|
},
|
|
62
62
|
setup(O) {
|
|
63
63
|
var g, w, y, F;
|
|
64
|
-
const C = N(), { prefixCls: _ } = z("form-plus"), d = O,
|
|
65
|
-
ee([
|
|
64
|
+
const C = N(), { prefixCls: _ } = z("form-plus"), d = O, t = (w = (g = d.formApi) == null ? void 0 : g.useStore) == null ? void 0 : w.call(g), n = W(d, t), v = /* @__PURE__ */ new Map(), { delegatedSlots: E, form: h } = Z(n);
|
|
65
|
+
ee([n, h]), oe(v), (F = (y = d.formApi) == null ? void 0 : y.mount) == null || F.call(y, h, v);
|
|
66
66
|
const T = (e) => {
|
|
67
|
-
var s,
|
|
68
|
-
(s = d.formApi) == null || s.setState({ collapsed: e }), (
|
|
67
|
+
var s, r, o;
|
|
68
|
+
(s = d.formApi) == null || s.setState({ collapsed: e }), (o = (r = n.value).handleCollapsedChange) == null || o.call(r, e);
|
|
69
69
|
};
|
|
70
70
|
function R(e) {
|
|
71
|
-
var
|
|
72
|
-
!(
|
|
71
|
+
var r, o;
|
|
72
|
+
if (!(t != null && t.value.submitOnEnter) || !((r = n.value.formApi) != null && r.isMounted))
|
|
73
|
+
return;
|
|
74
|
+
const s = e.target;
|
|
75
|
+
s instanceof HTMLTextAreaElement || s instanceof HTMLButtonElement || (e.preventDefault(), (o = n.value.formApi) == null || o.validateAndSubmitForm());
|
|
73
76
|
}
|
|
74
77
|
const V = j(async () => {
|
|
75
78
|
var e;
|
|
76
|
-
|
|
79
|
+
t != null && t.value.submitOnChange && ((e = n.value.formApi) == null || e.validateAndSubmitForm());
|
|
77
80
|
}, 300), b = {};
|
|
78
81
|
return S(async () => {
|
|
79
82
|
await $(), k(
|
|
80
83
|
() => h.values,
|
|
81
84
|
async (e) => {
|
|
82
|
-
var s,
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
85
|
+
var s, r;
|
|
86
|
+
if (n.value.handleValuesChange) {
|
|
87
|
+
const o = (s = t == null ? void 0 : t.value.schema) == null ? void 0 : s.map((p) => p.fieldName);
|
|
88
|
+
if (o && o.length > 0) {
|
|
86
89
|
const p = [];
|
|
87
|
-
if (
|
|
90
|
+
if (o.forEach((i) => {
|
|
88
91
|
const l = M(e, i), D = M(b, i);
|
|
89
|
-
|
|
92
|
+
q(l, D) || (p.push(i), G(b, i, l));
|
|
90
93
|
}), p.length > 0) {
|
|
91
|
-
const i = await ((
|
|
92
|
-
|
|
94
|
+
const i = await ((r = n.value.formApi) == null ? void 0 : r.getValues());
|
|
95
|
+
n.value.handleValuesChange(H(i ?? {}), p);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
}
|
|
@@ -98,26 +101,26 @@ const Pe = /* @__PURE__ */ P({
|
|
|
98
101
|
{ deep: !0 }
|
|
99
102
|
);
|
|
100
103
|
}), (e, s) => {
|
|
101
|
-
var
|
|
102
|
-
return
|
|
104
|
+
var r;
|
|
105
|
+
return A(), B(a(te), x({
|
|
103
106
|
ref_key: "formRef",
|
|
104
107
|
ref: C
|
|
105
|
-
}, a(
|
|
108
|
+
}, a(n), {
|
|
106
109
|
class: a(_),
|
|
107
|
-
collapsed: (
|
|
110
|
+
collapsed: (r = a(t)) == null ? void 0 : r.collapsed,
|
|
108
111
|
"component-bind-event-map": a(Y),
|
|
109
112
|
"component-map": a(X),
|
|
110
113
|
form: a(h),
|
|
111
114
|
"global-common-config": a(Q),
|
|
112
115
|
onKeydown: L(R, ["enter"])
|
|
113
116
|
}), I({
|
|
114
|
-
default: m((
|
|
115
|
-
u(e.$slots, "default", c(f(
|
|
117
|
+
default: m((o) => [
|
|
118
|
+
u(e.$slots, "default", c(f(o)), () => {
|
|
116
119
|
var p, i;
|
|
117
120
|
return [
|
|
118
|
-
a(
|
|
121
|
+
a(n).showDefaultActions ? (A(), B(J, {
|
|
119
122
|
key: 0,
|
|
120
|
-
"model-value": (p = a(
|
|
123
|
+
"model-value": (p = a(t)) == null ? void 0 : p.collapsed,
|
|
121
124
|
"wrapper-ref": (i = C.value) == null ? void 0 : i.wrapperRef,
|
|
122
125
|
"onUpdate:modelValue": T
|
|
123
126
|
}, {
|
|
@@ -140,10 +143,10 @@ const Pe = /* @__PURE__ */ P({
|
|
|
140
143
|
]),
|
|
141
144
|
_: 2
|
|
142
145
|
}, [
|
|
143
|
-
U(a(E), (
|
|
144
|
-
name:
|
|
146
|
+
U(a(E), (o) => ({
|
|
147
|
+
name: o,
|
|
145
148
|
fn: m((p) => [
|
|
146
|
-
u(e.$slots,
|
|
149
|
+
u(e.$slots, o, c(f(p)))
|
|
147
150
|
])
|
|
148
151
|
}))
|
|
149
152
|
]), 1040, ["class", "collapsed", "component-bind-event-map", "component-map", "form", "global-common-config"]);
|