qidian-vue-ui 2.0.31 → 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.css +10 -10
- package/dist/components/service-dialog-table-select/index.vue.d.ts +1 -0
- package/dist/components/service-dialog-table-select/index.vue.mjs +1 -1
- package/dist/components/service-dialog-table-select/index.vue2.mjs +15 -1
- package/dist/components/service-dialog-table-select/props.d.ts +1 -0
- package/dist/components/service-dialog-tabs-table-select/index.css +10 -10
- package/dist/components/service-dialog-tabs-table-select/index.vue.d.ts +1 -0
- package/dist/components/service-dialog-tabs-table-select/index.vue.mjs +1 -1
- package/dist/components/service-dialog-tabs-table-select/index.vue2.mjs +15 -1
- 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;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
.qd-dialog-table-select[data-v-
|
|
1
|
+
.qd-dialog-table-select[data-v-30e6f548] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
}
|
|
4
|
-
.qd-dialog-table-select__trigger[data-v-
|
|
4
|
+
.qd-dialog-table-select__trigger[data-v-30e6f548] {
|
|
5
5
|
width: 100%;
|
|
6
6
|
}
|
|
7
|
-
.qd-dialog-table-select__trigger[data-v-
|
|
7
|
+
.qd-dialog-table-select__trigger[data-v-30e6f548]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
}
|
|
10
|
-
.qd-dialog-table-select__input-trigger[data-v-
|
|
10
|
+
.qd-dialog-table-select__input-trigger[data-v-30e6f548] {
|
|
11
11
|
border-top-left-radius: 0;
|
|
12
12
|
border-bottom-left-radius: 0;
|
|
13
13
|
}
|
|
14
|
-
.qd-dialog-table-select__table[data-v-
|
|
15
|
-
.qd-dialog-table-select__table[data-v-
|
|
14
|
+
.qd-dialog-table-select__table[data-v-30e6f548] .qd-crud-search > .t-loading__parent > .t-card__body,
|
|
15
|
+
.qd-dialog-table-select__table[data-v-30e6f548] .qd-crud-table__body > .t-loading__parent > .t-card__body {
|
|
16
16
|
padding: 0 !important;
|
|
17
17
|
}
|
|
18
|
-
.qd-dialog-table-select__table[data-v-
|
|
18
|
+
.qd-dialog-table-select__table[data-v-30e6f548] .qd-crud-table__toolbar {
|
|
19
19
|
display: none;
|
|
20
20
|
}
|
|
21
|
-
.qd-dialog-table-select__table[data-v-
|
|
21
|
+
.qd-dialog-table-select__table[data-v-30e6f548] .qd-service-table {
|
|
22
22
|
margin-top: 0;
|
|
23
23
|
}
|
|
24
|
-
.qd-dialog-table-select__table-add[data-v-
|
|
24
|
+
.qd-dialog-table-select__table-add[data-v-30e6f548] {
|
|
25
25
|
margin-top: var(--td-comp-margin-m);
|
|
26
26
|
display: flex;
|
|
27
27
|
}
|
|
28
|
-
.qd-dialog-table-select__table-add .t-input__wrap[data-v-
|
|
28
|
+
.qd-dialog-table-select__table-add .t-input__wrap[data-v-30e6f548] {
|
|
29
29
|
flex: 1 1 0;
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
margin-right: var(--td-comp-margin-m);
|
|
@@ -27,6 +27,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
27
27
|
'dialog-footer'?: (props: {
|
|
28
28
|
cancel: (event: MouseEvent) => void;
|
|
29
29
|
confirm: () => Promise<boolean | void>;
|
|
30
|
+
confirmDisabled: boolean;
|
|
30
31
|
confirmLoading: boolean;
|
|
31
32
|
selectedOptions: import("@vue/reactivity").UnwrapRefSimple<D>[];
|
|
32
33
|
}) => any;
|
|
@@ -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 index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-30e6f548"]]);
|
|
6
6
|
export {
|
|
7
7
|
index as default
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './index.css'
|
|
2
|
-
import { defineComponent, mergeDefaults, useTemplateRef, ref,
|
|
2
|
+
import { defineComponent, mergeDefaults, useTemplateRef, ref, computed, reactive, createVNode, watch, createElementBlock, openBlock, Fragment, createElementVNode, mergeProps, renderSlot, createBlock, unref, withCtx, renderList, createTextVNode, toDisplayString, isRef, createSlots, normalizeProps, guardReactiveProps } from "vue";
|
|
3
3
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
4
4
|
import { isEmpty, identifyType, useDoubleClick, suspectedWrapperPromise, createExposeProxy, extractSlotsWithPrefix, hasOwn } from "qidian-shared";
|
|
5
5
|
import { AddIcon, SearchIcon } from "tdesign-icons-vue-next";
|
|
@@ -76,6 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
76
|
lazyForm: {
|
|
77
77
|
type: Boolean
|
|
78
78
|
},
|
|
79
|
+
editCellValidationBlock: {},
|
|
79
80
|
scroll: {},
|
|
80
81
|
tree: {},
|
|
81
82
|
loadingWithData: {
|
|
@@ -358,6 +359,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
358
359
|
const selectedRowKeys = ref([]);
|
|
359
360
|
const selectedRows = ref([]);
|
|
360
361
|
const latestSelectedRows = ref([]);
|
|
362
|
+
const confirmDisabled = computed(() => isEmpty(data.value));
|
|
361
363
|
let lastRowKey;
|
|
362
364
|
const addCustom = reactive({
|
|
363
365
|
visible: false,
|
|
@@ -440,6 +442,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
440
442
|
header: placeholder,
|
|
441
443
|
onCancel
|
|
442
444
|
}, wrapper);
|
|
445
|
+
if (confirmDisabled.value && dialogOptions.confirmBtn !== null) {
|
|
446
|
+
dialogOptions.confirmBtn = typeof dialogOptions.confirmBtn === "string" ? {
|
|
447
|
+
content: dialogOptions.confirmBtn,
|
|
448
|
+
disabled: true
|
|
449
|
+
} : typeof dialogOptions.confirmBtn === "object" ? {
|
|
450
|
+
...dialogOptions.confirmBtn,
|
|
451
|
+
disabled: true
|
|
452
|
+
} : {
|
|
453
|
+
disabled: true
|
|
454
|
+
};
|
|
455
|
+
}
|
|
443
456
|
const onBeforeOpen = dialogOptions.onBeforeOpen;
|
|
444
457
|
dialogOptions.onBeforeOpen = () => {
|
|
445
458
|
onBeforeOpen?.();
|
|
@@ -844,6 +857,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
844
857
|
fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
|
|
845
858
|
cancel: handleFooterCancel,
|
|
846
859
|
confirm: () => handleConfirm(),
|
|
860
|
+
confirmDisabled: confirmDisabled.value,
|
|
847
861
|
confirmLoading: confirmLoad.value,
|
|
848
862
|
selectedOptions: latestSelectedRows.value
|
|
849
863
|
}, void 0, true)]),
|
|
@@ -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;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
.qd-dialog-tabs-table-select[data-v-
|
|
1
|
+
.qd-dialog-tabs-table-select[data-v-158a6f3b] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
}
|
|
4
|
-
.qd-dialog-tabs-table-select__trigger[data-v-
|
|
4
|
+
.qd-dialog-tabs-table-select__trigger[data-v-158a6f3b] {
|
|
5
5
|
width: 100%;
|
|
6
6
|
}
|
|
7
|
-
.qd-dialog-tabs-table-select__trigger[data-v-
|
|
7
|
+
.qd-dialog-tabs-table-select__trigger[data-v-158a6f3b]:not(.qd-dialog-tabs-table-select__trigger--readonly):not(.qd-dialog-tabs-table-select__trigger--disabled) {
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
}
|
|
10
|
-
.qd-dialog-tabs-table-select__input-trigger[data-v-
|
|
10
|
+
.qd-dialog-tabs-table-select__input-trigger[data-v-158a6f3b] {
|
|
11
11
|
border-top-left-radius: 0;
|
|
12
12
|
border-bottom-left-radius: 0;
|
|
13
13
|
}
|
|
14
|
-
.qd-dialog-tabs-table-select__table[data-v-
|
|
14
|
+
.qd-dialog-tabs-table-select__table[data-v-158a6f3b] .qd-crud-search > .t-loading__parent > .t-card__body {
|
|
15
15
|
padding-left: 0 !important;
|
|
16
16
|
padding-right: 0 !important;
|
|
17
17
|
padding-bottom: 0 !important;
|
|
18
18
|
}
|
|
19
|
-
.qd-dialog-tabs-table-select__table[data-v-
|
|
19
|
+
.qd-dialog-tabs-table-select__table[data-v-158a6f3b] .qd-crud-table__body > .t-loading__parent > .t-card__body {
|
|
20
20
|
padding-left: 0 !important;
|
|
21
21
|
padding-right: 0 !important;
|
|
22
22
|
padding-bottom: 0 !important;
|
|
23
23
|
}
|
|
24
|
-
.qd-dialog-tabs-table-select__table[data-v-
|
|
24
|
+
.qd-dialog-tabs-table-select__table[data-v-158a6f3b] .qd-crud-table__toolbar {
|
|
25
25
|
display: none;
|
|
26
26
|
}
|
|
27
|
-
.qd-dialog-tabs-table-select__table[data-v-
|
|
27
|
+
.qd-dialog-tabs-table-select__table[data-v-158a6f3b] .qd-service-table {
|
|
28
28
|
margin-top: 0;
|
|
29
29
|
}
|
|
30
|
-
.qd-dialog-tabs-table-select__table-add[data-v-
|
|
30
|
+
.qd-dialog-tabs-table-select__table-add[data-v-158a6f3b] {
|
|
31
31
|
margin-top: var(--td-comp-margin-m);
|
|
32
32
|
display: flex;
|
|
33
33
|
}
|
|
34
|
-
.qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-
|
|
34
|
+
.qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-158a6f3b] {
|
|
35
35
|
flex: 1 1 0;
|
|
36
36
|
overflow: hidden;
|
|
37
37
|
margin-right: var(--td-comp-margin-m);
|
|
@@ -22,6 +22,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
22
22
|
'dialog-footer'?: (props: {
|
|
23
23
|
cancel: (event: MouseEvent) => void;
|
|
24
24
|
confirm: () => Promise<boolean | void>;
|
|
25
|
+
confirmDisabled: boolean;
|
|
25
26
|
confirmLoading: boolean;
|
|
26
27
|
selectedOptions: import("@vue/reactivity").UnwrapRefSimple<D>[];
|
|
27
28
|
activeTab: import("tdesign-vue-next").TabValue | undefined;
|
|
@@ -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 index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-158a6f3b"]]);
|
|
6
6
|
export {
|
|
7
7
|
index as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css'
|
|
2
2
|
import { defineComponent, mergeDefaults, ref, useTemplateRef, computed, reactive, h, watch, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, mergeProps, unref, renderSlot, createBlock, withCtx, renderList, createTextVNode, toDisplayString, isRef, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
3
3
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { isEmpty, useDoubleClick, identifyType, suspectedWrapperPromise, createExposeProxy, extractSlotsWithPrefix, hasOwn } from "qidian-shared";
|
|
5
5
|
import { AddIcon, SearchIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { Select, Option, InputAdornment, Input, Button, Space } from "tdesign-vue-next";
|
|
7
7
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
@@ -90,6 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
lazyForm: {
|
|
91
91
|
type: Boolean
|
|
92
92
|
},
|
|
93
|
+
editCellValidationBlock: {},
|
|
93
94
|
scroll: {},
|
|
94
95
|
tree: {},
|
|
95
96
|
loadingWithData: {
|
|
@@ -355,6 +356,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
355
356
|
const latestSelectedTab = ref(props.activeTab);
|
|
356
357
|
const dialogRef = useTemplateRef("dialog");
|
|
357
358
|
const tabsTableRef = useTemplateRef("tabsTable");
|
|
359
|
+
const confirmDisabled = computed(() => !props.tabs.length || isEmpty(tabsTableRef.value?.data));
|
|
358
360
|
const sel = useServiceDialogTableSelect(props, {
|
|
359
361
|
modelValue,
|
|
360
362
|
visible,
|
|
@@ -386,6 +388,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
386
388
|
const dialogOptions = {
|
|
387
389
|
...selectState.dialogOptions
|
|
388
390
|
};
|
|
391
|
+
if (confirmDisabled.value && dialogOptions.confirmBtn !== null) {
|
|
392
|
+
dialogOptions.confirmBtn = typeof dialogOptions.confirmBtn === "string" ? {
|
|
393
|
+
content: dialogOptions.confirmBtn,
|
|
394
|
+
disabled: true
|
|
395
|
+
} : typeof dialogOptions.confirmBtn === "object" ? {
|
|
396
|
+
...dialogOptions.confirmBtn,
|
|
397
|
+
disabled: true
|
|
398
|
+
} : {
|
|
399
|
+
disabled: true
|
|
400
|
+
};
|
|
401
|
+
}
|
|
389
402
|
const onBeforeOpen = dialogOptions.onBeforeOpen;
|
|
390
403
|
dialogOptions.onBeforeOpen = () => {
|
|
391
404
|
currentActiveTab.value = activeTab.value ?? props.tabs[0]?.value;
|
|
@@ -1022,6 +1035,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1022
1035
|
fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
|
|
1023
1036
|
cancel: handleFooterCancel,
|
|
1024
1037
|
confirm: () => handleConfirm(),
|
|
1038
|
+
confirmDisabled: confirmDisabled.value,
|
|
1025
1039
|
confirmLoading: unref(confirmLoad),
|
|
1026
1040
|
selectedOptions: unref(latestSelectedRows),
|
|
1027
1041
|
activeTab: currentActiveTab.value
|
|
@@ -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;
|