qidian-vue-ui 2.0.0-beta.2 → 2.0.0-beta.4
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 +22 -15
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +37 -60
- package/dist/components/service/table/types.d.ts +0 -1
- package/dist/components/upload/index.css +33 -33
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +6 -3
- package/package.json +1 -1
|
@@ -1,46 +1,53 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-70d5cd46] {
|
|
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-70d5cd46] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table[data-v-
|
|
9
|
+
.qd-service-table[data-v-70d5cd46] .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-70d5cd46] .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
|
-
.qd-service-table[data-v-
|
|
17
|
-
transform: var(--
|
|
15
|
+
.qd-service-table[data-v-70d5cd46] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
16
|
+
.qd-service-table[data-v-70d5cd46] .t-affix > .t-table__scrollbar--obvious {
|
|
17
|
+
transform: var(--e4fcd59a);
|
|
18
18
|
}
|
|
19
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
19
|
+
.qd-service-table--horizontal-bar-static[data-v-70d5cd46] .t-table__scrollbar--obvious {
|
|
20
20
|
visibility: hidden;
|
|
21
21
|
pointer-events: none;
|
|
22
22
|
}
|
|
23
|
-
.qd-service-table[data-v-
|
|
23
|
+
.qd-service-table[data-v-70d5cd46] .t-table__affixed-header-elm-wrap {
|
|
24
24
|
height: auto !important;
|
|
25
25
|
}
|
|
26
|
-
.qd-service-table[data-v-
|
|
26
|
+
.qd-service-table[data-v-70d5cd46] .t-table__affixed-header-elm {
|
|
27
27
|
position: relative;
|
|
28
28
|
scrollbar-width: none;
|
|
29
29
|
}
|
|
30
|
-
.qd-service-table[data-v-
|
|
30
|
+
.qd-service-table[data-v-70d5cd46] .t-table__affixed-header-elm::-webkit-scrollbar {
|
|
31
31
|
display: none;
|
|
32
32
|
width: 0;
|
|
33
33
|
height: 0;
|
|
34
34
|
}
|
|
35
|
-
.qd-service-table[data-v-
|
|
35
|
+
.qd-service-table[data-v-70d5cd46] .t-table__virtual-scroll-cursor + table {
|
|
36
36
|
border-collapse: separate;
|
|
37
37
|
}
|
|
38
|
-
.qd-service-table[data-v-
|
|
38
|
+
.qd-service-table[data-v-70d5cd46] .t-table__cell-wrap > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
39
39
|
width: 100%;
|
|
40
40
|
}
|
|
41
|
-
.qd-service-table[data-v-
|
|
41
|
+
.qd-service-table[data-v-70d5cd46] .qd-service-table__non-editable-col {
|
|
42
42
|
background-color: color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent);
|
|
43
43
|
}
|
|
44
|
-
.qd-service-table
|
|
44
|
+
.qd-service-table[data-v-70d5cd46] .qd-service-table__non-editable-col:is(
|
|
45
|
+
.t-table__cell--fixed-left,
|
|
46
|
+
.t-table__cell--fixed-right
|
|
47
|
+
) {
|
|
48
|
+
background-color: inherit;
|
|
49
|
+
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));
|
|
50
|
+
}
|
|
51
|
+
.qd-service-table--disable-horizontal-scroll[data-v-70d5cd46] colgroup > col {
|
|
45
52
|
width: auto !important;
|
|
46
53
|
}
|
|
@@ -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-70d5cd46"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './index.css'
|
|
2
|
-
import { defineComponent, mergeDefaults, useCssVars, ref, computed, useSlots, useTemplateRef, shallowRef, inject, reactive, createVNode, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, withDirectives, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef, createSlots, withCtx, renderList, renderSlot, normalizeProps, guardReactiveProps, render, h
|
|
2
|
+
import { defineComponent, mergeDefaults, useCssVars, ref, computed, useSlots, useTemplateRef, shallowRef, inject, getCurrentInstance, reactive, createVNode, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, withDirectives, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef, createSlots, withCtx, renderList, renderSlot, normalizeProps, guardReactiveProps, render, h } from "vue";
|
|
3
3
|
import { useVModels, useElementBounding, useIntersectionObserver } 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 { useTimer, easyCopy, isEmpty, suspectedWrapperPromise, useServicePagination, createExposeProxy, resizeDirective, getScrollEl } from "qidian-shared";
|
|
5
5
|
import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon } from "tdesign-icons-vue-next";
|
|
@@ -318,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
emit: __emit
|
|
319
319
|
}) {
|
|
320
320
|
useCssVars((_ctx) => ({
|
|
321
|
-
"
|
|
321
|
+
"e4fcd59a": affixedHeaderTransform.value
|
|
322
322
|
}));
|
|
323
323
|
const props = __props;
|
|
324
324
|
const emit = __emit;
|
|
@@ -345,6 +345,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
347
|
const vResize = resizeDirective;
|
|
348
|
+
const vHorizontalWheel = {
|
|
349
|
+
mounted(el) {
|
|
350
|
+
el.addEventListener("wheel", handleHorizontalWheel, {
|
|
351
|
+
passive: false
|
|
352
|
+
});
|
|
353
|
+
},
|
|
354
|
+
unmounted(el) {
|
|
355
|
+
el.removeEventListener("wheel", handleHorizontalWheel);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
348
358
|
const slots = useSlots();
|
|
349
359
|
const {
|
|
350
360
|
t
|
|
@@ -377,6 +387,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
377
387
|
};
|
|
378
388
|
});
|
|
379
389
|
const isVirtualScroll = computed(() => props.scroll?.type === "virtual");
|
|
390
|
+
const currentInstance = getCurrentInstance();
|
|
391
|
+
const offscreenAppContext = currentInstance ? {
|
|
392
|
+
...currentInstance.appContext,
|
|
393
|
+
provides: Reflect.get(currentInstance, "provides")
|
|
394
|
+
} : null;
|
|
380
395
|
let offscreenChain = Promise.resolve();
|
|
381
396
|
let offscreenContainer = null;
|
|
382
397
|
let offscreenVNode = null;
|
|
@@ -404,10 +419,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
404
419
|
} = useTimer();
|
|
405
420
|
let probeRafId = 0;
|
|
406
421
|
let affixRefreshRafId = 0;
|
|
407
|
-
let wheelRafId = 0;
|
|
408
|
-
let wheelDeltaY = 0;
|
|
409
422
|
let animatingAncestorCleanup = null;
|
|
410
|
-
const virtualWheelRafEnabled = computed(() => props.scroll?.type === "virtual" && props.scroll.wheelRaf !== false);
|
|
411
423
|
const adaptedColumns = computed(() => {
|
|
412
424
|
const columns = wrapFormItemColumns(props.columns || []);
|
|
413
425
|
const selectType = props.selectType;
|
|
@@ -483,7 +495,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
483
495
|
...tableOptions
|
|
484
496
|
} = props;
|
|
485
497
|
const {
|
|
486
|
-
wheelRaf: _wheelRaf,
|
|
487
498
|
virtualUpdateInterval,
|
|
488
499
|
...scrollOptions
|
|
489
500
|
} = scroll ?? {};
|
|
@@ -1083,13 +1094,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1083
1094
|
const message = getFirstValidationError(results);
|
|
1084
1095
|
if (!firstError || !message) return;
|
|
1085
1096
|
const column = firstError.col;
|
|
1086
|
-
|
|
1097
|
+
const shouldLocateFirstError = params?.scrollToFirstError !== false;
|
|
1098
|
+
if (params?.showErrorMessage && shouldLocateFirstError) {
|
|
1087
1099
|
tableRef.value?.scrollToElement({
|
|
1088
1100
|
index: firstError.rowIndex
|
|
1089
1101
|
});
|
|
1090
1102
|
await nextTick();
|
|
1091
1103
|
}
|
|
1092
|
-
if (resolveFormItemLazy(column)) {
|
|
1104
|
+
if (shouldLocateFirstError && resolveFormItemLazy(column)) {
|
|
1093
1105
|
setTimeout(() => {
|
|
1094
1106
|
enterEditingCell({
|
|
1095
1107
|
row: firstError.row,
|
|
@@ -1163,7 +1175,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1163
1175
|
data: row,
|
|
1164
1176
|
items
|
|
1165
1177
|
});
|
|
1166
|
-
vnode.appContext =
|
|
1178
|
+
vnode.appContext = offscreenAppContext;
|
|
1167
1179
|
render(vnode, container);
|
|
1168
1180
|
offscreenContainer = container;
|
|
1169
1181
|
offscreenVNode = vnode;
|
|
@@ -1671,54 +1683,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1671
1683
|
probeBottomBlockHeight();
|
|
1672
1684
|
refreshTableAffixPosition();
|
|
1673
1685
|
}
|
|
1674
|
-
function normalizeWheelDeltaY(event,
|
|
1686
|
+
function normalizeWheelDeltaY(event, pageSize2) {
|
|
1675
1687
|
if (event.deltaMode === WheelEvent.DOM_DELTA_LINE) return event.deltaY * 16;
|
|
1676
|
-
if (event.deltaMode === WheelEvent.DOM_DELTA_PAGE) return event.deltaY *
|
|
1688
|
+
if (event.deltaMode === WheelEvent.DOM_DELTA_PAGE) return event.deltaY * pageSize2;
|
|
1677
1689
|
return event.deltaY;
|
|
1678
1690
|
}
|
|
1679
|
-
function
|
|
1680
|
-
if (
|
|
1681
|
-
return el.
|
|
1682
|
-
}
|
|
1683
|
-
function hasNestedVerticalScroll(target, root, deltaY) {
|
|
1684
|
-
let el = target instanceof HTMLElement ? target : null;
|
|
1685
|
-
while (el && el !== root) {
|
|
1686
|
-
const {
|
|
1687
|
-
overflowY
|
|
1688
|
-
} = getComputedStyle(el);
|
|
1689
|
-
if (/auto|scroll|overlay/.test(overflowY) && el.scrollHeight > el.clientHeight && canConsumeVerticalScroll(el, deltaY)) {
|
|
1690
|
-
return true;
|
|
1691
|
-
}
|
|
1692
|
-
el = el.parentElement;
|
|
1693
|
-
}
|
|
1694
|
-
return false;
|
|
1691
|
+
function canConsumeHorizontalScroll(el, deltaX) {
|
|
1692
|
+
if (deltaX < 0) return el.scrollLeft > 0;
|
|
1693
|
+
return el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
1695
1694
|
}
|
|
1696
1695
|
function isWheelFormTarget(target) {
|
|
1697
1696
|
if (!(target instanceof Element)) return false;
|
|
1698
1697
|
return !!target.closest('input, textarea, select, [contenteditable="true"], [role="spinbutton"], [role="slider"]');
|
|
1699
1698
|
}
|
|
1700
|
-
function
|
|
1701
|
-
if (!
|
|
1702
|
-
cancelAnimationFrame(wheelRafId);
|
|
1703
|
-
wheelRafId = 0;
|
|
1704
|
-
}
|
|
1705
|
-
function handleVirtualWheel(event) {
|
|
1706
|
-
const scrollEl = tableContentEl.value;
|
|
1707
|
-
if (!scrollEl || event.defaultPrevented || event.ctrlKey || event.shiftKey || !event.deltaY || Math.abs(event.deltaY) <= Math.abs(event.deltaX) || isWheelFormTarget(event.target)) {
|
|
1699
|
+
function handleHorizontalWheel(event) {
|
|
1700
|
+
if (event.defaultPrevented || event.ctrlKey || !event.shiftKey || !event.deltaY || Math.abs(event.deltaY) <= Math.abs(event.deltaX) || isWheelFormTarget(event.target)) {
|
|
1708
1701
|
return;
|
|
1709
1702
|
}
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1712
|
-
if (!
|
|
1703
|
+
const rootEl = event.currentTarget;
|
|
1704
|
+
const scrollEl = rootEl.querySelector(".t-table__content");
|
|
1705
|
+
if (!scrollEl) return;
|
|
1706
|
+
const deltaX = normalizeWheelDeltaY(event, scrollEl.clientWidth);
|
|
1707
|
+
const maxLeft = Math.max(scrollEl.scrollWidth - scrollEl.clientWidth, 0);
|
|
1708
|
+
if (!maxLeft) return;
|
|
1713
1709
|
event.preventDefault();
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
wheelRafId = requestAnimationFrame(() => {
|
|
1717
|
-
wheelRafId = 0;
|
|
1718
|
-
if (tableContentEl.value !== scrollEl) return;
|
|
1719
|
-
const maxTop = Math.max(scrollEl.scrollHeight - scrollEl.clientHeight, 0);
|
|
1720
|
-
scrollEl.scrollTop = Math.min(Math.max(scrollEl.scrollTop + wheelDeltaY, 0), maxTop);
|
|
1721
|
-
});
|
|
1710
|
+
if (!canConsumeHorizontalScroll(scrollEl, deltaX)) return;
|
|
1711
|
+
scrollEl.scrollLeft = Math.min(Math.max(scrollEl.scrollLeft + deltaX, 0), maxLeft);
|
|
1722
1712
|
}
|
|
1723
1713
|
function probeBottomBlockHeight(withDelay = true) {
|
|
1724
1714
|
if (withDelay) {
|
|
@@ -1764,18 +1754,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1764
1754
|
watch(expandedTreeNodes, adjustScrollWhenTreeExpanded, {
|
|
1765
1755
|
flush: "post"
|
|
1766
1756
|
});
|
|
1767
|
-
watch([tableContentEl, virtualWheelRafEnabled], ([el, enabled], _oldValue, onCleanup) => {
|
|
1768
|
-
if (!el || !enabled) return;
|
|
1769
|
-
el.addEventListener("wheel", handleVirtualWheel, {
|
|
1770
|
-
passive: false
|
|
1771
|
-
});
|
|
1772
|
-
onCleanup(() => {
|
|
1773
|
-
el.removeEventListener("wheel", handleVirtualWheel);
|
|
1774
|
-
clearWheelRaf();
|
|
1775
|
-
});
|
|
1776
|
-
}, {
|
|
1777
|
-
immediate: true
|
|
1778
|
-
});
|
|
1779
1757
|
watch(tableContentVisible, (visible) => {
|
|
1780
1758
|
if (!visible) return;
|
|
1781
1759
|
watchAnimatingTransformAncestor();
|
|
@@ -1825,7 +1803,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1825
1803
|
tableContentStop();
|
|
1826
1804
|
if (probeRafId) cancelAnimationFrame(probeRafId);
|
|
1827
1805
|
if (affixRefreshRafId) cancelAnimationFrame(affixRefreshRafId);
|
|
1828
|
-
clearWheelRaf();
|
|
1829
1806
|
animatingAncestorCleanup?.();
|
|
1830
1807
|
document.removeEventListener("click", handleDocumentClick);
|
|
1831
1808
|
document.removeEventListener("keydown", handleDocumentKeydown);
|
|
@@ -1904,7 +1881,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1904
1881
|
name,
|
|
1905
1882
|
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)), void 0, true)])
|
|
1906
1883
|
};
|
|
1907
|
-
})]), 1040, ["class", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-row-keys", "filter-value", "sort", "expanded-tree-nodes", "columns", "loading", "data", "pagination"])), [[unref(vResize), onResize]]);
|
|
1884
|
+
})]), 1040, ["class", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-row-keys", "filter-value", "sort", "expanded-tree-nodes", "columns", "loading", "data", "pagination"])), [[unref(vResize), onResize], [vHorizontalWheel]]);
|
|
1908
1885
|
};
|
|
1909
1886
|
}
|
|
1910
1887
|
});
|
|
@@ -4,7 +4,6 @@ import type { QdFormItemProps } from '../../form';
|
|
|
4
4
|
type TDesignServiceTableCol<D extends TableRowData> = NonNullable<TdEnhancedTableProps<D>['columns']>[number];
|
|
5
5
|
export type QdServiceTableScroll = NonNullable<TdEnhancedTableProps['scroll']> & {
|
|
6
6
|
xVirtual?: boolean;
|
|
7
|
-
wheelRaf?: boolean;
|
|
8
7
|
virtualUpdateInterval?: number;
|
|
9
8
|
};
|
|
10
9
|
export interface QdServiceTableCol<D extends TableRowData = TableRowData> extends Omit<TDesignServiceTableCol<D>, 'children' | 'foot'> {
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-6b6ac9a6] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-6b6ac9a6] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .t-upload__flow-card-area,
|
|
24
|
+
.qd-upload[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .t-upload__file-name-text {
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
}
|
|
34
|
-
.qd-upload[data-v-
|
|
34
|
+
.qd-upload[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .t-image-viewer__trigger {
|
|
43
43
|
display: none;
|
|
44
44
|
}
|
|
45
|
-
.qd-upload__popup-upload[data-v-
|
|
45
|
+
.qd-upload__popup-upload[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6] .t-upload__flow-table th:last-child,
|
|
64
|
+
.qd-upload__popup-upload--disabled[data-v-6b6ac9a6] .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-6b6ac9a6]:focus .t-upload__flow-card-area,
|
|
68
|
+
.qd-upload[data-v-6b6ac9a6]: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-6b6ac9a6] .t-upload__flow-empty,
|
|
72
|
+
.qd-upload--only-view[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
79
|
+
.qd-upload--only-view[data-v-6b6ac9a6]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
80
|
+
.qd-upload--only-view[data-v-6b6ac9a6]: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-6b6ac9a6]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
84
|
+
.qd-upload--only-view[data-v-6b6ac9a6]: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-6b6ac9a6] .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-6b6ac9a6] .t-upload__flow-table th:last-child,
|
|
92
|
+
.qd-upload--hide-progress[data-v-6b6ac9a6] .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-6b6ac9a6] .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-6b6ac9a6"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -146,7 +146,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
146
|
const tempUrlMap = /* @__PURE__ */ new WeakMap();
|
|
147
147
|
const tempModelValueSet = /* @__PURE__ */ new Set();
|
|
148
148
|
const delList = ref([]);
|
|
149
|
-
const popupFileList = computed(
|
|
149
|
+
const popupFileList = computed({
|
|
150
|
+
get: () => [...fileList.value],
|
|
151
|
+
set: (files) => {
|
|
152
|
+
fileList.value = files;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
150
155
|
const popupVisible = ref(false);
|
|
151
156
|
const multiFileViewerRef = useTemplateRef("multiFileViewer");
|
|
152
157
|
const viewerFiles = computed(
|
|
@@ -324,8 +329,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
329
|
const reImageViewerProps = { ...imageViewerProps, visible: false };
|
|
325
330
|
const handlePopupRemove = (context) => {
|
|
326
331
|
reOnRemove(context);
|
|
327
|
-
if (isEmpty(context.index)) return;
|
|
328
|
-
fileList.value.splice(context.index, 1);
|
|
329
332
|
};
|
|
330
333
|
const reOnWaitingUploadFilesChange = (context) => {
|
|
331
334
|
onWaitingUploadFilesChange?.(context);
|