@dazhicheng/ui 1.6.0 → 1.6.2
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-api-component/index.js +4 -3
- package/dist/components/tt-api-component/index.vue2.js +4 -3
- package/dist/components/tt-area/TtArea.vue3.js +8 -7
- package/dist/components/tt-button/index.js +5 -4
- package/dist/components/tt-button/index.vue2.js +4 -3
- package/dist/components/tt-checkbox/index.js +4 -3
- package/dist/components/tt-checkbox/index.vue.js +4 -3
- package/dist/components/tt-drawer/index.js +4 -3
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +4 -3
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +8 -7
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue2.js +3 -2
- package/dist/components/tt-drawer/src/props.js +3 -2
- package/dist/components/tt-drawer/src/utils/drawer-api.js +4 -2
- package/dist/components/tt-empty/index.js +9 -8
- package/dist/components/tt-form/index.js +10 -9
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -2
- package/dist/components/tt-form/src/components/FormActions.vue2.js +4 -2
- package/dist/components/tt-form/src/form/FormDescription.vue.js +3 -2
- package/dist/components/tt-form/src/form/FormItem.vue.js +6 -5
- package/dist/components/tt-form/src/form/FormLabel.vue.js +8 -7
- package/dist/components/tt-form/src/form/RenderContent.vue.js +4 -3
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +30 -28
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +4 -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 +6 -4
- package/dist/components/tt-form/src/form-render/dependencies.js +19 -18
- package/dist/components/tt-form/src/form-render/form.vue2.js +4 -2
- package/dist/components/tt-form/src/form-render/helper.js +15 -14
- package/dist/components/tt-form/src/form-render/rootWrapperClass.js +3 -2
- package/dist/components/tt-form/src/formApi.js +3 -2
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +4 -3
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +2 -0
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +4 -2
- package/dist/components/tt-form/src/group-form/groupFormApi.js +4 -3
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.js +3 -2
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +28 -27
- package/dist/components/tt-form/src/index.vue2.js +3 -2
- package/dist/components/tt-form/src/useFormContext.js +11 -10
- package/dist/components/tt-form-item-error-tooltip/index.js +5 -4
- package/dist/components/tt-form-item-error-tooltip/index.vue.js +4 -3
- package/dist/components/tt-icon/index.js +6 -5
- package/dist/components/tt-image/index.js +6 -5
- package/dist/components/tt-image/src/components/ImageViewer.js +7 -6
- package/dist/components/tt-loading/index.js +4 -3
- package/dist/components/tt-loading/src/directive.js +24 -23
- package/dist/components/tt-log/index.js +4 -3
- package/dist/components/tt-log/index.vue.js +3 -2
- package/dist/components/tt-modal/index.js +3 -2
- 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 +15 -14
- package/dist/components/tt-modal/src/props.js +3 -2
- package/dist/components/tt-modal/src/utils/modal-api.js +4 -2
- package/dist/components/tt-modal-form/index.vue.js +4 -3
- package/dist/components/tt-nav-anchor/index.js +4 -3
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +15 -14
- package/dist/components/tt-panel-select/index.js +4 -3
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +4 -3
- 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 +7 -6
- package/dist/components/tt-select/index.js +4 -3
- package/dist/components/tt-select/src/Select.vue.d.ts +8 -8
- package/dist/components/tt-select/src/Select.vue.js +4 -3
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +116 -7
- package/dist/components/tt-select/src/components/SelectTable.vue.js +3 -2
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.js +3 -2
- package/dist/components/tt-select/src/hooks/useDataSource.js +4 -3
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +7 -1
- package/dist/components/tt-select/src/hooks/useSelect.js +3 -2
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +1 -1
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.js +28 -27
- package/dist/components/tt-select/src/props.d.ts +2 -2
- package/dist/components/tt-table/index.d.ts +6 -6
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/src/Table.vue.js +178 -175
- package/dist/components/tt-table/src/TableForm.vue.d.ts +6 -6
- package/dist/components/tt-table/src/TableForm.vue.js +2 -2
- package/dist/components/tt-table/src/components/TableAction.vue.js +19 -17
- package/dist/components/tt-table/src/components/TableButtons.js +10 -9
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +4 -3
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +18 -17
- package/dist/components/tt-table/src/emits.d.ts +10 -1
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +17 -16
- package/dist/components/tt-table/src/hooks/useColumns.js +4 -3
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +34 -33
- package/dist/components/tt-table/src/hooks/usePagination.js +12 -11
- package/dist/components/tt-table/src/hooks/useQuery.js +6 -5
- package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +1 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +68 -54
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +5 -7
- package/dist/components/tt-table/src/hooks/useRowSelection.js +70 -68
- package/dist/components/tt-table/src/hooks/useSideSlot.js +4 -3
- package/dist/components/tt-table/src/hooks/useSyncProps.js +4 -3
- package/dist/components/tt-table/src/hooks/useTableData.js +6 -5
- package/dist/components/tt-table/src/hooks/useTableFooter.js +9 -8
- package/dist/components/tt-table/src/hooks/useTableForm.js +4 -3
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +37 -4
- package/dist/components/tt-table/src/props.d.ts +12 -6
- package/dist/components/tt-table/src/props.js +14 -7
- package/dist/components/tt-table/src/table-mutation-events.js +10 -9
- package/dist/components/tt-table/src/types/table.d.ts +16 -0
- package/dist/components/tt-table/src/utils/action-tab-index.js +15 -14
- package/dist/components/tt-table/src/utils/context.js +5 -4
- package/dist/components/tt-table/src/utils/table-api.js +4 -2
- package/dist/components/tt-table/src/utils/table-form-api.js +22 -20
- package/dist/components/tt-text/index.js +4 -3
- package/dist/components/tt-upload/index.js +6 -5
- package/dist/components/tt-upload/src/TtUpload.vue.js +4 -3
- package/dist/directives/disabled-tip/index.js +9 -8
- package/dist/hooks/useFormSchemasLink.js +4 -3
- package/dist/hooks/useFormat.d.ts +35 -71
- package/dist/hooks/useFormat.js +28 -39
- package/dist/hooks/usePanelSelectSchemas.js +4 -3
- package/dist/hooks/useScreenshotOss.js +16 -15
- package/dist/packages/hooks/src/useDebounce.js +5 -4
- package/dist/packages/hooks/src/useElementScreenshot.js +4 -3
- package/dist/packages/hooks/src/usePriorityValue.js +5 -4
- package/dist/packages/utils/src/format.js +48 -0
- package/dist/plugins/default/renderCellContent.js +4 -3
- package/dist/plugins/vxeTable/switchStatus.js +14 -13
- package/package.json +3 -3
|
@@ -53,7 +53,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
53
53
|
};
|
|
54
54
|
list: {
|
|
55
55
|
type: import('vue').PropType<Record<string, any>[]>;
|
|
56
|
-
default: () =>
|
|
56
|
+
default: () => Record<string, any>[];
|
|
57
57
|
};
|
|
58
58
|
loading: {
|
|
59
59
|
type: BooleanConstructor;
|
|
@@ -77,7 +77,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
77
77
|
};
|
|
78
78
|
selectValue: {
|
|
79
79
|
type: import('vue').PropType<import('../types').TtSelectModelValueType>;
|
|
80
|
-
default: () =>
|
|
80
|
+
default: () => import('../types').TtSelectModelValueType;
|
|
81
81
|
};
|
|
82
82
|
selectWidth: {
|
|
83
83
|
type: NumberConstructor;
|
|
@@ -152,7 +152,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
152
152
|
};
|
|
153
153
|
list: {
|
|
154
154
|
type: import('vue').PropType<Record<string, any>[]>;
|
|
155
|
-
default: () =>
|
|
155
|
+
default: () => Record<string, any>[];
|
|
156
156
|
};
|
|
157
157
|
loading: {
|
|
158
158
|
type: BooleanConstructor;
|
|
@@ -176,7 +176,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
176
176
|
};
|
|
177
177
|
selectValue: {
|
|
178
178
|
type: import('vue').PropType<import('../types').TtSelectModelValueType>;
|
|
179
|
-
default: () =>
|
|
179
|
+
default: () => import('../types').TtSelectModelValueType;
|
|
180
180
|
};
|
|
181
181
|
selectWidth: {
|
|
182
182
|
type: NumberConstructor;
|
|
@@ -2,6 +2,7 @@ import { defineComponent as We, useTemplateRef as S, ref as v, shallowRef as we,
|
|
|
2
2
|
import "axios";
|
|
3
3
|
import { ElCheckbox as Z, ElTooltip as Be } from "element-plus";
|
|
4
4
|
import "dayjs";
|
|
5
|
+
import "numeral";
|
|
5
6
|
import "xe-utils";
|
|
6
7
|
import "dayjs/plugin/utc";
|
|
7
8
|
import "dayjs/plugin/timezone";
|
|
@@ -25,7 +26,7 @@ const Ge = { class: "vxe-table--render-default size--mini border--default" }, Xe
|
|
|
25
26
|
}, je = ["onClick", "onMouseenter"], Je = { class: "vxe-cell" }, Ke = {
|
|
26
27
|
key: 1,
|
|
27
28
|
class: "vxe-body--column is--padding col--ellipsis"
|
|
28
|
-
}, Qe = { class: "vxe-cell" },
|
|
29
|
+
}, Qe = { class: "vxe-cell" }, yt = /* @__PURE__ */ We({
|
|
29
30
|
name: "TtSelectTable",
|
|
30
31
|
__name: "Table",
|
|
31
32
|
props: Ae,
|
|
@@ -314,5 +315,5 @@ const Ge = { class: "vxe-table--render-default size--mini border--default" }, Xe
|
|
|
314
315
|
}
|
|
315
316
|
});
|
|
316
317
|
export {
|
|
317
|
-
|
|
318
|
+
yt as default
|
|
318
319
|
};
|
|
@@ -2,8 +2,9 @@ import "axios";
|
|
|
2
2
|
import { ElMessage as fe } from "element-plus";
|
|
3
3
|
import { isFunction as v, isNullOrUnDef as w } from "../../../../packages/utils/src/is.js";
|
|
4
4
|
import { ref as g, computed as u, unref as e, watch as h, nextTick as oe, toValue as b } from "vue";
|
|
5
|
-
import "xe-utils";
|
|
6
5
|
import "dayjs";
|
|
6
|
+
import "numeral";
|
|
7
|
+
import "xe-utils";
|
|
7
8
|
import "dayjs/plugin/utc";
|
|
8
9
|
import "dayjs/plugin/timezone";
|
|
9
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -14,7 +15,7 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pa
|
|
|
14
15
|
import { cloneDeep as B, isArray as k, set as A, get as S } from "lodash-es";
|
|
15
16
|
import { useDebounceFn as ge } from "@vueuse/core";
|
|
16
17
|
import { isEqualObject as x } from "../utils/index.js";
|
|
17
|
-
function
|
|
18
|
+
function Ne(a, l, C) {
|
|
18
19
|
const F = g([]), P = g(""), D = g(!0), K = g([]), M = g(-1), L = g(!1), G = g(!1), E = g(!1), q = g(!1), H = u(() => e(a).isGrpc ? e(a).totalFieldGrpc || "total" : e(a).totalField || "data.pagination.total"), J = u(() => e(a).isGrpc ? e(a).dataFieldGrpc || "items" : e(a).dataField || "data"), Q = u(() => e(a).isGrpc ? e(a).resultFieldGrpc || "items" : e(a).resultField || "data.list"), W = u(() => e(a).searchField || "keyword"), V = u(() => e(a).valueField || "value"), O = u(() => e(a).labelField || "label"), z = u(() => e(a).mergeFields || []), X = u(() => e(a).isGrpc ? e(a).currentPageFieldGrpc || "page.index" : e(a).currentPageField || "pageIndex"), Y = u(() => e(a).isGrpc ? e(a).pageSizeFieldGrpc || "page.size" : e(a).pageSizeField || "pageSize"), R = u(() => e(a).deleteField || ""), Z = u(() => e(a).messageField || ""), $ = u(() => e(a).hasNextPageField), N = u(() => e(a).immediate || !1), p = u(() => e(a).changeDataClearable || !1), ee = u(() => e(a).defaultSingle), te = u(() => e(a).isSelectFirstOption), ae = u(() => e(G) || e(L));
|
|
19
20
|
let I = e(a).isPage ?? !0;
|
|
20
21
|
async function ie(t) {
|
|
@@ -202,5 +203,5 @@ function ze(a, l, C) {
|
|
|
202
203
|
};
|
|
203
204
|
}
|
|
204
205
|
export {
|
|
205
|
-
|
|
206
|
+
Ne as useDataSource
|
|
206
207
|
};
|
|
@@ -6,7 +6,13 @@ type OptType = {
|
|
|
6
6
|
/**
|
|
7
7
|
* 获取表格实例的函数
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* 获取表格实例。
|
|
11
|
+
*
|
|
12
|
+
* 返回值可能为 `undefined`:下拉面板未展开时表格还没挂载。
|
|
13
|
+
* 内部各键盘处理函数都有 `if (!tableRef) return` 守卫,签名与实现保持一致。
|
|
14
|
+
*/
|
|
15
|
+
tableInstance: () => VxeGridInstance | undefined;
|
|
10
16
|
/**
|
|
11
17
|
* 当前活动行的索引
|
|
12
18
|
*/
|
|
@@ -2,6 +2,7 @@ import "axios";
|
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
import { ref as w, computed as d, unref as t, watchEffect as I } from "vue";
|
|
5
|
+
import "numeral";
|
|
5
6
|
import { calcWordsWidth as M } from "../../../../packages/utils/src/tool.js";
|
|
6
7
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
8
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
@@ -9,7 +10,7 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/en
|
|
|
9
10
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
10
11
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
12
|
import { get as L } from "lodash-es";
|
|
12
|
-
function
|
|
13
|
+
function G(n, e) {
|
|
13
14
|
const S = w(1), h = /* @__PURE__ */ new Map(), m = w(0), p = w(!1), b = d(() => e.collapse ?? t(n).multiple), W = d(() => e.isFilterMethod ?? !0), E = d(() => e.searchField), v = d(() => {
|
|
14
15
|
if (e.autoSelectWidth && !t(n).multiple && t(e.selectOption)) {
|
|
15
16
|
const l = t(e.selectOption).label || "";
|
|
@@ -104,5 +105,5 @@ function q(n, e) {
|
|
|
104
105
|
};
|
|
105
106
|
}
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
+
G as useSelect
|
|
108
109
|
};
|
|
@@ -2,8 +2,9 @@ import "axios";
|
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import { isEmpty as F, isNullOrUnDef as C, isArray as D, isFunction as N } from "../../../../packages/utils/src/is.js";
|
|
4
4
|
import { ref as M, computed as q, watch as O, unref as a, nextTick as f, toValue as m, watchEffect as G, toRaw as K } from "vue";
|
|
5
|
-
import "xe-utils";
|
|
6
5
|
import "dayjs";
|
|
6
|
+
import "numeral";
|
|
7
|
+
import "xe-utils";
|
|
7
8
|
import "dayjs/plugin/utc";
|
|
8
9
|
import "dayjs/plugin/timezone";
|
|
9
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
@@ -13,7 +14,7 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mo
|
|
|
13
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
14
15
|
import { cloneDeep as I, isEqual as x } from "lodash-es";
|
|
15
16
|
import { useKeyboard as U } from "./useKeyboard.js";
|
|
16
|
-
function
|
|
17
|
+
function ae(r, e, V) {
|
|
17
18
|
const y = M({
|
|
18
19
|
scrollTop: 0
|
|
19
20
|
}), { keyboardCaptureEvent: g } = U({
|
|
@@ -69,7 +70,7 @@ function ne(r, e, b) {
|
|
|
69
70
|
const l = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
|
|
70
71
|
return D(t) ? t.reduce((s, c) => {
|
|
71
72
|
if (!C(c)) {
|
|
72
|
-
const u = m(e.options).find((T) => T.value === c), d = a(e.selectOption),
|
|
73
|
+
const u = m(e.options).find((T) => T.value === c), d = a(e.selectOption), b = d ? d.find((T) => T.value === c) : void 0, o = u || b;
|
|
73
74
|
o && s && s.push(o);
|
|
74
75
|
}
|
|
75
76
|
return s;
|
|
@@ -90,11 +91,11 @@ function ne(r, e, b) {
|
|
|
90
91
|
if (l.isDelete)
|
|
91
92
|
return;
|
|
92
93
|
if (!await S(l.value, l, "add")) {
|
|
93
|
-
n
|
|
94
|
+
t ? n == null || n.setRadioRow(t) : n == null || n.clearRadioRow();
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
const s = n == null ? void 0 : n.getCurrentRecord();
|
|
97
|
-
e.setActiveIndex(n == null ? void 0 : n.getRowIndex(s)), e.setSelectValue(l.value, w(l)), (u = a(e.selectRef)) == null || u.blur(), f(() => {
|
|
98
|
+
e.setActiveIndex((n == null ? void 0 : n.getRowIndex(s)) ?? -1), e.setSelectValue(l.value, w(l)), (u = a(e.selectRef)) == null || u.blur(), f(() => {
|
|
98
99
|
e.updateOptionsDisabled();
|
|
99
100
|
});
|
|
100
101
|
},
|
|
@@ -112,10 +113,10 @@ function ne(r, e, b) {
|
|
|
112
113
|
if (t)
|
|
113
114
|
c.push(l.value);
|
|
114
115
|
else {
|
|
115
|
-
const d = c.findIndex((
|
|
116
|
+
const d = c.findIndex((b) => b === l.value);
|
|
116
117
|
c.splice(d, 1);
|
|
117
118
|
}
|
|
118
|
-
n == null || n.setCurrentRow(l), e.setActiveIndex(n == null ? void 0 : n.getRowIndex(l)), e.setSelectValue(c, h(c)), e.checkedClearSearchValue && m(e.searchValue) && (e.setSearchValue(""), e.reload(!0), f(() => {
|
|
119
|
+
n == null || n.setCurrentRow(l), e.setActiveIndex((n == null ? void 0 : n.getRowIndex(l)) ?? -1), e.setSelectValue(c, h(c)), e.checkedClearSearchValue && m(e.searchValue) && (e.setSearchValue(""), e.reload(!0), f(() => {
|
|
119
120
|
const d = a(e.selectRef);
|
|
120
121
|
d && (d.isFocused = !0, d.states.inputValue = "");
|
|
121
122
|
})), f(() => {
|
|
@@ -126,7 +127,7 @@ function ne(r, e, b) {
|
|
|
126
127
|
* 表格滚动事件处理函数
|
|
127
128
|
*/
|
|
128
129
|
scroll: (t) => {
|
|
129
|
-
y.value = t,
|
|
130
|
+
y.value = t, V("scroll", t);
|
|
130
131
|
},
|
|
131
132
|
scrollBoundary: (t) => {
|
|
132
133
|
const { scrollTop: l } = t;
|
|
@@ -134,7 +135,7 @@ function ne(r, e, b) {
|
|
|
134
135
|
const { total: n, currentPage: i = 0 } = e.getPagination();
|
|
135
136
|
(n && a(e.options).length < n || a(e.hasNextPage)) && (e.setPagination({ currentPage: i + 1 }), f(async () => {
|
|
136
137
|
await e.reload();
|
|
137
|
-
})),
|
|
138
|
+
})), V("scroll-boundary", t);
|
|
138
139
|
},
|
|
139
140
|
/**
|
|
140
141
|
* 全选复选框改变事件处理函数
|
|
@@ -170,7 +171,7 @@ function ne(r, e, b) {
|
|
|
170
171
|
if (e.multiple)
|
|
171
172
|
t = l == null ? void 0 : l.getCurrentRecord();
|
|
172
173
|
else {
|
|
173
|
-
const i = l == null ? void 0 : l.getRowIndex(t);
|
|
174
|
+
const i = (l == null ? void 0 : l.getRowIndex(t)) ?? -1;
|
|
174
175
|
i !== -1 && t && (l == null || l.setCurrentRow(t), e.setActiveIndex(i));
|
|
175
176
|
}
|
|
176
177
|
}
|
|
@@ -201,16 +202,16 @@ function ne(r, e, b) {
|
|
|
201
202
|
return n;
|
|
202
203
|
}
|
|
203
204
|
function B(t, l, n) {
|
|
204
|
-
const i = Array.isArray(t) ? t : [], s = i.map((o) => o == null ? void 0 : o.value), c = D(l) ? l : [], u = s.length > c.length, d = u ? s.find((o) => !c.includes(o)) : c.find((o) => !s.includes(o)),
|
|
205
|
+
const i = Array.isArray(t) ? t : [], s = i.map((o) => o == null ? void 0 : o.value), c = D(l) ? l : [], u = s.length > c.length, d = u ? s.find((o) => !c.includes(o)) : c.find((o) => !s.includes(o)), b = u ? i.find((o) => (o == null ? void 0 : o.value) === d) : n.find((o) => (o == null ? void 0 : o.value) === d);
|
|
205
206
|
return {
|
|
206
207
|
isAdd: u,
|
|
207
208
|
actionValue: d,
|
|
208
|
-
actionRow:
|
|
209
|
+
actionRow: b,
|
|
209
210
|
newValues: s,
|
|
210
211
|
oldValues: c
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function R(t, l = !1, n = !1, i = !1) {
|
|
214
215
|
let s, c;
|
|
215
216
|
e.multiple ? (s = h(t || []), c = s ? t : []) : (s = w({ value: t }), c = s ? t : void 0), e.setSelectValue(c, s, i);
|
|
216
217
|
const u = L(s);
|
|
@@ -223,7 +224,7 @@ function ne(r, e, b) {
|
|
|
223
224
|
clear: () => {
|
|
224
225
|
var l;
|
|
225
226
|
const t = (l = a(e.tableRef)) == null ? void 0 : l.getGridInstance();
|
|
226
|
-
e.multiple ? (t && t.clearCheckboxRow(), e.setSelectValue([], void 0)) : (t && t.clearRadioRow(), e.setSelectValue(void 0, void 0)), e.setActiveIndex(-1),
|
|
227
|
+
e.multiple ? (t && t.clearCheckboxRow(), e.setSelectValue([], void 0)) : (t && t.clearRadioRow(), e.setSelectValue(void 0, void 0)), e.setActiveIndex(-1), V("clear");
|
|
227
228
|
},
|
|
228
229
|
/**
|
|
229
230
|
* 选择器可见性改变事件处理函数
|
|
@@ -234,9 +235,9 @@ function ne(r, e, b) {
|
|
|
234
235
|
const l = (i = a(e.tableRef)) == null ? void 0 : i.getGridInstance();
|
|
235
236
|
l && (e.multiple ? l == null || l.clearCheckboxRow() : l.clearRadioRow()), e.setShowPopup(t);
|
|
236
237
|
const n = a(e.isLoaded) || a(e.needLoad) || m(e.isExpandLoadData);
|
|
237
|
-
t ? (
|
|
238
|
-
n && e.reload(!0),
|
|
239
|
-
})) :
|
|
238
|
+
t ? (V("focus"), f(async () => {
|
|
239
|
+
n && e.reload(!0), R(a(r).modelValue, n), e.updateOptionsDisabled();
|
|
240
|
+
})) : V("blur"), V("visible-change", t);
|
|
240
241
|
},
|
|
241
242
|
/**
|
|
242
243
|
* 择器值改变事件处理函数(el 删除/清除会触发)
|
|
@@ -256,8 +257,8 @@ function ne(r, e, b) {
|
|
|
256
257
|
e.setSelectValue(c, o), v(o), f(() => e.updateOptionsDisabled());
|
|
257
258
|
return;
|
|
258
259
|
}
|
|
259
|
-
const
|
|
260
|
-
e.setSelectValue(s,
|
|
260
|
+
const b = h(s);
|
|
261
|
+
e.setSelectValue(s, b), v(b);
|
|
261
262
|
} else {
|
|
262
263
|
const n = t, i = (n == null ? void 0 : n.value) ?? void 0;
|
|
263
264
|
if (!await S(i, n, i === void 0 ? "remove" : "add")) {
|
|
@@ -281,7 +282,7 @@ function ne(r, e, b) {
|
|
|
281
282
|
g[t.key] && (t.preventDefault(), t.stopPropagation(), (l = g[t.key]) == null || l.call(g));
|
|
282
283
|
},
|
|
283
284
|
removeTag: (t) => {
|
|
284
|
-
|
|
285
|
+
V("remove-tag", t);
|
|
285
286
|
}
|
|
286
287
|
};
|
|
287
288
|
return O(
|
|
@@ -292,7 +293,7 @@ function ne(r, e, b) {
|
|
|
292
293
|
if (x(t, n))
|
|
293
294
|
return;
|
|
294
295
|
f(() => {
|
|
295
|
-
|
|
296
|
+
R(t, !1, !1, a(r).immediateEmitChange), e.updateOptionsDisabled();
|
|
296
297
|
});
|
|
297
298
|
}
|
|
298
299
|
},
|
|
@@ -301,7 +302,7 @@ function ne(r, e, b) {
|
|
|
301
302
|
() => m(e.options),
|
|
302
303
|
(t, l = []) => {
|
|
303
304
|
x(t, l) || f(() => {
|
|
304
|
-
|
|
305
|
+
R(a(r).modelValue, !1, !0), e.updateOptionsDisabled();
|
|
305
306
|
});
|
|
306
307
|
},
|
|
307
308
|
{ immediate: !m(e.getImmediate), deep: !0 }
|
|
@@ -309,7 +310,7 @@ function ne(r, e, b) {
|
|
|
309
310
|
() => a(r).configProps.defaultChecked,
|
|
310
311
|
(t, l) => {
|
|
311
312
|
if (F(m(t))) return;
|
|
312
|
-
x(m(t), m(l)) || C(a(r).modelValue) || (
|
|
313
|
+
x(m(t), m(l)) || C(a(r).modelValue) || (R(a(r).modelValue), f(() => {
|
|
313
314
|
e.updateOptionsDisabled();
|
|
314
315
|
}));
|
|
315
316
|
},
|
|
@@ -321,7 +322,7 @@ function ne(r, e, b) {
|
|
|
321
322
|
return;
|
|
322
323
|
const l = e.multiple ? a(e.options).map((n) => n.value) : (t = a(e.options)[0]) == null ? void 0 : t.value;
|
|
323
324
|
setTimeout(() => {
|
|
324
|
-
|
|
325
|
+
R(l, !1, !1, !0), e.updateOptionsDisabled();
|
|
325
326
|
});
|
|
326
327
|
}
|
|
327
328
|
}), G(() => {
|
|
@@ -331,7 +332,7 @@ function ne(r, e, b) {
|
|
|
331
332
|
return;
|
|
332
333
|
const l = (t = a(e.options)[0]) == null ? void 0 : t.value, n = e.multiple ? [l] : l;
|
|
333
334
|
setTimeout(() => {
|
|
334
|
-
|
|
335
|
+
R(n, !0, !1, !0), e.updateOptionsDisabled();
|
|
335
336
|
});
|
|
336
337
|
}
|
|
337
338
|
}), f(() => {
|
|
@@ -348,9 +349,9 @@ function ne(r, e, b) {
|
|
|
348
349
|
// 键盘事件处理对象
|
|
349
350
|
keyboardEvent: g,
|
|
350
351
|
// 默认选中数据
|
|
351
|
-
defaultDataSelect:
|
|
352
|
+
defaultDataSelect: R
|
|
352
353
|
};
|
|
353
354
|
}
|
|
354
355
|
export {
|
|
355
|
-
|
|
356
|
+
ae as useSelectTableEvent
|
|
356
357
|
};
|
|
@@ -114,7 +114,7 @@ export declare const selectTableProps: {
|
|
|
114
114
|
/** 数据源 */
|
|
115
115
|
list: {
|
|
116
116
|
type: PropType<Record<string, any>[]>;
|
|
117
|
-
default: () =>
|
|
117
|
+
default: () => Record<string, any>[];
|
|
118
118
|
};
|
|
119
119
|
/** 是否加载中 */
|
|
120
120
|
loading: {
|
|
@@ -144,7 +144,7 @@ export declare const selectTableProps: {
|
|
|
144
144
|
/** 选中的值 */
|
|
145
145
|
selectValue: {
|
|
146
146
|
type: PropType<TtSelectModelValueType>;
|
|
147
|
-
default: () =>
|
|
147
|
+
default: () => TtSelectModelValueType;
|
|
148
148
|
};
|
|
149
149
|
/** 下拉框的宽度 */
|
|
150
150
|
selectWidth: {
|
|
@@ -138,7 +138,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
138
138
|
};
|
|
139
139
|
columns: {
|
|
140
140
|
type: import('vue').PropType<import('.').TtTableProps["columns"]>;
|
|
141
|
-
default: () =>
|
|
141
|
+
default: () => import('.').TtTableProps["columns"];
|
|
142
142
|
};
|
|
143
143
|
height: {
|
|
144
144
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -221,7 +221,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
221
221
|
};
|
|
222
222
|
data: {
|
|
223
223
|
type: import('vue').PropType<import('.').TtTableProps["data"]>;
|
|
224
|
-
default: () =>
|
|
224
|
+
default: () => import('.').TtTableProps["data"];
|
|
225
225
|
};
|
|
226
226
|
isScrollFetch: {
|
|
227
227
|
type: BooleanConstructor;
|
|
@@ -825,7 +825,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
825
825
|
};
|
|
826
826
|
columns: {
|
|
827
827
|
type: import('vue').PropType<import('.').TtTableProps["columns"]>;
|
|
828
|
-
default: () =>
|
|
828
|
+
default: () => import('.').TtTableProps["columns"];
|
|
829
829
|
};
|
|
830
830
|
height: {
|
|
831
831
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -908,7 +908,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
908
908
|
};
|
|
909
909
|
data: {
|
|
910
910
|
type: import('vue').PropType<import('.').TtTableProps["data"]>;
|
|
911
|
-
default: () =>
|
|
911
|
+
default: () => import('.').TtTableProps["data"];
|
|
912
912
|
};
|
|
913
913
|
isScrollFetch: {
|
|
914
914
|
type: BooleanConstructor;
|
|
@@ -1243,7 +1243,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
1243
1243
|
};
|
|
1244
1244
|
columns: {
|
|
1245
1245
|
type: import('vue').PropType<import('.').TtTableProps["columns"]>;
|
|
1246
|
-
default: () =>
|
|
1246
|
+
default: () => import('.').TtTableProps["columns"];
|
|
1247
1247
|
};
|
|
1248
1248
|
height: {
|
|
1249
1249
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -1326,7 +1326,7 @@ export declare const TtTable: import('../../../../utils/src').SFCWithInstall<{
|
|
|
1326
1326
|
};
|
|
1327
1327
|
data: {
|
|
1328
1328
|
type: import('vue').PropType<import('.').TtTableProps["data"]>;
|
|
1329
|
-
default: () =>
|
|
1329
|
+
default: () => import('.').TtTableProps["data"];
|
|
1330
1330
|
};
|
|
1331
1331
|
isScrollFetch: {
|
|
1332
1332
|
type: BooleanConstructor;
|
|
@@ -3,6 +3,7 @@ import "element-plus";
|
|
|
3
3
|
import "dayjs";
|
|
4
4
|
import "vue";
|
|
5
5
|
import { withInstall as t } from "../../packages/utils/src/install.js";
|
|
6
|
+
import "numeral";
|
|
6
7
|
import "xe-utils";
|
|
7
8
|
import "dayjs/plugin/utc";
|
|
8
9
|
import "dayjs/plugin/timezone";
|
|
@@ -60,7 +61,6 @@ import "../tt-log/index.js";
|
|
|
60
61
|
/* empty css */
|
|
61
62
|
import "../tt-loading/index.js";
|
|
62
63
|
import "../../hooks/basicDataCodes.js";
|
|
63
|
-
import "numeral";
|
|
64
64
|
import "sortablejs";
|
|
65
65
|
/* empty css */
|
|
66
66
|
import "./src/emits.js";
|
|
@@ -312,7 +312,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
312
312
|
};
|
|
313
313
|
columns: {
|
|
314
314
|
type: import('vue').PropType<TtTableProps["columns"]>;
|
|
315
|
-
default: () =>
|
|
315
|
+
default: () => TtTableProps["columns"];
|
|
316
316
|
};
|
|
317
317
|
height: {
|
|
318
318
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -395,7 +395,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
395
395
|
};
|
|
396
396
|
data: {
|
|
397
397
|
type: import('vue').PropType<TtTableProps["data"]>;
|
|
398
|
-
default: () =>
|
|
398
|
+
default: () => TtTableProps["data"];
|
|
399
399
|
};
|
|
400
400
|
isScrollFetch: {
|
|
401
401
|
type: BooleanConstructor;
|
|
@@ -663,7 +663,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
663
663
|
};
|
|
664
664
|
columns: {
|
|
665
665
|
type: import('vue').PropType<TtTableProps["columns"]>;
|
|
666
|
-
default: () =>
|
|
666
|
+
default: () => TtTableProps["columns"];
|
|
667
667
|
};
|
|
668
668
|
height: {
|
|
669
669
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -746,7 +746,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
746
746
|
};
|
|
747
747
|
data: {
|
|
748
748
|
type: import('vue').PropType<TtTableProps["data"]>;
|
|
749
|
-
default: () =>
|
|
749
|
+
default: () => TtTableProps["data"];
|
|
750
750
|
};
|
|
751
751
|
isScrollFetch: {
|
|
752
752
|
type: BooleanConstructor;
|