qidian-vue-ui 2.0.56 → 2.0.58
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/auto-tooltip/index.vue2.mjs +1 -1
- package/dist/components/crud/table/index.vue2.mjs +7 -4
- 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/dialog/index.vue.mjs +2 -2
- package/dist/components/drawer/index.vue.mjs +2 -2
- package/dist/components/file-viewer/index.vue2.mjs +1 -1
- package/dist/components/icon/index.vue.mjs +1 -1
- package/dist/components/multi-file-viewer/index.vue.mjs +1 -1
- package/dist/components/office/pdf/index.vue2.mjs +1 -1
- package/dist/components/office/pdf/utils/image2pdf.mjs +1 -1
- package/dist/components/service/table/edit-cell.mjs +1 -1
- package/dist/components/service/table/index.css +62 -52
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +147 -12
- 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 +3 -0
- package/dist/components/service-dialog-table-select/props.d.ts +1 -0
- package/dist/components/service-dialog-tabs-table-select/index.vue2.mjs +3 -0
- package/dist/components/service-dialog-tabs-table-select/props.d.ts +1 -0
- package/dist/components/service-popup-table-select/index.vue2.mjs +3 -0
- package/dist/components/service-popup-table-select/props.d.ts +1 -0
- package/dist/components/tinymce/index.vue2.mjs +1 -1
- package/dist/components/tinymce/preview.vue2.mjs +1 -1
- package/dist/components/upload/file-flow-file-list-display/index.vue2.mjs +1 -1
- package/dist/components/upload/image-file-list-display/index.vue.mjs +1 -1
- package/dist/components/upload/image-flow-file-list-display/index.vue.mjs +1 -1
- package/dist/directive/hasPermi.mjs +1 -1
- package/dist/directive/hasRole.mjs +1 -1
- package/dist/hooks/useAgentChat/index.mjs +1 -1
- package/dist/hooks/useDict/index.mjs +1 -1
- package/dist/hooks/useModal.mjs +2 -2
- package/dist/hooks/useUserAvatar/index.mjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/utils/{auth/index.mjs → auth.mjs} +1 -1
- package/dist/utils/{date/index.mjs → date.mjs} +3 -3
- package/package.json +1 -1
- /package/dist/utils/{auth/index.d.ts → auth.d.ts} +0 -0
- /package/dist/utils/{date/index.d.ts → date.d.ts} +0 -0
- /package/dist/utils/{overlayStack/index.d.ts → overlayStack.d.ts} +0 -0
- /package/dist/utils/{overlayStack/index.mjs → overlayStack.mjs} +0 -0
- /package/dist/utils/{tools/index.d.ts → tools.d.ts} +0 -0
- /package/dist/utils/{tools/index.mjs → tools.mjs} +0 -0
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import { defineComponent, useCssVars, useTemplateRef, ref, computed, watch, nextTick, createElementBlock, openBlock, createVNode, renderSlot, unref, withCtx, withDirectives, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
3
3
|
import { resizeDirective } from "qidian-shared";
|
|
4
4
|
import { Tooltip } from "tdesign-vue-next";
|
|
5
|
-
import { reAttach } from "../../utils/tools
|
|
5
|
+
import { reAttach } from "../../utils/tools.mjs";
|
|
6
6
|
const _hoisted_1 = { class: "qd-auto-tooltip" };
|
|
7
7
|
const _hoisted_2 = {
|
|
8
8
|
key: 0,
|
|
@@ -19,7 +19,7 @@ import _sfc_main$2 from "../../dialog/form.vue.mjs";
|
|
|
19
19
|
import QdColumnsController from "../../columns-controller/index.vue.mjs";
|
|
20
20
|
import get from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs";
|
|
21
21
|
import QdServiceTable from "../../service/table/index.vue.mjs";
|
|
22
|
-
import { hasPermiOr } from "../../../utils/auth
|
|
22
|
+
import { hasPermiOr } from "../../../utils/auth.mjs";
|
|
23
23
|
const _hoisted_1 = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "qd-crud-table__toolbar-separator"
|
|
@@ -78,6 +78,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
78
|
rowKey: {},
|
|
79
79
|
size: {},
|
|
80
80
|
selectType: {},
|
|
81
|
+
cellSelectable: {
|
|
82
|
+
type: Boolean
|
|
83
|
+
},
|
|
81
84
|
reserveSelectedRowOnFilter: {
|
|
82
85
|
type: Boolean
|
|
83
86
|
},
|
|
@@ -1085,14 +1088,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1085
1088
|
const {
|
|
1086
1089
|
colIndex,
|
|
1087
1090
|
rowIndex,
|
|
1088
|
-
index
|
|
1091
|
+
index,
|
|
1089
1092
|
mapKey
|
|
1090
1093
|
} = cellIndex;
|
|
1091
1094
|
if (isEmpty(colIndex) && isEmpty(rowIndex)) {
|
|
1092
|
-
ifRenderMap[`${mapKey || "action"}.${index
|
|
1095
|
+
ifRenderMap[`${mapKey || "action"}.${index}`] = ifRender;
|
|
1093
1096
|
return;
|
|
1094
1097
|
}
|
|
1095
|
-
ifRenderMap[`${colIndex}.${rowIndex}.${index
|
|
1098
|
+
ifRenderMap[`${colIndex}.${rowIndex}.${index}`] = ifRender;
|
|
1096
1099
|
}
|
|
1097
1100
|
function getActionSeparator(action, cellIndex) {
|
|
1098
1101
|
const {
|
|
@@ -25,6 +25,7 @@ export declare const qdCrudTableProps: {
|
|
|
25
25
|
readonly readonly: undefined;
|
|
26
26
|
readonly lazyForm: true;
|
|
27
27
|
readonly editCellValidationBlock: "error";
|
|
28
|
+
readonly cellSelectable: undefined;
|
|
28
29
|
readonly rowKey: "id";
|
|
29
30
|
readonly expandIcon: true;
|
|
30
31
|
readonly selectOnRowClick: undefined;
|
|
@@ -191,6 +191,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
191
191
|
onAfter?: (() => void) | undefined;
|
|
192
192
|
onSuccess?: ((data: import("qidian-shared").ServicePageDataType<D>) => void) | undefined;
|
|
193
193
|
manual?: boolean | undefined;
|
|
194
|
+
cellSelectable?: boolean | undefined;
|
|
194
195
|
selectType?: "single" | "multiple" | undefined;
|
|
195
196
|
reserveSelectedRowOnFilter?: boolean | undefined;
|
|
196
197
|
headerBg?: boolean | undefined;
|
|
@@ -19,6 +19,7 @@ export declare const qdCrudTabsTableProps: {
|
|
|
19
19
|
readonly readonly: undefined;
|
|
20
20
|
readonly lazyForm: true;
|
|
21
21
|
readonly editCellValidationBlock: "error";
|
|
22
|
+
readonly cellSelectable: undefined;
|
|
22
23
|
readonly rowKey: "id";
|
|
23
24
|
readonly expandIcon: true;
|
|
24
25
|
readonly selectOnRowClick: undefined;
|
|
@@ -4,8 +4,8 @@ import { useDraggable, useVModels } from "../../node_modules/.pnpm/@vueuse_core@
|
|
|
4
4
|
import { useActivated, domOn, suspectedWrapperPromise, isEmpty, filterSlots } from "qidian-shared";
|
|
5
5
|
import { FullscreenExitIcon, FullscreenIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { Dialog, Divider, Button } from "tdesign-vue-next";
|
|
7
|
-
import { OVERLAY_TRANSPARENT_CLASS, OVERLAY_CLOSING_CLASS, updateOverlayMasks, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack
|
|
8
|
-
import { reAttach, resolveAttachParent, getTransformOffset } from "../../utils/tools
|
|
7
|
+
import { OVERLAY_TRANSPARENT_CLASS, OVERLAY_CLOSING_CLASS, updateOverlayMasks, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack.mjs";
|
|
8
|
+
import { reAttach, resolveAttachParent, getTransformOffset } from "../../utils/tools.mjs";
|
|
9
9
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
10
10
|
import { qdDialogProps } from "./props.mjs";
|
|
11
11
|
import debounce from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.mjs";
|
|
@@ -3,8 +3,8 @@ import { defineComponent, mergeDefaults, getCurrentInstance, ref, computed, watc
|
|
|
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 { useActivated, suspectedWrapperPromise } from "qidian-shared";
|
|
5
5
|
import { Drawer } from "tdesign-vue-next";
|
|
6
|
-
import { OVERLAY_CLOSING_CLASS, OVERLAY_TRANSPARENT_CLASS, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, updateOverlayMasks, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack
|
|
7
|
-
import { reAttach, resolveAttachParent } from "../../utils/tools
|
|
6
|
+
import { OVERLAY_CLOSING_CLASS, OVERLAY_TRANSPARENT_CLASS, markPreviousOverlaysTransparent, registerOverlayEsc, setOverlayActive, updateOverlayMasks, unregisterOverlayEsc, setOverlayEscEnabled, focusTopOverlay } from "../../utils/overlayStack.mjs";
|
|
7
|
+
import { reAttach, resolveAttachParent } from "../../utils/tools.mjs";
|
|
8
8
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
9
9
|
import { qdDrawerProps } from "./props.mjs";
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -3,7 +3,7 @@ import { defineComponent, ref, computed, watch, nextTick, createElementBlock, op
|
|
|
3
3
|
import { allRenderers } from "@file-viewer/preset-all";
|
|
4
4
|
import { FileViewer } from "@file-viewer/vue3";
|
|
5
5
|
import { ImageViewer } from "tdesign-vue-next";
|
|
6
|
-
import { isImage, reAttach } from "../../utils/tools
|
|
6
|
+
import { isImage, reAttach } from "../../utils/tools.mjs";
|
|
7
7
|
import { useTheme } from "../../hooks/useTheme.mjs";
|
|
8
8
|
import QdOfficePdf from "../office/pdf/index.vue.mjs";
|
|
9
9
|
import merge from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, defineAsyncComponent, createBlock, openBlock, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { formatGlob } from "qidian-shared";
|
|
3
|
-
import { useUICsl } from "../../utils/tools
|
|
3
|
+
import { useUICsl } from "../../utils/tools.mjs";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
...{
|
|
6
6
|
name: "QdIcon"
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import { defineComponent, mergeDefaults, ref, computed, watch, onUnmounted, createBlock, openBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, Fragment, createVNode, createElementVNode, unref, renderList, createTextVNode, toDisplayString, createCommentVNode, nextTick } from "vue";
|
|
3
3
|
import { useActivated } from "qidian-shared";
|
|
4
4
|
import { Menu, MenuItem, Empty, ImageViewer } from "tdesign-vue-next";
|
|
5
|
-
import { isImage, reAttach } from "../../utils/tools
|
|
5
|
+
import { isImage, reAttach } from "../../utils/tools.mjs";
|
|
6
6
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
7
7
|
import _sfc_main$1 from "../dialog/index.vue.mjs";
|
|
8
8
|
/* empty css */
|
|
@@ -4,7 +4,7 @@ import { defineComponent, inject, computed, ref, shallowRef, onMounted, watch, o
|
|
|
4
4
|
import { resizeDirective, toPrecision, to, isDev } from "qidian-shared";
|
|
5
5
|
import { ChevronLeftIcon, ChevronRightIcon, ZoomOutIcon, ZoomInIcon, CenterFocusStrongFilledIcon, CenterFocusStrongIcon, RollbackIcon, RollfrontIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { Loading, Tooltip, Button, InputNumber, Divider } from "tdesign-vue-next";
|
|
7
|
-
import { useUICsl, getPublicUrl } from "../../../utils/tools
|
|
7
|
+
import { useUICsl, getPublicUrl } from "../../../utils/tools.mjs";
|
|
8
8
|
import { PROVIDE_OFFICE } from "../../config-provider/config.mjs";
|
|
9
9
|
import { useConfig } from "../../config-provider/useConfig.mjs";
|
|
10
10
|
import { ADAPTIVE_VIEW, ZOOM_SCALE_LIMIT } from "./config.mjs";
|
|
@@ -41,7 +41,7 @@ function createRowEditContext(sourceRow, getEditedRow, colKey, updateEditedCellV
|
|
|
41
41
|
const proxy = new Proxy(target, {
|
|
42
42
|
get(currentTarget, key, receiver) {
|
|
43
43
|
const value = Reflect.get(currentTarget, key, receiver);
|
|
44
|
-
if (typeof key !== "string" || !isProxyable(value)) return value;
|
|
44
|
+
if (typeof key !== "string" || key.startsWith("__v") || !isProxyable(value)) return value;
|
|
45
45
|
return wrap(value, parentPath ? `${parentPath}.${key}` : key);
|
|
46
46
|
},
|
|
47
47
|
set(currentTarget, key, value, receiver) {
|
|
@@ -1,167 +1,177 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-203216f5] {
|
|
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-203216f5] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-203216f5] {
|
|
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-203216f5] th,
|
|
13
|
+
.qd-service-table--mini[data-v-203216f5] 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-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
39
|
+
.qd-service-table[data-v-203216f5] .t-affix > .t-table__scrollbar--obvious {
|
|
40
|
+
transform: var(--d1ae4892);
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
42
|
+
.qd-service-table--horizontal-bar-static[data-v-203216f5] .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-203216f5] .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-203216f5] .t-table__expanded-row > td {
|
|
50
50
|
height: 0;
|
|
51
51
|
}
|
|
52
|
-
.qd-service-table[data-v-
|
|
52
|
+
.qd-service-table[data-v-203216f5] .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-203216f5] .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-203216f5] .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-203216f5] .t-table__virtual-scroll-cursor + table {
|
|
65
65
|
border-collapse: separate;
|
|
66
66
|
}
|
|
67
|
-
.qd-service-table[data-v-
|
|
68
|
-
.qd-service-table[data-v-
|
|
67
|
+
.qd-service-table[data-v-203216f5] .t-table__expanded-row-inner,
|
|
68
|
+
.qd-service-table[data-v-203216f5] .t-table__row-filter-inner {
|
|
69
69
|
display: block;
|
|
70
70
|
position: sticky;
|
|
71
71
|
left: 0;
|
|
72
|
-
width: var(--
|
|
72
|
+
width: var(--v22a7e7ec) !important;
|
|
73
73
|
}
|
|
74
|
-
.qd-service-table[data-v-
|
|
74
|
+
.qd-service-table[data-v-203216f5] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
75
75
|
width: 100%;
|
|
76
76
|
}
|
|
77
|
-
.qd-service-table[data-v-
|
|
77
|
+
.qd-service-table[data-v-203216f5] .qd-service-table__non-editable-col {
|
|
78
78
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
79
79
|
}
|
|
80
|
-
.qd-service-table[data-v-
|
|
80
|
+
.qd-service-table[data-v-203216f5] .qd-service-table__selected-cell {
|
|
81
|
+
box-shadow: inset 0 0 0 1px var(--td-brand-color);
|
|
82
|
+
}
|
|
83
|
+
.qd-service-table[data-v-203216f5] tbody > tr.t-table__row--active {
|
|
84
|
+
background-color: var(--td-brand-color-light);
|
|
85
|
+
}
|
|
86
|
+
.qd-service-table[data-v-203216f5] tbody > tr.t-table__row--active.t-table__row--hover,
|
|
87
|
+
.qd-service-table[data-v-203216f5] tbody > tr.t-table__row--active:hover {
|
|
88
|
+
background-color: var(--td-brand-color-light-hover);
|
|
89
|
+
}
|
|
90
|
+
.qd-service-table[data-v-203216f5] .qd-service-table__non-editable-col:is(
|
|
81
91
|
.t-table__cell--fixed-left,
|
|
82
92
|
.t-table__cell--fixed-right
|
|
83
93
|
) {
|
|
84
94
|
background-color: inherit;
|
|
85
95
|
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));
|
|
86
96
|
}
|
|
87
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
97
|
+
.qd-service-table--disable-horizontal-scroll[data-v-203216f5] colgroup > col {
|
|
88
98
|
width: auto !important;
|
|
89
99
|
}
|
|
90
|
-
.qd-service-table[data-v-
|
|
100
|
+
.qd-service-table[data-v-203216f5] .t-table__filter-pop-content-inner {
|
|
91
101
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
92
102
|
}
|
|
93
|
-
.qd-service-table[data-v-
|
|
103
|
+
.qd-service-table[data-v-203216f5] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
94
104
|
padding: 0;
|
|
95
105
|
}
|
|
96
|
-
.qd-service-table[data-v-
|
|
106
|
+
.qd-service-table[data-v-203216f5] .t-table__filter-pop-content-inner:has(
|
|
97
107
|
.qd-service-table-filter-input,
|
|
98
108
|
.qd-service-table-filter-custom
|
|
99
109
|
) {
|
|
100
110
|
padding-bottom: var(--td-comp-paddingTB-s);
|
|
101
111
|
}
|
|
102
|
-
.qd-service-table[data-v-
|
|
112
|
+
.qd-service-table[data-v-203216f5] .t-table__filter--bottom-buttons {
|
|
103
113
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
104
114
|
}
|
|
105
|
-
.qd-service-table--mini[data-v-
|
|
115
|
+
.qd-service-table--mini[data-v-203216f5] .t-table__filter-pop-content-inner {
|
|
106
116
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
107
117
|
}
|
|
108
|
-
.qd-service-table--mini[data-v-
|
|
118
|
+
.qd-service-table--mini[data-v-203216f5] .t-table__filter--bottom-buttons {
|
|
109
119
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
|
110
120
|
}
|
|
111
|
-
.qd-service-table--mini[data-v-
|
|
121
|
+
.qd-service-table--mini[data-v-203216f5] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
112
122
|
padding: 0;
|
|
113
123
|
}
|
|
114
|
-
.qd-service-table--mini[data-v-
|
|
124
|
+
.qd-service-table--mini[data-v-203216f5] .t-table__filter-pop-content-inner:has(
|
|
115
125
|
.qd-service-table-filter-input,
|
|
116
126
|
.qd-service-table-filter-custom
|
|
117
127
|
) {
|
|
118
128
|
padding-bottom: var(--td-comp-paddingTB-xs);
|
|
119
129
|
}
|
|
120
|
-
.qd-service-table[data-v-
|
|
130
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item {
|
|
121
131
|
width: 266px;
|
|
122
132
|
}
|
|
123
|
-
.qd-service-table[data-v-
|
|
124
|
-
.qd-service-table[data-v-
|
|
125
|
-
.qd-service-table[data-v-
|
|
133
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__search,
|
|
134
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__all,
|
|
135
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__options {
|
|
126
136
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
127
137
|
}
|
|
128
|
-
.qd-service-table[data-v-
|
|
138
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__all {
|
|
129
139
|
display: flex;
|
|
130
140
|
align-items: center;
|
|
131
141
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
132
142
|
border-bottom: 1px solid var(--td-component-stroke);
|
|
133
143
|
}
|
|
134
|
-
.qd-service-table[data-v-
|
|
144
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__options {
|
|
135
145
|
display: flex;
|
|
136
146
|
flex-direction: column;
|
|
137
147
|
height: 206px;
|
|
138
148
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
139
149
|
overflow-y: auto;
|
|
140
150
|
}
|
|
141
|
-
.qd-service-table[data-v-
|
|
151
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__count {
|
|
142
152
|
margin-left: var(--td-comp-margin-xs);
|
|
143
153
|
color: var(--td-text-color-placeholder);
|
|
144
154
|
}
|
|
145
|
-
.qd-service-table[data-v-
|
|
155
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item__cell {
|
|
146
156
|
pointer-events: none;
|
|
147
157
|
}
|
|
148
|
-
.qd-service-table[data-v-
|
|
149
|
-
.qd-service-table[data-v-
|
|
158
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item .t-checkbox,
|
|
159
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item .t-radio {
|
|
150
160
|
display: flex;
|
|
151
161
|
align-items: center;
|
|
152
162
|
}
|
|
153
|
-
.qd-service-table[data-v-
|
|
154
|
-
.qd-service-table[data-v-
|
|
163
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item .t-checkbox__label,
|
|
164
|
+
.qd-service-table[data-v-203216f5] .qd-service-table-filter-item .t-radio__label {
|
|
155
165
|
display: inline-flex;
|
|
156
166
|
flex: 1 1 0;
|
|
157
167
|
align-items: center;
|
|
158
168
|
min-width: 0;
|
|
159
169
|
overflow: hidden;
|
|
160
170
|
}
|
|
161
|
-
.qd-service-table--mini[data-v-
|
|
171
|
+
.qd-service-table--mini[data-v-203216f5] .qd-service-table-filter-item__search {
|
|
162
172
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
163
173
|
}
|
|
164
|
-
.qd-service-table--mini[data-v-
|
|
165
|
-
.qd-service-table--mini[data-v-
|
|
174
|
+
.qd-service-table--mini[data-v-203216f5] .qd-service-table-filter-item__all,
|
|
175
|
+
.qd-service-table--mini[data-v-203216f5] .qd-service-table-filter-item__options {
|
|
166
176
|
padding: 0 var(--td-comp-paddingLR-xs);
|
|
167
177
|
}
|
|
@@ -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-203216f5"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -6,7 +6,7 @@ import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon } from "tdesign-icons
|
|
|
6
6
|
import { EnhancedTable, Table, Empty } from "tdesign-vue-next";
|
|
7
7
|
import { validate } from "tdesign-vue-next/es/form/utils/form-model.mjs";
|
|
8
8
|
import { useModal } from "../../../hooks/useModal.mjs";
|
|
9
|
-
import { getTransformOffset } from "../../../utils/tools
|
|
9
|
+
import { getTransformOffset } from "../../../utils/tools.mjs";
|
|
10
10
|
import { useConfig } from "../../config-provider/useConfig.mjs";
|
|
11
11
|
import { getQdFormComponentName, resolveQdFormItemOptions } from "../../form/utils.mjs";
|
|
12
12
|
import QdServiceTableEditCell from "./edit-cell.mjs";
|
|
@@ -35,6 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
rowKey: {},
|
|
36
36
|
size: {},
|
|
37
37
|
selectType: {},
|
|
38
|
+
cellSelectable: {
|
|
39
|
+
type: Boolean
|
|
40
|
+
},
|
|
38
41
|
reserveSelectedRowOnFilter: {
|
|
39
42
|
type: Boolean
|
|
40
43
|
},
|
|
@@ -339,8 +342,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
339
342
|
emit: __emit
|
|
340
343
|
}) {
|
|
341
344
|
useCssVars((_ctx) => ({
|
|
342
|
-
"
|
|
343
|
-
"
|
|
345
|
+
"d1ae4892": affixedHeaderTransform.value,
|
|
346
|
+
"v22a7e7ec": expandedRowWidth.value
|
|
344
347
|
}));
|
|
345
348
|
const props = __props;
|
|
346
349
|
const emit = __emit;
|
|
@@ -398,6 +401,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
398
401
|
const editingCells = shallowRef([]);
|
|
399
402
|
const activeEditingCell = shallowRef();
|
|
400
403
|
const autofocusEditingCell = shallowRef();
|
|
404
|
+
const selectedCell = shallowRef();
|
|
405
|
+
const selectedCells = shallowRef([]);
|
|
406
|
+
const selectedCellAnchor = shallowRef();
|
|
407
|
+
const handledSelectionEvents = /* @__PURE__ */ new WeakSet();
|
|
408
|
+
const selectionExcludedColKeys = /* @__PURE__ */ new Set(["expand", "drag"]);
|
|
401
409
|
const editingCellValidationErrors = shallowRef(/* @__PURE__ */ new Map());
|
|
402
410
|
const expandedRowProxyMap = /* @__PURE__ */ new WeakMap();
|
|
403
411
|
let dataChangePending = false;
|
|
@@ -406,6 +414,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
406
414
|
} = useActivated();
|
|
407
415
|
const formItemColumns = computed(() => flattenFormItemColumns(props.columns || []));
|
|
408
416
|
const editableColumns = computed(() => flattenEditableColumns(props.columns || []));
|
|
417
|
+
const reCellSelectable = computed(() => props.cellSelectable ?? (formItemColumns.value.length > 0 || editableColumns.value.length > 0));
|
|
409
418
|
const parentAddBeforeSubmitQueue = inject(PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE, void 0);
|
|
410
419
|
const beforeSubmitQueueMap = /* @__PURE__ */ new Map();
|
|
411
420
|
const editingCellValidationVersions = /* @__PURE__ */ new Map();
|
|
@@ -793,7 +802,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
793
802
|
};
|
|
794
803
|
}
|
|
795
804
|
}
|
|
796
|
-
const reSelectOnRowClick =
|
|
805
|
+
const reSelectOnRowClick = false;
|
|
797
806
|
const reOnScroll = (params) => {
|
|
798
807
|
onScroll?.(params);
|
|
799
808
|
const target = params.e.target;
|
|
@@ -891,6 +900,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
891
900
|
tableOptions: {
|
|
892
901
|
...reTableOptions,
|
|
893
902
|
filterRow: showFilterResult ? reTableOptions.filterRow : null,
|
|
903
|
+
// 行高亮随单元格选中统一驱动(syncSelectedRowKeysFromCells 同步 activeRowKeys),
|
|
904
|
+
// 置空关闭 TDesign 行点击/键盘的原生高亮,避免双重写入打架
|
|
905
|
+
activeRowType: "",
|
|
894
906
|
selectOnRowClick: reSelectOnRowClick,
|
|
895
907
|
expandOnRowClick,
|
|
896
908
|
tree: reTree,
|
|
@@ -1241,6 +1253,94 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1241
1253
|
function isEditingCell(row, colKey) {
|
|
1242
1254
|
return !!findEditingCell(row, colKey);
|
|
1243
1255
|
}
|
|
1256
|
+
function isSelectedCell(row, colKey) {
|
|
1257
|
+
return selectedCells.value.some((item) => getRowValue(item.row) === getRowValue(row) && item.colKey === colKey);
|
|
1258
|
+
}
|
|
1259
|
+
function hasSelectionModifier(event) {
|
|
1260
|
+
return !!event && (event.metaKey || event.ctrlKey || event.shiftKey);
|
|
1261
|
+
}
|
|
1262
|
+
function expandSelectedCellRange(anchor, target) {
|
|
1263
|
+
if (!target.colKey || !anchor.colKey) return [target];
|
|
1264
|
+
const columns = adaptedColumns.value;
|
|
1265
|
+
const fromCol = columns.findIndex((col) => col.colKey === anchor.colKey);
|
|
1266
|
+
const toCol = columns.findIndex((col) => col.colKey === target.colKey);
|
|
1267
|
+
const rows = data.value;
|
|
1268
|
+
const fromRow = rows.findIndex((row) => getRowValue(row) === getRowValue(anchor.row));
|
|
1269
|
+
const toRow = rows.findIndex((row) => getRowValue(row) === getRowValue(target.row));
|
|
1270
|
+
if (fromCol < 0 || toCol < 0 || fromRow < 0 || toRow < 0) return [target];
|
|
1271
|
+
const [rowStart, rowEnd] = fromRow <= toRow ? [fromRow, toRow] : [toRow, fromRow];
|
|
1272
|
+
const [colStart, colEnd] = fromCol <= toCol ? [fromCol, toCol] : [toCol, fromCol];
|
|
1273
|
+
const colKeys = columns.slice(colStart, colEnd + 1).map((col) => col.colKey);
|
|
1274
|
+
return rows.slice(rowStart, rowEnd + 1).flatMap((row) => colKeys.map((colKey) => ({
|
|
1275
|
+
row,
|
|
1276
|
+
colKey
|
|
1277
|
+
})));
|
|
1278
|
+
}
|
|
1279
|
+
function isRowSelectDisabled(row, rowIndex) {
|
|
1280
|
+
const selectColumn = adaptedColumns.value.find((col) => col.type === "single" || col.type === "multiple");
|
|
1281
|
+
if (!selectColumn) return false;
|
|
1282
|
+
const context = {
|
|
1283
|
+
row,
|
|
1284
|
+
rowIndex
|
|
1285
|
+
};
|
|
1286
|
+
const disabled = typeof selectColumn.disabled === "function" ? selectColumn.disabled(context) : selectColumn.disabled;
|
|
1287
|
+
const checkProps = typeof selectColumn.checkProps === "function" ? selectColumn.checkProps(context) : selectColumn.checkProps;
|
|
1288
|
+
return !!disabled || !!checkProps?.disabled;
|
|
1289
|
+
}
|
|
1290
|
+
function syncSelectedRowKeysFromCells() {
|
|
1291
|
+
const rowKeys = [];
|
|
1292
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1293
|
+
for (const item of selectedCells.value) {
|
|
1294
|
+
const rowValue = getRowValue(item.row);
|
|
1295
|
+
if (seen.has(rowValue)) continue;
|
|
1296
|
+
const rowIndex = data.value.findIndex((row) => getRowValue(row) === rowValue);
|
|
1297
|
+
if (isRowSelectDisabled(rowIndex >= 0 ? data.value[rowIndex] : item.row, rowIndex)) continue;
|
|
1298
|
+
seen.add(rowValue);
|
|
1299
|
+
rowKeys.push(rowValue);
|
|
1300
|
+
}
|
|
1301
|
+
selectedRowKeys.value = rowKeys;
|
|
1302
|
+
activeRowKeys.value = rowKeys;
|
|
1303
|
+
}
|
|
1304
|
+
function pruneDisabledSelectedRows(newData) {
|
|
1305
|
+
if (!selectedRowKeys.value.length) return;
|
|
1306
|
+
const next = selectedRowKeys.value.filter((key) => {
|
|
1307
|
+
const rowIndex = newData.findIndex((row) => getRowValue(row) === key);
|
|
1308
|
+
if (rowIndex < 0) return true;
|
|
1309
|
+
return !isRowSelectDisabled(newData[rowIndex], rowIndex);
|
|
1310
|
+
});
|
|
1311
|
+
if (next.length === selectedRowKeys.value.length) return;
|
|
1312
|
+
selectedRowKeys.value = next;
|
|
1313
|
+
}
|
|
1314
|
+
function isCellSelectableColumn(column) {
|
|
1315
|
+
if (selectionExcludedColKeys.has(String(column.colKey))) return false;
|
|
1316
|
+
if (column.type === "single" || column.type === "multiple") return false;
|
|
1317
|
+
return column.cellSelectable ?? String(column.colKey) !== "operation";
|
|
1318
|
+
}
|
|
1319
|
+
function applyCellSelection(cell, event) {
|
|
1320
|
+
if (!reCellSelectable.value) return;
|
|
1321
|
+
const column = adaptedColumns.value.find((col) => col.colKey === cell.colKey);
|
|
1322
|
+
if (!column || !isCellSelectableColumn(column)) return;
|
|
1323
|
+
if (event?.metaKey || event?.ctrlKey) {
|
|
1324
|
+
const exists = selectedCells.value.some((item) => isSameEditingCell(item, cell));
|
|
1325
|
+
const rest = selectedCells.value.filter((item) => !isSameEditingCell(item, cell));
|
|
1326
|
+
selectedCells.value = exists ? rest : [...rest, cell];
|
|
1327
|
+
selectedCell.value = selectedCells.value.at(-1);
|
|
1328
|
+
selectedCellAnchor.value = cell;
|
|
1329
|
+
syncSelectedRowKeysFromCells();
|
|
1330
|
+
return;
|
|
1331
|
+
}
|
|
1332
|
+
if (event?.shiftKey && selectedCellAnchor.value) {
|
|
1333
|
+
document.getSelection()?.removeAllRanges();
|
|
1334
|
+
selectedCells.value = expandSelectedCellRange(selectedCellAnchor.value, cell);
|
|
1335
|
+
selectedCell.value = cell;
|
|
1336
|
+
syncSelectedRowKeysFromCells();
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
selectedCells.value = [cell];
|
|
1340
|
+
selectedCell.value = cell;
|
|
1341
|
+
selectedCellAnchor.value = cell;
|
|
1342
|
+
syncSelectedRowKeysFromCells();
|
|
1343
|
+
}
|
|
1244
1344
|
function resolveFormItemLazy(column) {
|
|
1245
1345
|
const formItem = column.formItem;
|
|
1246
1346
|
if (!formItem) return false;
|
|
@@ -1336,8 +1436,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1336
1436
|
void exitEditingCell(activeEditingCell.value);
|
|
1337
1437
|
}
|
|
1338
1438
|
function handleCellClick(context) {
|
|
1339
|
-
if (tableReadonly.value) return;
|
|
1340
1439
|
const column = context.col;
|
|
1440
|
+
const cell = {
|
|
1441
|
+
row: context.row,
|
|
1442
|
+
colKey: column.colKey
|
|
1443
|
+
};
|
|
1444
|
+
if (!handledSelectionEvents.has(context.e)) applyCellSelection(cell, context.e);
|
|
1445
|
+
if (hasSelectionModifier(context.e)) return;
|
|
1446
|
+
if (tableReadonly.value) return;
|
|
1341
1447
|
if (column.formItem) {
|
|
1342
1448
|
const editingCell = findEditingCell(context.row, column.colKey);
|
|
1343
1449
|
if (editingCell) enterEditingCell(editingCell, false);
|
|
@@ -1376,15 +1482,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1376
1482
|
}
|
|
1377
1483
|
function handleDocumentKeydown(event) {
|
|
1378
1484
|
if (!activated.value) return;
|
|
1379
|
-
if (event.key !== "Escape" ||
|
|
1485
|
+
if (event.key !== "Escape" || event.defaultPrevented) return;
|
|
1486
|
+
if (!activeEditingCell.value && !selectedCell.value && !selectedCells.value.length) return;
|
|
1380
1487
|
const target = event.target;
|
|
1381
1488
|
if (target?.closest(".t-select-input--popup-visible, .t-popup__content, .t-dialog, .t-drawer, .t-image-viewer, .qd-multi-file-viewer")) {
|
|
1382
1489
|
return;
|
|
1383
1490
|
}
|
|
1491
|
+
selectedCell.value = void 0;
|
|
1492
|
+
selectedCells.value = [];
|
|
1493
|
+
selectedRowKeys.value = [];
|
|
1494
|
+
activeRowKeys.value = [];
|
|
1384
1495
|
exitActiveEditingCell();
|
|
1385
1496
|
}
|
|
1386
1497
|
function handleDocumentClick(event) {
|
|
1387
|
-
if (!activated.value
|
|
1498
|
+
if (!activated.value) return;
|
|
1499
|
+
if (!editingCells.value.length && !selectedCell.value && !selectedCells.value.length) return;
|
|
1388
1500
|
const hasVisibleDialog = Array.from(document.querySelectorAll(".t-dialog")).some((element) => element.getClientRects().length);
|
|
1389
1501
|
const hasVisibleDrawer = Array.from(document.querySelectorAll(".t-drawer")).some((element) => element.classList.contains("t-drawer--open") || element.getAnimations({
|
|
1390
1502
|
subtree: true
|
|
@@ -1392,6 +1504,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1392
1504
|
if (hasVisibleDialog || hasVisibleDrawer) return;
|
|
1393
1505
|
const insideInteractiveArea = event.composedPath().some((target) => target instanceof Element && target.matches("td, .t-popup, .qd-dialog, .t-dialog, .t-drawer, .t-image-viewer, .qd-multi-file-viewer, [data-popper-placement]"));
|
|
1394
1506
|
if (insideInteractiveArea) return;
|
|
1507
|
+
selectedCell.value = void 0;
|
|
1508
|
+
selectedCells.value = [];
|
|
1395
1509
|
void exitAllEditingCells();
|
|
1396
1510
|
}
|
|
1397
1511
|
function getFirstValidationError(results) {
|
|
@@ -1973,11 +2087,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1973
2087
|
} : {}
|
|
1974
2088
|
};
|
|
1975
2089
|
const columnClassName = reColumn.className === void 0 ? [] : Array.isArray(reColumn.className) ? reColumn.className : [reColumn.className];
|
|
2090
|
+
const selectedCellClass = (context) => context.type === "td" && isSelectedCell(context.row, column.colKey) ? "qd-service-table__selected-cell" : "";
|
|
2091
|
+
const finalizeColumn = (col) => {
|
|
2092
|
+
const previousAttrs = col.attrs;
|
|
2093
|
+
col.attrs = (context) => ({
|
|
2094
|
+
...typeof previousAttrs === "function" ? previousAttrs(context) : previousAttrs,
|
|
2095
|
+
onClickCapture: (event) => {
|
|
2096
|
+
if (context.type !== "td") return;
|
|
2097
|
+
handledSelectionEvents.add(event);
|
|
2098
|
+
applyCellSelection({
|
|
2099
|
+
row: context.row,
|
|
2100
|
+
colKey: column.colKey
|
|
2101
|
+
}, event);
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
return col;
|
|
2105
|
+
};
|
|
1976
2106
|
if (tableReadonly.value || !formItem) {
|
|
1977
2107
|
if (!children && formItemColumns.value.length) {
|
|
1978
|
-
reColumn.className = [...columnClassName, (context) => context.type === "td" ? "qd-service-table__non-editable-col" : ""];
|
|
2108
|
+
reColumn.className = [...columnClassName, selectedCellClass, (context) => context.type === "td" ? "qd-service-table__non-editable-col" : ""];
|
|
2109
|
+
} else if (!children) {
|
|
2110
|
+
reColumn.className = [...columnClassName, selectedCellClass];
|
|
1979
2111
|
}
|
|
1980
|
-
return reColumn;
|
|
2112
|
+
return finalizeColumn(reColumn);
|
|
1981
2113
|
}
|
|
1982
2114
|
const columnAttrs = column.attrs;
|
|
1983
2115
|
reColumn.attrs = (context) => {
|
|
@@ -1997,7 +2129,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1997
2129
|
}
|
|
1998
2130
|
};
|
|
1999
2131
|
};
|
|
2000
|
-
reColumn.className = [...columnClassName, "qd-service-table__form-item-col", (context) => context.type === "td" && !resolveFormItemIfRender(column, context.row) ? "qd-service-table__non-editable-col" : ""];
|
|
2132
|
+
reColumn.className = [...columnClassName, "qd-service-table__form-item-col", selectedCellClass, (context) => context.type === "td" && !resolveFormItemIfRender(column, context.row) ? "qd-service-table__non-editable-col" : ""];
|
|
2001
2133
|
const generatedEdit = {
|
|
2002
2134
|
component: QdServiceTableEditCell,
|
|
2003
2135
|
showEditIcon: false,
|
|
@@ -2067,7 +2199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2067
2199
|
...typeof explicitEdit?.props === "function" ? explicitEdit.props(context) : explicitEdit?.props
|
|
2068
2200
|
})
|
|
2069
2201
|
};
|
|
2070
|
-
return reColumn;
|
|
2202
|
+
return finalizeColumn(reColumn);
|
|
2071
2203
|
});
|
|
2072
2204
|
}
|
|
2073
2205
|
function getCurrentTableContentEl() {
|
|
@@ -2314,7 +2446,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2314
2446
|
watch(expandedTreeNodes, adjustScrollWhenTreeExpanded, {
|
|
2315
2447
|
flush: "post"
|
|
2316
2448
|
});
|
|
2317
|
-
watch(data,
|
|
2449
|
+
watch(data, (newData) => {
|
|
2450
|
+
pruneCellValidationErrors(newData);
|
|
2451
|
+
pruneDisabledSelectedRows(newData);
|
|
2452
|
+
});
|
|
2318
2453
|
watch(tableContentVisible, (visible, _old, onCleanup) => {
|
|
2319
2454
|
clearAffixFallbackTimer();
|
|
2320
2455
|
if (!visible) return;
|
|
@@ -14,6 +14,7 @@ export declare const qdServiceTableProps: {
|
|
|
14
14
|
readonly readonly: undefined;
|
|
15
15
|
readonly lazyForm: true;
|
|
16
16
|
readonly editCellValidationBlock: "error";
|
|
17
|
+
readonly cellSelectable: undefined;
|
|
17
18
|
readonly rowKey: "id";
|
|
18
19
|
readonly expandIcon: true;
|
|
19
20
|
readonly selectOnRowClick: undefined;
|
|
@@ -11,6 +11,7 @@ export type QdServiceTableScroll = NonNullable<TdEnhancedTableProps['scroll']> &
|
|
|
11
11
|
export interface QdServiceTableCol<D extends TableRowData = TableRowData> extends Omit<TDesignServiceTableCol<D>, 'children' | 'foot'> {
|
|
12
12
|
children?: QdServiceTableCol<D>[];
|
|
13
13
|
foot?: string | TNode<BaseTableCellParams<D>>;
|
|
14
|
+
cellSelectable?: boolean;
|
|
14
15
|
filterItem?: true | QdServiceTableFilterItem;
|
|
15
16
|
formItem?: QdServiceTableFormItem;
|
|
16
17
|
}
|
|
@@ -76,6 +77,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
|
|
|
76
77
|
rowKey?: string;
|
|
77
78
|
size?: TdEnhancedTableProps<D>['size'] | 'mini';
|
|
78
79
|
selectType?: 'single' | 'multiple';
|
|
80
|
+
cellSelectable?: boolean;
|
|
79
81
|
reserveSelectedRowOnFilter?: boolean;
|
|
80
82
|
headerBg?: boolean;
|
|
81
83
|
showFilterResult?: boolean;
|
|
@@ -42,6 +42,7 @@ export declare const qdServiceDialogTableSelectProps: {
|
|
|
42
42
|
readonly emptyImage: true;
|
|
43
43
|
readonly lazyForm: true;
|
|
44
44
|
readonly editCellValidationBlock: "error";
|
|
45
|
+
readonly cellSelectable: undefined;
|
|
45
46
|
readonly expandIcon: true;
|
|
46
47
|
readonly selectOnRowClick: undefined;
|
|
47
48
|
readonly bordered: undefined;
|
|
@@ -17,6 +17,7 @@ export declare const qdServiceDialogTabsTableSelectProps: {
|
|
|
17
17
|
readonly emptyImage: true;
|
|
18
18
|
readonly lazyForm: true;
|
|
19
19
|
readonly editCellValidationBlock: "error";
|
|
20
|
+
readonly cellSelectable: undefined;
|
|
20
21
|
readonly expandIcon: true;
|
|
21
22
|
readonly selectOnRowClick: undefined;
|
|
22
23
|
readonly bordered: undefined;
|
|
@@ -16,6 +16,7 @@ export declare const qdServicePopupTableSelectProps: {
|
|
|
16
16
|
readonly emptyImage: true;
|
|
17
17
|
readonly lazyForm: true;
|
|
18
18
|
readonly editCellValidationBlock: "error";
|
|
19
|
+
readonly cellSelectable: undefined;
|
|
19
20
|
readonly expandIcon: true;
|
|
20
21
|
readonly selectOnRowClick: undefined;
|
|
21
22
|
readonly bordered: undefined;
|
|
@@ -3,7 +3,7 @@ import { defineComponent, mergeDefaults, computed, ref, inject, useTemplateRef,
|
|
|
3
3
|
import TinymceVue from "@tinymce/tinymce-vue";
|
|
4
4
|
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";
|
|
5
5
|
import { MD5, isEmpty, to, createExposeProxy } from "qidian-shared";
|
|
6
|
-
import { getPublicUrl } from "../../utils/tools
|
|
6
|
+
import { getPublicUrl } from "../../utils/tools.mjs";
|
|
7
7
|
import { PROVIDE_TINYMCE, PROVIDE_UPLOAD } from "../config-provider/config.mjs";
|
|
8
8
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
9
9
|
import { qdTinymceProps } from "./props.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './preview.css'
|
|
2
2
|
import { defineComponent, mergeDefaults, inject, computed, createElementBlock, openBlock, createElementVNode } from "vue";
|
|
3
|
-
import { getPublicUrl } from "../../utils/tools
|
|
3
|
+
import { getPublicUrl } from "../../utils/tools.mjs";
|
|
4
4
|
import { PROVIDE_TINYMCE } from "../config-provider/config.mjs";
|
|
5
5
|
import { qdTinymcePreviewProps } from "./props.mjs";
|
|
6
6
|
const _hoisted_1 = { class: "qd-tinymce-preview" };
|
|
@@ -3,7 +3,7 @@ import { defineComponent, computed, createElementBlock, openBlock, createElement
|
|
|
3
3
|
import { formatByte } from "qidian-shared";
|
|
4
4
|
import { TimeFilledIcon, ErrorCircleFilledIcon, CheckCircleFilledIcon, FileIcon } from "tdesign-icons-vue-next";
|
|
5
5
|
import { Image, Button, Loading } from "tdesign-vue-next";
|
|
6
|
-
import { isImage } from "../../../utils/tools
|
|
6
|
+
import { isImage } from "../../../utils/tools.mjs";
|
|
7
7
|
import { getFileType, handleAbridgeName } from "../common.mjs";
|
|
8
8
|
import QdFileIcon from "../../file-icon/index.vue.mjs";
|
|
9
9
|
const _hoisted_1 = { class: "qd-upload__flow-table-wrapper" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useSlots, computed, createElementBlock, openBlock, createCommentVNode, Fragment, renderList, createBlock, createVNode, createElementVNode, unref, toDisplayString, renderSlot, withCtx, withModifiers, createTextVNode, normalizeClass } from "vue";
|
|
2
2
|
import { ErrorCircleFilledIcon, DeleteIcon, BrowseIcon, AddIcon } from "tdesign-icons-vue-next";
|
|
3
3
|
import { Loading, Image, Space, Divider, Link } from "tdesign-vue-next";
|
|
4
|
-
import { isImage } from "../../../utils/tools
|
|
4
|
+
import { isImage } from "../../../utils/tools.mjs";
|
|
5
5
|
import { getFileType, handleAbridgeName, hasSlotContent } from "../common.mjs";
|
|
6
6
|
import QdFileIcon from "../../file-icon/index.vue.mjs";
|
|
7
7
|
const _hoisted_1 = { class: "t-upload__card" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useSlots, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createCommentVNode, normalizeClass, createBlock, createVNode, unref, toDisplayString, renderSlot, withCtx, withModifiers, createTextVNode } from "vue";
|
|
2
2
|
import { ErrorCircleFilledIcon, BrowseIcon, DeleteIcon, CheckCircleFilledIcon, TimeFilledIcon } from "tdesign-icons-vue-next";
|
|
3
3
|
import { Loading, Image, Space, Divider } from "tdesign-vue-next";
|
|
4
|
-
import { isImage } from "../../../utils/tools
|
|
4
|
+
import { isImage } from "../../../utils/tools.mjs";
|
|
5
5
|
import { getFileType, handleAbridgeName, hasSlotContent } from "../common.mjs";
|
|
6
6
|
import QdFileIcon from "../../file-icon/index.vue.mjs";
|
|
7
7
|
const _hoisted_1 = { class: "t-upload__card clearfix" };
|
|
@@ -3,7 +3,7 @@ import { isEmpty, to, suspectedWrapperPromise, parseRelaxedJSON } from "qidian-s
|
|
|
3
3
|
import { ref, onBeforeUnmount } from "vue";
|
|
4
4
|
import { useConfig } from "../../components/config-provider/useConfig.mjs";
|
|
5
5
|
import { useModal } from "../useModal.mjs";
|
|
6
|
-
import { useUICsl } from "../../utils/tools
|
|
6
|
+
import { useUICsl } from "../../utils/tools.mjs";
|
|
7
7
|
import { fetchEventSource } from "../../node_modules/.pnpm/@microsoft_fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/fetch.mjs";
|
|
8
8
|
const csl = useUICsl("useAgentChat");
|
|
9
9
|
function useAgentChat(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { camelize, to, isEmpty, findEnum, suspectedWrapperPromise } from "qidian-shared";
|
|
2
2
|
import { ref, watchEffect, toRefs } from "vue";
|
|
3
|
-
import { useUICsl } from "../../utils/tools
|
|
3
|
+
import { useUICsl } from "../../utils/tools.mjs";
|
|
4
4
|
const csl = useUICsl("useDict");
|
|
5
5
|
const dictCache = /* @__PURE__ */ new Map();
|
|
6
6
|
const dictPromiseCache = /* @__PURE__ */ new Map();
|
package/dist/hooks/useModal.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { suspectedWrapperPromise, isEmpty } from "qidian-shared";
|
|
|
2
2
|
import { DialogPlugin, NotifyPlugin, MessagePlugin } from "tdesign-vue-next";
|
|
3
3
|
import { getCurrentInstance, onDeactivated, onActivated, nextTick, isVNode } from "vue";
|
|
4
4
|
import { useConfig } from "../components/config-provider/useConfig.mjs";
|
|
5
|
-
import { setOverlayActive, OVERLAY_DEACTIVATED_CLASS, updateOverlayMasks, focusTopOverlay, OVERLAY_CLOSING_CLASS, unregisterOverlayEsc, setOverlayEscEnabled, registerOverlayEsc, setOverlayOpenedTime, markPreviousOverlaysTransparent } from "../utils/overlayStack
|
|
6
|
-
import { reAttach, resolveAttachParent } from "../utils/tools
|
|
5
|
+
import { setOverlayActive, OVERLAY_DEACTIVATED_CLASS, updateOverlayMasks, focusTopOverlay, OVERLAY_CLOSING_CLASS, unregisterOverlayEsc, setOverlayEscEnabled, registerOverlayEsc, setOverlayOpenedTime, markPreviousOverlaysTransparent } from "../utils/overlayStack.mjs";
|
|
6
|
+
import { reAttach, resolveAttachParent } from "../utils/tools.mjs";
|
|
7
7
|
const visibleDialogInstances = /* @__PURE__ */ new Set();
|
|
8
8
|
const aliveDialogInstances = /* @__PURE__ */ new Set();
|
|
9
9
|
let modalSeq = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isEmpty, validator, to } from "qidian-shared";
|
|
2
2
|
import { ref } from "vue";
|
|
3
|
-
import { useUICsl } from "../../utils/tools
|
|
3
|
+
import { useUICsl } from "../../utils/tools.mjs";
|
|
4
4
|
const csl = useUICsl("useUserAvatar");
|
|
5
5
|
const avatarCache = /* @__PURE__ */ new Map();
|
|
6
6
|
const avatarPromiseCache = /* @__PURE__ */ new Map();
|
package/dist/index.mjs
CHANGED
|
@@ -63,9 +63,9 @@ import { usePerfectScrollbar } from "./hooks/usePerfectScrollbar.mjs";
|
|
|
63
63
|
import { useReadonly } from "./hooks/useReadonly.mjs";
|
|
64
64
|
import { useTheme } from "./hooks/useTheme.mjs";
|
|
65
65
|
import { useUserAvatar } from "./hooks/useUserAvatar/index.mjs";
|
|
66
|
-
import * as
|
|
67
|
-
import { useUICsl } from "./utils/tools
|
|
68
|
-
import { formatDuration } from "./utils/date
|
|
66
|
+
import * as auth from "./utils/auth.mjs";
|
|
67
|
+
import { useUICsl } from "./utils/tools.mjs";
|
|
68
|
+
import { formatDuration } from "./utils/date.mjs";
|
|
69
69
|
export {
|
|
70
70
|
PROVIDE_FORM_ADD_AFTER_SUBMIT_QUEUE,
|
|
71
71
|
PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE,
|
|
@@ -110,7 +110,7 @@ export {
|
|
|
110
110
|
default11 as QdServiceTreeSelect,
|
|
111
111
|
default37 as QdSteps,
|
|
112
112
|
default38 as QdUpload,
|
|
113
|
-
|
|
113
|
+
auth,
|
|
114
114
|
defineQdCrudList,
|
|
115
115
|
defineQdCrudTable,
|
|
116
116
|
defineQdCrudTabsTable,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import dayjs from "
|
|
2
|
-
import { useConfig } from "
|
|
3
|
-
import { useUICsl } from "
|
|
1
|
+
import dayjs from "../_virtual/dayjs.min.mjs";
|
|
2
|
+
import { useConfig } from "../components/config-provider/useConfig.mjs";
|
|
3
|
+
import { useUICsl } from "./tools.mjs";
|
|
4
4
|
const csl = useUICsl("date");
|
|
5
5
|
function formatDuration(startDate, endDate) {
|
|
6
6
|
const { t } = useConfig("timeFormat");
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|