qidian-vue-ui 1.5.0 → 1.5.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/service/table/index.css +10 -10
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +37 -27
- package/dist/components/upload/index.css +33 -33
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +2 -1
- package/package.json +2 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-36ee2051] {
|
|
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-36ee2051] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table[data-v-
|
|
9
|
+
.qd-service-table[data-v-36ee2051] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
|
|
10
10
|
margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
11
11
|
}
|
|
12
|
-
.qd-service-table[data-v-
|
|
12
|
+
.qd-service-table[data-v-36ee2051] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
|
|
13
13
|
width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
14
14
|
}
|
|
15
|
-
.qd-service-table[data-v-
|
|
16
|
-
transform: var(--
|
|
15
|
+
.qd-service-table[data-v-36ee2051] .t-affix {
|
|
16
|
+
transform: var(--f1591e7a);
|
|
17
17
|
}
|
|
18
|
-
.qd-service-table--ps-x-fixed[data-v-
|
|
18
|
+
.qd-service-table--ps-x-fixed[data-v-36ee2051] .ps__rail-x {
|
|
19
19
|
position: fixed;
|
|
20
|
-
left: var(--
|
|
21
|
-
bottom: var(--
|
|
20
|
+
left: var(--v6dba5585) !important;
|
|
21
|
+
bottom: var(--v4daf6a06) !important;
|
|
22
22
|
}
|
|
23
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
23
|
+
.qd-service-table--disable-horizontal-scroll[data-v-36ee2051] colgroup > col {
|
|
24
24
|
width: auto !important;
|
|
25
25
|
}
|
|
@@ -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-36ee2051"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css'
|
|
2
2
|
import { defineComponent, mergeDefaults, useCssVars, computed, ref, useTemplateRef, reactive, createVNode, watch, nextTick, onActivated, onDeactivated, onBeforeUnmount, withDirectives, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef, createSlots, withCtx, renderList, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
3
3
|
import { useVModels, useElementBounding, useIntersectionObserver, useMouseInElement } 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 { easyCopy, isEmpty, suspectedWrapperPromise, useServicePagination, createExposeProxy, resizeDirective, getScrollEl } from "qidian-shared";
|
|
4
|
+
import { useTimer, easyCopy, isEmpty, suspectedWrapperPromise, useServicePagination, createExposeProxy, resizeDirective, getScrollEl } from "qidian-shared";
|
|
5
5
|
import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { EnhancedTable, Table, Empty } from "tdesign-vue-next";
|
|
7
7
|
import { getTransformOffset } from "../../../utils/tools.mjs";
|
|
@@ -307,9 +307,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
307
307
|
emit: __emit
|
|
308
308
|
}) {
|
|
309
309
|
useCssVars((_ctx) => ({
|
|
310
|
-
"
|
|
311
|
-
"
|
|
312
|
-
"
|
|
310
|
+
"f1591e7a": affixedHeaderTransform.value,
|
|
311
|
+
"v6dba5585": tableContentLeft.value,
|
|
312
|
+
"v4daf6a06": outsideBottom.value
|
|
313
313
|
}));
|
|
314
314
|
const props = __props;
|
|
315
315
|
const emit = __emit;
|
|
@@ -358,6 +358,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
358
358
|
const tableContentLeft = computed(() => `${tableContentRect.left - affixedRailOffsetX.value}px`);
|
|
359
359
|
const outsideScrollRect = reactive(useElementBounding(outsideScrollEl));
|
|
360
360
|
const affixBottomOffset = ref(0);
|
|
361
|
+
const {
|
|
362
|
+
timer: probeDelayTimer,
|
|
363
|
+
clearTimer: clearProbeDelayTimer
|
|
364
|
+
} = useTimer();
|
|
361
365
|
let probeRafId = 0;
|
|
362
366
|
let animatingAncestorCleanup = null;
|
|
363
367
|
const outsideBottom = computed(() => {
|
|
@@ -890,33 +894,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
890
894
|
});
|
|
891
895
|
affixedHeaderTransform.value = `translateY(-${y}px)`;
|
|
892
896
|
}
|
|
893
|
-
function
|
|
897
|
+
function probeBottomBlockHeight(withDelay = true) {
|
|
898
|
+
if (withDelay) {
|
|
899
|
+
clearProbeDelayTimer();
|
|
900
|
+
probeDelayTimer.value = setTimeout(() => {
|
|
901
|
+
clearProbeDelayTimer();
|
|
902
|
+
probeBottomBlockHeight(false);
|
|
903
|
+
}, 320);
|
|
904
|
+
}
|
|
894
905
|
if (probeRafId) return;
|
|
895
906
|
probeRafId = requestAnimationFrame(() => {
|
|
896
907
|
probeRafId = 0;
|
|
897
|
-
|
|
908
|
+
const scrollEl = outsideScrollEl.value;
|
|
909
|
+
const tableEl = tableRef.value?.$el;
|
|
910
|
+
if (!scrollEl || !tableEl) return;
|
|
911
|
+
const sRect = scrollEl.getBoundingClientRect();
|
|
912
|
+
const stack = document.elementsFromPoint(sRect.left + sRect.width / 2, sRect.bottom - 1);
|
|
913
|
+
let blockHeight = 0;
|
|
914
|
+
for (const el of stack) {
|
|
915
|
+
if (tableEl.contains(el)) continue;
|
|
916
|
+
if (el === scrollEl || el.contains(scrollEl)) continue;
|
|
917
|
+
const {
|
|
918
|
+
position
|
|
919
|
+
} = getComputedStyle(el);
|
|
920
|
+
if (position !== "fixed" && position !== "sticky") continue;
|
|
921
|
+
const rect = el.getBoundingClientRect();
|
|
922
|
+
if (rect.top < sRect.top) continue;
|
|
923
|
+
blockHeight = Math.max(blockHeight, sRect.bottom - rect.top);
|
|
924
|
+
}
|
|
925
|
+
affixBottomOffset.value = blockHeight;
|
|
898
926
|
});
|
|
899
927
|
}
|
|
900
|
-
function probeBottomBlockHeight() {
|
|
901
|
-
const scrollEl = outsideScrollEl.value;
|
|
902
|
-
const tableEl = tableRef.value?.$el;
|
|
903
|
-
if (!scrollEl || !tableEl) return;
|
|
904
|
-
const sRect = scrollEl.getBoundingClientRect();
|
|
905
|
-
const stack = document.elementsFromPoint(sRect.left + sRect.width / 2, sRect.bottom - 1);
|
|
906
|
-
let blockHeight = 0;
|
|
907
|
-
for (const el of stack) {
|
|
908
|
-
if (tableEl.contains(el)) continue;
|
|
909
|
-
if (el === scrollEl || el.contains(scrollEl)) continue;
|
|
910
|
-
const {
|
|
911
|
-
position
|
|
912
|
-
} = getComputedStyle(el);
|
|
913
|
-
if (position !== "fixed" && position !== "sticky") continue;
|
|
914
|
-
const rect = el.getBoundingClientRect();
|
|
915
|
-
if (rect.top < sRect.top) continue;
|
|
916
|
-
blockHeight = Math.max(blockHeight, sRect.bottom - rect.top);
|
|
917
|
-
}
|
|
918
|
-
affixBottomOffset.value = blockHeight;
|
|
919
|
-
}
|
|
920
928
|
watch(columnControllerVisible, (visible) => {
|
|
921
929
|
const {
|
|
922
930
|
columns
|
|
@@ -943,11 +951,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
943
951
|
watch(isOutsideTableContent, (outside) => {
|
|
944
952
|
if (outside) return;
|
|
945
953
|
refreshAffixedMetrics();
|
|
954
|
+
probeBottomBlockHeight();
|
|
946
955
|
});
|
|
947
956
|
watch(outsideScrollEl, (el, _old, onCleanup) => {
|
|
948
957
|
if (!el) return;
|
|
949
958
|
probeBottomBlockHeight();
|
|
950
|
-
const onScroll = () =>
|
|
959
|
+
const onScroll = () => probeBottomBlockHeight(false);
|
|
951
960
|
el.addEventListener("scroll", onScroll, {
|
|
952
961
|
passive: true
|
|
953
962
|
});
|
|
@@ -957,6 +966,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
957
966
|
cancelAnimationFrame(probeRafId);
|
|
958
967
|
probeRafId = 0;
|
|
959
968
|
}
|
|
969
|
+
clearProbeDelayTimer();
|
|
960
970
|
});
|
|
961
971
|
}, {
|
|
962
972
|
immediate: true
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-2e14116e] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-2e14116e] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-2e14116e] .t-upload__dragger {
|
|
9
9
|
min-width: auto;
|
|
10
10
|
min-height: 144px;
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
|
-
.qd-upload[data-v-
|
|
14
|
+
.qd-upload[data-v-2e14116e] .t-upload__flow {
|
|
15
15
|
width: 100%;
|
|
16
16
|
min-width: auto;
|
|
17
17
|
max-width: 100%;
|
|
18
18
|
}
|
|
19
|
-
.qd-upload[data-v-
|
|
19
|
+
.qd-upload[data-v-2e14116e] .t-upload__flow-empty {
|
|
20
20
|
height: auto;
|
|
21
21
|
min-height: 144px;
|
|
22
22
|
}
|
|
23
|
-
.qd-upload[data-v-
|
|
24
|
-
.qd-upload[data-v-
|
|
23
|
+
.qd-upload[data-v-2e14116e] .t-upload__flow-card-area,
|
|
24
|
+
.qd-upload[data-v-2e14116e] .t-upload__flow-table {
|
|
25
25
|
margin-top: var(--td-comp-margin-s);
|
|
26
26
|
}
|
|
27
|
-
.qd-upload[data-v-
|
|
27
|
+
.qd-upload[data-v-2e14116e] .t-upload__file-name__container {
|
|
28
28
|
display: flex;
|
|
29
29
|
align-items: center;
|
|
30
30
|
}
|
|
31
|
-
.qd-upload[data-v-
|
|
31
|
+
.qd-upload[data-v-2e14116e] .t-upload__file-name-text {
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
}
|
|
34
|
-
.qd-upload[data-v-
|
|
34
|
+
.qd-upload[data-v-2e14116e] .t-upload__file-thumbnail {
|
|
35
35
|
width: var(--td-comp-size-m);
|
|
36
36
|
height: var(--td-comp-size-m);
|
|
37
37
|
}
|
|
38
|
-
.qd-upload[data-v-
|
|
38
|
+
.qd-upload[data-v-2e14116e] .t-upload__card-image {
|
|
39
39
|
width: 100%;
|
|
40
40
|
height: 100%;
|
|
41
41
|
}
|
|
42
|
-
.qd-upload__popup-upload[data-v-
|
|
42
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-image-viewer__trigger {
|
|
43
43
|
display: none;
|
|
44
44
|
}
|
|
45
|
-
.qd-upload__popup-upload[data-v-
|
|
45
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-upload__flow-table {
|
|
46
46
|
margin-top: 0;
|
|
47
47
|
}
|
|
48
|
-
.qd-upload__popup-upload[data-v-
|
|
48
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-upload__file-name__container {
|
|
49
49
|
display: flex;
|
|
50
50
|
align-items: center;
|
|
51
51
|
}
|
|
52
|
-
.qd-upload__popup-upload[data-v-
|
|
52
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-upload__file-name-text {
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
}
|
|
55
|
-
.qd-upload__popup-upload[data-v-
|
|
55
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-upload__file-thumbnail {
|
|
56
56
|
width: var(--td-comp-size-m);
|
|
57
57
|
height: var(--td-comp-size-m);
|
|
58
58
|
}
|
|
59
|
-
.qd-upload__popup-upload[data-v-
|
|
59
|
+
.qd-upload__popup-upload[data-v-2e14116e] .t-upload__card-image {
|
|
60
60
|
width: 100%;
|
|
61
61
|
height: 100%;
|
|
62
62
|
}
|
|
63
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
64
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
63
|
+
.qd-upload__popup-upload--disabled[data-v-2e14116e] .t-upload__flow-table th:last-child,
|
|
64
|
+
.qd-upload__popup-upload--disabled[data-v-2e14116e] .t-upload__flow-table td:last-child {
|
|
65
65
|
display: none;
|
|
66
66
|
}
|
|
67
|
-
.qd-upload[data-v-
|
|
68
|
-
.qd-upload[data-v-
|
|
67
|
+
.qd-upload[data-v-2e14116e]:focus .t-upload__flow-card-area,
|
|
68
|
+
.qd-upload[data-v-2e14116e]:focus .t-upload__flow-table {
|
|
69
69
|
border-color: var(--td-brand-color);
|
|
70
70
|
}
|
|
71
|
-
.qd-upload--only-view[data-v-
|
|
72
|
-
.qd-upload--only-view[data-v-
|
|
71
|
+
.qd-upload--only-view[data-v-2e14116e] .t-upload__flow-empty,
|
|
72
|
+
.qd-upload--only-view[data-v-2e14116e] .t-upload__card-mask-item-divider {
|
|
73
73
|
display: none;
|
|
74
74
|
}
|
|
75
|
-
.qd-upload--only-view[data-v-
|
|
75
|
+
.qd-upload--only-view[data-v-2e14116e] .t-upload__flow-card-area {
|
|
76
76
|
border-color: var(--td-component-border);
|
|
77
77
|
}
|
|
78
|
-
.qd-upload--only-view[data-v-
|
|
79
|
-
.qd-upload--only-view[data-v-
|
|
80
|
-
.qd-upload--only-view[data-v-
|
|
78
|
+
.qd-upload--only-view[data-v-2e14116e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
79
|
+
.qd-upload--only-view[data-v-2e14116e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
80
|
+
.qd-upload--only-view[data-v-2e14116e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
|
|
81
81
|
display: none;
|
|
82
82
|
}
|
|
83
|
-
.qd-upload--only-view[data-v-
|
|
84
|
-
.qd-upload--only-view[data-v-
|
|
83
|
+
.qd-upload--only-view[data-v-2e14116e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
84
|
+
.qd-upload--only-view[data-v-2e14116e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
|
|
85
85
|
margin-top: 0;
|
|
86
86
|
}
|
|
87
|
-
.qd-upload--hide-manual-upload[data-v-
|
|
87
|
+
.qd-upload--hide-manual-upload[data-v-2e14116e] .t-upload__flow-bottom {
|
|
88
88
|
display: none;
|
|
89
89
|
margin-top: 0;
|
|
90
90
|
}
|
|
91
|
-
.qd-upload--hide-progress[data-v-
|
|
92
|
-
.qd-upload--hide-progress[data-v-
|
|
91
|
+
.qd-upload--hide-progress[data-v-2e14116e] .t-upload__flow-table th:last-child,
|
|
92
|
+
.qd-upload--hide-progress[data-v-2e14116e] .t-upload__flow-table td:last-child {
|
|
93
93
|
display: none;
|
|
94
94
|
}
|
|
95
|
-
.qd-upload--disabled[data-v-
|
|
95
|
+
.qd-upload--disabled[data-v-2e14116e] .t-upload__flow-card-area {
|
|
96
96
|
border-color: var(--td-component-border);
|
|
97
97
|
}
|
|
@@ -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 QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2e14116e"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -318,7 +318,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
onWaitingUploadFilesChange?.(context);
|
|
319
319
|
if (context.trigger === "validate" && context.files.length) {
|
|
320
320
|
onValidateSuccess?.(context.files);
|
|
321
|
-
|
|
321
|
+
const nextFileList = (multiple ?? props.max !== 1) && !uploadOptions.isBatchUpload ? [...fileList.value, ...context.files] : context.files;
|
|
322
|
+
updateTempModelValue(nextFileList);
|
|
322
323
|
}
|
|
323
324
|
};
|
|
324
325
|
const reUploadOptions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qidian-vue-ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "基于 TDesign 的 QiDian Vue UI 组件库",
|
|
5
5
|
"author": "qidian",
|
|
6
6
|
"license": "MIT",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"vue-codemirror": "^6.1.1",
|
|
131
131
|
"vue-echarts": "^8.0.1",
|
|
132
132
|
"vue-stream-markdown": "1.0.1-beta.1",
|
|
133
|
-
"qidian-shared": "1.0
|
|
133
|
+
"qidian-shared": "1.1.0"
|
|
134
134
|
},
|
|
135
135
|
"scripts": {
|
|
136
136
|
"clean": "rm -rf dist",
|