@dazhicheng/ui 1.6.71 → 1.6.73
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/assets/svg/download.svg.js +1 -1
- package/dist/components/tt-api-component/index.js +4 -3
- package/dist/components/tt-api-component/index.vue2.js +3 -2
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-area/TtArea.vue3.js +3 -2
- package/dist/components/tt-button/index.d.ts +28 -28
- package/dist/components/tt-button/index.js +5 -4
- package/dist/components/tt-button/index.vue.d.ts +16 -16
- package/dist/components/tt-button/index.vue2.js +18 -17
- package/dist/components/tt-checkbox/index.js +4 -3
- package/dist/components/tt-checkbox/index.vue.js +9 -8
- package/dist/components/tt-config-provider/index.js +4 -3
- package/dist/components/tt-custom-export-modal/index.js +4 -3
- package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
- package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
- package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
- package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
- package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue2.js +3 -2
- package/dist/components/tt-custom-export-panel/index.js +4 -3
- package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.js +3 -2
- package/dist/components/tt-drawer/index.d.ts +109 -109
- package/dist/components/tt-drawer/index.js +4 -3
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +3 -2
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +3 -2
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +7 -6
- package/dist/components/tt-drawer/src/props.js +3 -2
- package/dist/components/tt-drawer/src/utils/drawer-api.js +3 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-empty/index.js +4 -3
- package/dist/components/tt-form/index.js +9 -8
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +8 -7
- package/dist/components/tt-form/src/components/FormActions.vue2.js +33 -32
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
- package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
- package/dist/components/tt-form/src/form/FormItem.vue.js +3 -2
- package/dist/components/tt-form/src/form/FormLabel.vue.js +6 -5
- package/dist/components/tt-form/src/form/RenderContent.vue.js +7 -6
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +3 -2
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +3 -2
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +1 -0
- package/dist/components/tt-form/src/form-render/array-register/utils.js +3 -2
- package/dist/components/tt-form/src/form-render/dependencies.js +30 -29
- package/dist/components/tt-form/src/form-render/form.vue2.js +3 -2
- package/dist/components/tt-form/src/form-render/helper.js +3 -2
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +1 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +3 -2
- package/dist/components/tt-form/src/group-form/groupFormApi.js +3 -2
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +13 -12
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +3 -2
- package/dist/components/tt-form/src/index.vue2.js +3 -2
- package/dist/components/tt-form/src/useFormContext.js +10 -9
- package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +3 -2
- package/dist/components/tt-icon/index.js +6 -5
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/index.js +6 -5
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/src/components/ImageViewer.js +8 -7
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.js +4 -3
- package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
- package/dist/components/tt-input-textarea/index.vue.js +3 -2
- package/dist/components/tt-loading/index.js +4 -3
- package/dist/components/tt-loading/src/directive.js +4 -3
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-log/index.js +4 -3
- package/dist/components/tt-log/index.vue.js +5 -4
- package/dist/components/tt-modal/index.d.ts +150 -150
- package/dist/components/tt-modal/index.js +8 -7
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
- package/dist/components/tt-modal/src/RenderModal.vue.js +3 -2
- package/dist/components/tt-modal/src/components/ModalFooter.vue2.js +3 -2
- package/dist/components/tt-modal/src/components/ModalHeader.vue2.js +3 -2
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +3 -2
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
- package/dist/components/tt-modal/src/props.js +3 -2
- package/dist/components/tt-modal/src/utils/modal-api.js +9 -8
- package/dist/components/tt-modal-form/index.vue.js +3 -2
- package/dist/components/tt-nav-anchor/index.js +4 -3
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +3 -2
- package/dist/components/tt-panel-select/index.js +4 -3
- package/dist/components/tt-panel-select/src/common.js +5 -4
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +3 -2
- package/dist/components/tt-panel-select/src/index.vue.d.ts +5 -5
- package/dist/components/tt-panel-select/src/index.vue.js +3 -2
- package/dist/components/tt-radio-group/index.js +4 -3
- package/dist/components/tt-radio-group/index.vue.js +18 -17
- package/dist/components/tt-select/index.js +4 -3
- package/dist/components/tt-select/src/Select.vue.js +3 -2
- package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
- package/dist/components/tt-select/src/components/Table.vue.js +3 -2
- package/dist/components/tt-select/src/hooks/useDataSource.js +3 -2
- package/dist/components/tt-select/src/hooks/useSelect.js +18 -17
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +3 -2
- package/dist/components/tt-table/index.js +6 -5
- package/dist/components/tt-table/src/Table.vue.js +3 -2
- package/dist/components/tt-table/src/TableForm.vue.js +3 -2
- package/dist/components/tt-table/src/components/TableAction.vue.js +8 -7
- package/dist/components/tt-table/src/components/TableButtons.js +3 -2
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +3 -2
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +3 -2
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +17 -16
- package/dist/components/tt-table/src/hooks/useColumns.js +3 -2
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +18 -17
- package/dist/components/tt-table/src/hooks/usePagination.js +20 -19
- package/dist/components/tt-table/src/hooks/useQuery.js +9 -8
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +3 -2
- package/dist/components/tt-table/src/hooks/useRowSelection.js +25 -24
- package/dist/components/tt-table/src/hooks/useSideSlot.js +9 -8
- package/dist/components/tt-table/src/hooks/useSyncProps.js +11 -10
- package/dist/components/tt-table/src/hooks/useTableData.js +5 -4
- package/dist/components/tt-table/src/hooks/useTableFooter.js +13 -12
- package/dist/components/tt-table/src/hooks/useTableForm.js +20 -19
- package/dist/components/tt-table/src/props.js +7 -6
- package/dist/components/tt-table/src/table-mutation-events.js +12 -11
- package/dist/components/tt-table/src/utils/action-tab-index.js +5 -4
- package/dist/components/tt-table/src/utils/context.js +9 -8
- package/dist/components/tt-text/index.js +4 -3
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/index.js +6 -5
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/TtUpload.vue.js +3 -2
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/directives/disabled-tip/index.js +3 -2
- package/dist/hooks/useFormSchemasLink.js +3 -2
- package/dist/hooks/useFormat.js +3 -2
- package/dist/hooks/usePanelSelectSchemas.js +3 -2
- package/dist/hooks/useScreenshotOss.js +3 -2
- package/dist/packages/hooks/src/useDebounce.js +3 -2
- package/dist/packages/hooks/src/useElementScreenshot.js +3 -2
- package/dist/packages/hooks/src/usePriorityValue.js +9 -8
- package/dist/packages/utils/src/stateHandler.js +15 -9
- package/dist/plugins/default/renderCellContent.js +12 -11
- package/dist/plugins/vxeTable/switchStatus.js +13 -12
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -6,6 +6,7 @@ import { toValue as v, getCurrentInstance as d, useSlots as b, useAttrs as O, co
|
|
|
6
6
|
import "numeral";
|
|
7
7
|
import { getFirstNonNullOrUndefined as V } from "../../utils/src/tool.js";
|
|
8
8
|
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
9
|
+
import "../../utils/src/stateHandler.js";
|
|
9
10
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
10
11
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
11
12
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
@@ -14,11 +15,11 @@ import "lodash-es";
|
|
|
14
15
|
function g(o, e, r) {
|
|
15
16
|
const t = d(), u = b(), c = O();
|
|
16
17
|
return P(() => {
|
|
17
|
-
var
|
|
18
|
-
const m = ((
|
|
18
|
+
var n, s;
|
|
19
|
+
const m = ((n = t == null ? void 0 : t.vnode) == null ? void 0 : n.props) || {}, i = {};
|
|
19
20
|
for (const [l, f] of Object.entries(m))
|
|
20
|
-
|
|
21
|
-
const p = (
|
|
21
|
+
i[a(l)] = f;
|
|
22
|
+
const p = (i == null ? void 0 : i[o]) === void 0 ? void 0 : e[o];
|
|
22
23
|
return V(
|
|
23
24
|
u[o],
|
|
24
25
|
c[o],
|
|
@@ -27,20 +28,20 @@ function g(o, e, r) {
|
|
|
27
28
|
);
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function w(o, e) {
|
|
31
32
|
const r = {};
|
|
32
33
|
return Object.keys(o).forEach((t) => {
|
|
33
34
|
r[t] = g(t, o, e);
|
|
34
35
|
}), r;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function z(o) {
|
|
37
38
|
const e = {};
|
|
38
39
|
for (const [r, t] of Object.entries(o))
|
|
39
40
|
e[r] = v(t);
|
|
40
41
|
return e;
|
|
41
42
|
}
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
z as getPriorityValues,
|
|
44
45
|
g as usePriorityValue,
|
|
45
|
-
|
|
46
|
+
w as usePriorityValues
|
|
46
47
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var l = (s, e, i) => e in s ? n(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
|
|
3
|
+
var r = (s, e, i) => l(s, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
typeof Promise.withResolvers > "u" && (Promise.withResolvers = function() {
|
|
5
|
+
let s, e;
|
|
6
|
+
return { promise: new Promise((o, t) => {
|
|
7
|
+
s = o, e = t;
|
|
8
|
+
}), resolve: s, reject: e };
|
|
9
|
+
});
|
|
10
|
+
class c {
|
|
5
11
|
constructor() {
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
r(this, "condition", !1);
|
|
13
|
+
r(this, "promiseResolvers", null);
|
|
8
14
|
}
|
|
9
15
|
isConditionTrue() {
|
|
10
16
|
return this.condition;
|
|
@@ -21,13 +27,13 @@ class h {
|
|
|
21
27
|
waitForCondition() {
|
|
22
28
|
if (this.condition)
|
|
23
29
|
return Promise.resolve();
|
|
24
|
-
const { promise:
|
|
25
|
-
return this.promiseResolvers = { resolve: i, reject:
|
|
30
|
+
const { promise: e, resolve: i, reject: o } = Promise.withResolvers();
|
|
31
|
+
return this.promiseResolvers = { resolve: i, reject: o }, e;
|
|
26
32
|
}
|
|
27
33
|
clearPromises() {
|
|
28
34
|
this.promiseResolvers = null;
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
export {
|
|
32
|
-
|
|
38
|
+
c as StateHandler
|
|
33
39
|
};
|
|
@@ -8,12 +8,13 @@ import "xe-utils";
|
|
|
8
8
|
import "dayjs/plugin/utc";
|
|
9
9
|
import "dayjs/plugin/timezone";
|
|
10
10
|
import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
+
import "../../packages/utils/src/stateHandler.js";
|
|
11
12
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
13
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
14
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
15
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
-
import { cloneDeep as
|
|
16
|
-
function
|
|
16
|
+
import { cloneDeep as m } from "lodash-es";
|
|
17
|
+
function j() {
|
|
17
18
|
return {
|
|
18
19
|
install(C) {
|
|
19
20
|
C.renderer.add("renderCellContent", {
|
|
@@ -24,7 +25,7 @@ function _() {
|
|
|
24
25
|
if (c(e.customRender))
|
|
25
26
|
return l(
|
|
26
27
|
e.customRender({
|
|
27
|
-
result:
|
|
28
|
+
result: m(t),
|
|
28
29
|
row: u,
|
|
29
30
|
column: n,
|
|
30
31
|
$table: r
|
|
@@ -36,26 +37,26 @@ function _() {
|
|
|
36
37
|
const h = w({
|
|
37
38
|
name: "RenderCellContent",
|
|
38
39
|
setup() {
|
|
39
|
-
var
|
|
40
|
+
var f;
|
|
40
41
|
const t = b([]);
|
|
41
42
|
async function o() {
|
|
42
|
-
var
|
|
43
|
+
var p, s;
|
|
43
44
|
if (r[d]) return;
|
|
44
45
|
let a = {};
|
|
45
|
-
c(e.beforeFetch) && (a = await ((
|
|
46
|
-
const R = await ((
|
|
47
|
-
t.value = R, c(e.afterFetch) && (t.value = await e.afterFetch(t.value, u, n)), r[`${n.field}Option`] =
|
|
46
|
+
c(e.beforeFetch) && (a = await ((p = e.beforeFetch) == null ? void 0 : p.call(e, u, n)));
|
|
47
|
+
const R = await ((s = e.api) == null ? void 0 : s.call(e, a));
|
|
48
|
+
t.value = R, c(e.afterFetch) && (t.value = await e.afterFetch(t.value, u, n)), r[`${n.field}Option`] = m(t.value);
|
|
48
49
|
}
|
|
49
50
|
if ($(o), e.customRender)
|
|
50
51
|
return () => l(
|
|
51
52
|
e.customRender({
|
|
52
|
-
result:
|
|
53
|
+
result: m(t.value),
|
|
53
54
|
row: u,
|
|
54
55
|
column: n,
|
|
55
56
|
$table: r
|
|
56
57
|
})
|
|
57
58
|
);
|
|
58
|
-
const i = (
|
|
59
|
+
const i = (f = t.value) == null ? void 0 : f.find((a) => a[e.valueField] === n.field);
|
|
59
60
|
return () => l("div", null, (i == null ? void 0 : i[e.labelField]) ?? "");
|
|
60
61
|
}
|
|
61
62
|
});
|
|
@@ -66,5 +67,5 @@ function _() {
|
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
j as createVxePluginRenderCellContent
|
|
70
71
|
};
|
|
@@ -9,6 +9,7 @@ import "xe-utils";
|
|
|
9
9
|
import "dayjs/plugin/utc";
|
|
10
10
|
import "dayjs/plugin/timezone";
|
|
11
11
|
import "../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
12
|
+
import "../../packages/utils/src/stateHandler.js";
|
|
12
13
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
13
14
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
14
15
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
@@ -25,12 +26,12 @@ const D = [
|
|
|
25
26
|
"afterFetch",
|
|
26
27
|
"beforeChange"
|
|
27
28
|
];
|
|
28
|
-
function C(
|
|
29
|
-
return Object.fromEntries(Object.entries(
|
|
29
|
+
function C(i) {
|
|
30
|
+
return Object.fromEntries(Object.entries(i).map(([t, l]) => [I(t), l]));
|
|
30
31
|
}
|
|
31
32
|
const M = "1", O = "0";
|
|
32
|
-
function j(
|
|
33
|
-
const t = C(
|
|
33
|
+
function j(i) {
|
|
34
|
+
const t = C(i);
|
|
34
35
|
return {
|
|
35
36
|
active: t.activeValue ?? M,
|
|
36
37
|
inactive: t.inactiveValue ?? O
|
|
@@ -38,10 +39,10 @@ function j(a) {
|
|
|
38
39
|
}
|
|
39
40
|
function ae() {
|
|
40
41
|
return {
|
|
41
|
-
install(
|
|
42
|
-
|
|
42
|
+
install(i) {
|
|
43
|
+
i.renderer.add("switchStatus", {
|
|
43
44
|
renderTableDefault(t, l) {
|
|
44
|
-
const { row:
|
|
45
|
+
const { row: a, column: r } = l, e = t.props ?? {}, v = U(e, [...D]), E = C(v);
|
|
45
46
|
return w(
|
|
46
47
|
_({
|
|
47
48
|
name: "TtVxeSwitchCell",
|
|
@@ -51,14 +52,14 @@ function ae() {
|
|
|
51
52
|
activeValue: n,
|
|
52
53
|
inactiveValue: m,
|
|
53
54
|
...E,
|
|
54
|
-
modelValue:
|
|
55
|
+
modelValue: a[r.field],
|
|
55
56
|
loading: s.value,
|
|
56
57
|
"onUpdate:modelValue": (o) => {
|
|
57
|
-
|
|
58
|
+
a[r.field] = o;
|
|
58
59
|
},
|
|
59
60
|
beforeChange: async () => {
|
|
60
61
|
var d;
|
|
61
|
-
const o =
|
|
62
|
+
const o = a[r.field];
|
|
62
63
|
if ((u(e.beforeChange) ? await ((d = e.beforeChange) == null ? void 0 : d.call(e, o)) : !0) === !1 || !u(e.api)) return !1;
|
|
63
64
|
const T = o === n ? m : n, b = `是否确认${o === n ? "关闭" : "开启"}`;
|
|
64
65
|
let p = !1;
|
|
@@ -73,9 +74,9 @@ function ae() {
|
|
|
73
74
|
var h, V;
|
|
74
75
|
if (B === "confirm") {
|
|
75
76
|
f.confirmButtonLoading = !0;
|
|
76
|
-
let c = { [r.field]: T, id:
|
|
77
|
+
let c = { [r.field]: T, id: a.id };
|
|
77
78
|
if (s.value = !0, u(e.beforeFetch)) {
|
|
78
|
-
const S = await ((h = e.beforeFetch) == null ? void 0 : h.call(e, c,
|
|
79
|
+
const S = await ((h = e.beforeFetch) == null ? void 0 : h.call(e, c, a, r));
|
|
79
80
|
c = {
|
|
80
81
|
...c,
|
|
81
82
|
...S
|