qidian-vue-ui 2.0.32 → 2.0.33
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/crud/table/index.vue2.mjs +1 -0
- package/dist/components/crud/table/props.d.ts +1 -0
- package/dist/components/crud/tabs-table/index.vue.d.ts +1 -0
- package/dist/components/crud/tabs-table/index.vue2.mjs +1 -0
- package/dist/components/crud/tabs-table/props.d.ts +1 -0
- package/dist/components/service/table/index.css +28 -28
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +18 -3
- package/dist/components/service/table/props.d.ts +1 -0
- package/dist/components/service/table/props.mjs +1 -0
- package/dist/components/service/table/types.d.ts +2 -0
- package/dist/components/service-dialog-table-select/index.vue2.mjs +1 -0
- package/dist/components/service-dialog-table-select/props.d.ts +1 -0
- package/dist/components/service-dialog-tabs-table-select/index.vue2.mjs +1 -0
- package/dist/components/service-dialog-tabs-table-select/props.d.ts +1 -0
- package/dist/components/service-popup-table-select/index.vue2.mjs +1 -0
- package/dist/components/service-popup-table-select/props.d.ts +1 -0
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export declare const qdCrudTableProps: {
|
|
|
23
23
|
readonly emptyText: undefined;
|
|
24
24
|
readonly emptyImage: true;
|
|
25
25
|
readonly lazyForm: true;
|
|
26
|
+
readonly editCellValidationBlock: "error";
|
|
26
27
|
readonly rowKey: "id";
|
|
27
28
|
readonly expandIcon: true;
|
|
28
29
|
readonly selectOnRowClick: undefined;
|
|
@@ -193,6 +193,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
193
193
|
headerBg?: boolean | undefined;
|
|
194
194
|
emptyImage?: string | boolean | ((h: typeof import("vue").h) => import("tdesign-vue-next").TNodeReturnValue) | import("tdesign-vue-next").TdImageProps | undefined;
|
|
195
195
|
lazyForm?: boolean | undefined;
|
|
196
|
+
editCellValidationBlock?: import("../../service/table/types").QdServiceTableEditCellValidationBlock | undefined;
|
|
196
197
|
loadingWithData?: boolean | undefined;
|
|
197
198
|
disableHorizontalScroll?: boolean | undefined;
|
|
198
199
|
cacheKey?: string | ((params?: unknown[] | undefined) => string) | undefined;
|
|
@@ -17,6 +17,7 @@ export declare const qdCrudTabsTableProps: {
|
|
|
17
17
|
readonly emptyText: undefined;
|
|
18
18
|
readonly emptyImage: true;
|
|
19
19
|
readonly lazyForm: true;
|
|
20
|
+
readonly editCellValidationBlock: "error";
|
|
20
21
|
readonly rowKey: "id";
|
|
21
22
|
readonly expandIcon: true;
|
|
22
23
|
readonly selectOnRowClick: undefined;
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-92206ee3] {
|
|
2
2
|
height: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
}
|
|
6
|
-
.qd-service-table[data-v-
|
|
6
|
+
.qd-service-table[data-v-92206ee3] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-92206ee3] {
|
|
10
10
|
font: var(--td-font-body-small);
|
|
11
11
|
}
|
|
12
|
-
.qd-service-table--mini[data-v-
|
|
13
|
-
.qd-service-table--mini[data-v-
|
|
12
|
+
.qd-service-table--mini[data-v-92206ee3] th,
|
|
13
|
+
.qd-service-table--mini[data-v-92206ee3] tr:not(.t-table__expanded-row) > td {
|
|
14
14
|
padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
|
|
15
15
|
line-height: var(--td-line-height-body-small);
|
|
16
16
|
}
|
|
17
|
-
.qd-service-table--mini[data-v-
|
|
17
|
+
.qd-service-table--mini[data-v-92206ee3] .t-table__row-full-element {
|
|
18
18
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-s);
|
|
19
19
|
}
|
|
20
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
20
|
+
.qd-service-table--hide-empty-image[data-v-92206ee3] .t-table__empty {
|
|
21
21
|
min-height: auto;
|
|
22
22
|
}
|
|
23
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
23
|
+
.qd-service-table--hide-empty-image[data-v-92206ee3] .t-table__empty .t-empty {
|
|
24
24
|
padding: 0 !important;
|
|
25
25
|
}
|
|
26
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
26
|
+
.qd-service-table--hide-empty-image[data-v-92206ee3] .t-table__empty .t-empty__image {
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
29
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
29
|
+
.qd-service-table--hide-empty-image[data-v-92206ee3] .t-table__empty .t-empty__title {
|
|
30
30
|
margin-top: 0;
|
|
31
31
|
}
|
|
32
|
-
.qd-service-table[data-v-
|
|
32
|
+
.qd-service-table[data-v-92206ee3] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
|
|
33
33
|
margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
34
34
|
}
|
|
35
|
-
.qd-service-table[data-v-
|
|
35
|
+
.qd-service-table[data-v-92206ee3] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
|
|
36
36
|
width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
37
37
|
}
|
|
38
|
-
.qd-service-table[data-v-
|
|
39
|
-
.qd-service-table[data-v-
|
|
40
|
-
transform: var(--
|
|
38
|
+
.qd-service-table[data-v-92206ee3] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
39
|
+
.qd-service-table[data-v-92206ee3] .t-affix > .t-table__scrollbar--obvious {
|
|
40
|
+
transform: var(--v48c62e9a);
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
42
|
+
.qd-service-table--horizontal-bar-static[data-v-92206ee3] .t-table__scrollbar--obvious {
|
|
43
43
|
visibility: hidden;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
}
|
|
46
|
-
.qd-service-table[data-v-
|
|
46
|
+
.qd-service-table[data-v-92206ee3] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
-
.qd-service-table[data-v-
|
|
49
|
+
.qd-service-table[data-v-92206ee3] .t-table__expanded-row > td {
|
|
50
50
|
height: 0;
|
|
51
51
|
}
|
|
52
|
-
.qd-service-table[data-v-
|
|
52
|
+
.qd-service-table[data-v-92206ee3] .t-table__affixed-header-elm-wrap {
|
|
53
53
|
height: auto !important;
|
|
54
54
|
}
|
|
55
|
-
.qd-service-table[data-v-
|
|
55
|
+
.qd-service-table[data-v-92206ee3] .t-table__affixed-header-elm {
|
|
56
56
|
position: relative;
|
|
57
57
|
scrollbar-width: none;
|
|
58
58
|
}
|
|
59
|
-
.qd-service-table[data-v-
|
|
59
|
+
.qd-service-table[data-v-92206ee3] .t-table__affixed-header-elm::-webkit-scrollbar {
|
|
60
60
|
display: none;
|
|
61
61
|
width: 0;
|
|
62
62
|
height: 0;
|
|
63
63
|
}
|
|
64
|
-
.qd-service-table[data-v-
|
|
64
|
+
.qd-service-table[data-v-92206ee3] .t-table__virtual-scroll-cursor + table {
|
|
65
65
|
border-collapse: separate;
|
|
66
66
|
}
|
|
67
|
-
.qd-service-table[data-v-
|
|
67
|
+
.qd-service-table[data-v-92206ee3] .t-table__expanded-row-inner {
|
|
68
68
|
display: block;
|
|
69
69
|
position: sticky;
|
|
70
70
|
left: 0;
|
|
71
|
-
width: var(--
|
|
71
|
+
width: var(--v442c3de2) !important;
|
|
72
72
|
}
|
|
73
|
-
.qd-service-table[data-v-
|
|
73
|
+
.qd-service-table[data-v-92206ee3] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
74
74
|
width: 100%;
|
|
75
75
|
}
|
|
76
|
-
.qd-service-table[data-v-
|
|
76
|
+
.qd-service-table[data-v-92206ee3] .qd-service-table__non-editable-col {
|
|
77
77
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
78
78
|
}
|
|
79
|
-
.qd-service-table[data-v-
|
|
79
|
+
.qd-service-table[data-v-92206ee3] .qd-service-table__non-editable-col:is(
|
|
80
80
|
.t-table__cell--fixed-left,
|
|
81
81
|
.t-table__cell--fixed-right
|
|
82
82
|
) {
|
|
83
83
|
background-color: inherit;
|
|
84
84
|
background-image: linear-gradient(color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent), color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent));
|
|
85
85
|
}
|
|
86
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
86
|
+
.qd-service-table--disable-horizontal-scroll[data-v-92206ee3] colgroup > col {
|
|
87
87
|
width: auto !important;
|
|
88
88
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-92206ee3"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -41,6 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
lazyForm: {
|
|
42
42
|
type: Boolean
|
|
43
43
|
},
|
|
44
|
+
editCellValidationBlock: {},
|
|
44
45
|
scroll: {},
|
|
45
46
|
tree: {},
|
|
46
47
|
loadingWithData: {
|
|
@@ -324,8 +325,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
325
|
emit: __emit
|
|
325
326
|
}) {
|
|
326
327
|
useCssVars((_ctx) => ({
|
|
327
|
-
"
|
|
328
|
-
"
|
|
328
|
+
"v48c62e9a": affixedHeaderTransform.value,
|
|
329
|
+
"v442c3de2": expandedRowWidth.value
|
|
329
330
|
}));
|
|
330
331
|
const props = __props;
|
|
331
332
|
const emit = __emit;
|
|
@@ -1065,6 +1066,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1065
1066
|
else nextErrors.delete(rowValue);
|
|
1066
1067
|
editingCellValidationErrors.value = nextErrors;
|
|
1067
1068
|
}
|
|
1069
|
+
function clearValidateData() {
|
|
1070
|
+
tableRef.value?.clearValidateData();
|
|
1071
|
+
editingCellValidationErrors.value = /* @__PURE__ */ new Map();
|
|
1072
|
+
}
|
|
1068
1073
|
function pruneCellValidationErrors(rows) {
|
|
1069
1074
|
const currentErrors = editingCellValidationErrors.value;
|
|
1070
1075
|
if (!currentErrors.size) return;
|
|
@@ -1151,6 +1156,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1151
1156
|
autofocusEditingCell.value = void 0;
|
|
1152
1157
|
}
|
|
1153
1158
|
let suppressEnterCellKey = null;
|
|
1159
|
+
function shouldBlockEditingCellExit(results) {
|
|
1160
|
+
const block = props.editCellValidationBlock;
|
|
1161
|
+
if (block === "none") return false;
|
|
1162
|
+
return results?.some((item) => {
|
|
1163
|
+
if (item.result !== false) return false;
|
|
1164
|
+
const type = item.type === "warning" ? "warning" : "error";
|
|
1165
|
+
return block === "all" || block === type;
|
|
1166
|
+
}) ?? false;
|
|
1167
|
+
}
|
|
1154
1168
|
async function exitEditingCell(target) {
|
|
1155
1169
|
const cellKey = getCellKey(target.row, target.colKey);
|
|
1156
1170
|
const version = (editingCellValidationVersions.get(cellKey) ?? 0) + 1;
|
|
@@ -1160,7 +1174,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1160
1174
|
} = await tableRef.value?.validateTableData() ?? {};
|
|
1161
1175
|
if (version !== editingCellValidationVersions.get(cellKey)) return;
|
|
1162
1176
|
if (!isEditingCell(target.row, target.colKey)) return;
|
|
1163
|
-
if (result[cellKey]
|
|
1177
|
+
if (shouldBlockEditingCellExit(result[cellKey])) return;
|
|
1164
1178
|
editingCellValidationVersions.delete(cellKey);
|
|
1165
1179
|
removeEditingCell(target);
|
|
1166
1180
|
suppressEnterCellKey = cellKey;
|
|
@@ -2065,6 +2079,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2065
2079
|
setPollingInterval,
|
|
2066
2080
|
validateTableData,
|
|
2067
2081
|
validateRowData,
|
|
2082
|
+
clearValidateData,
|
|
2068
2083
|
submitTableData,
|
|
2069
2084
|
submitRowData,
|
|
2070
2085
|
getData: (key) => {
|
|
@@ -12,6 +12,7 @@ export declare const qdServiceTableProps: {
|
|
|
12
12
|
readonly emptyText: undefined;
|
|
13
13
|
readonly emptyImage: true;
|
|
14
14
|
readonly lazyForm: true;
|
|
15
|
+
readonly editCellValidationBlock: "error";
|
|
15
16
|
readonly rowKey: "id";
|
|
16
17
|
readonly expandIcon: true;
|
|
17
18
|
readonly selectOnRowClick: undefined;
|
|
@@ -15,6 +15,7 @@ export type QdServiceTableFormItem = Omit<QdFormItemProps, 'name' | 'label' | 'c
|
|
|
15
15
|
lazy?: boolean;
|
|
16
16
|
virtualValidateRender?: boolean;
|
|
17
17
|
};
|
|
18
|
+
export type QdServiceTableEditCellValidationBlock = 'none' | 'error' | 'warning' | 'all';
|
|
18
19
|
export type QdServiceTableDeleteCheckResult = void | boolean | {
|
|
19
20
|
success: boolean;
|
|
20
21
|
message?: string;
|
|
@@ -61,6 +62,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
|
|
|
61
62
|
emptyText?: string;
|
|
62
63
|
emptyImage?: boolean | TdEmptyProps['image'];
|
|
63
64
|
lazyForm?: boolean;
|
|
65
|
+
editCellValidationBlock?: QdServiceTableEditCellValidationBlock;
|
|
64
66
|
scroll?: QdServiceTableScroll;
|
|
65
67
|
tree?: TdEnhancedTableProps<D>['tree'] & {
|
|
66
68
|
lazyLoad?: boolean;
|
|
@@ -41,6 +41,7 @@ export declare const qdServiceDialogTableSelectProps: {
|
|
|
41
41
|
readonly emptyText: undefined;
|
|
42
42
|
readonly emptyImage: true;
|
|
43
43
|
readonly lazyForm: true;
|
|
44
|
+
readonly editCellValidationBlock: "error";
|
|
44
45
|
readonly expandIcon: true;
|
|
45
46
|
readonly selectOnRowClick: undefined;
|
|
46
47
|
readonly bordered: undefined;
|
|
@@ -16,6 +16,7 @@ export declare const qdServiceDialogTabsTableSelectProps: {
|
|
|
16
16
|
readonly emptyText: undefined;
|
|
17
17
|
readonly emptyImage: true;
|
|
18
18
|
readonly lazyForm: true;
|
|
19
|
+
readonly editCellValidationBlock: "error";
|
|
19
20
|
readonly expandIcon: true;
|
|
20
21
|
readonly selectOnRowClick: undefined;
|
|
21
22
|
readonly bordered: undefined;
|
|
@@ -15,6 +15,7 @@ export declare const qdServicePopupTableSelectProps: {
|
|
|
15
15
|
readonly emptyText: undefined;
|
|
16
16
|
readonly emptyImage: true;
|
|
17
17
|
readonly lazyForm: true;
|
|
18
|
+
readonly editCellValidationBlock: "error";
|
|
18
19
|
readonly expandIcon: true;
|
|
19
20
|
readonly selectOnRowClick: undefined;
|
|
20
21
|
readonly bordered: undefined;
|