qidian-vue-ui 1.0.73 → 1.0.75
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/types.d.ts +5 -2
- package/dist/{en-US-Bn_vxxsU.js → en-US-B1cQ1yLB.js} +2 -2
- package/dist/{en-US-Bn_vxxsU.js.map → en-US-B1cQ1yLB.js.map} +1 -1
- package/dist/{en-US-eFFubRMn.mjs → en-US-CvOwuGrd.mjs} +2 -2
- package/dist/{en-US-eFFubRMn.mjs.map → en-US-CvOwuGrd.mjs.map} +1 -1
- package/dist/{index-CIDRZ5Z2.js → index-BaW5qmGW.js} +108 -9
- package/dist/{index-CIDRZ5Z2.js.map → index-BaW5qmGW.js.map} +1 -1
- package/dist/{index-DJv7PdD8.mjs → index-CtGgmcHz.mjs} +108 -9
- package/dist/{index-DJv7PdD8.mjs.map → index-CtGgmcHz.mjs.map} +1 -1
- package/dist/qidian-vue-ui.css +8 -8
- package/dist/qidian-vue-ui.js +1 -1
- package/dist/qidian-vue-ui.mjs +1 -1
- package/dist/{zh-TW-BSOP99L6.mjs → zh-TW-BN9Qqcf5.mjs} +2 -2
- package/dist/{zh-TW-BSOP99L6.mjs.map → zh-TW-BN9Qqcf5.mjs.map} +1 -1
- package/dist/{zh-TW-DX8ooDaX.js → zh-TW-DuWUTXX9.js} +2 -2
- package/dist/{zh-TW-DX8ooDaX.js.map → zh-TW-DuWUTXX9.js.map} +1 -1
- package/package.json +1 -1
|
@@ -12021,8 +12021,8 @@ const QdConfigProvider = defineComponent({
|
|
|
12021
12021
|
watchEffect(async () => {
|
|
12022
12022
|
const localeMap = {
|
|
12023
12023
|
"zh-CN": () => Promise.resolve().then(() => zhCN$1),
|
|
12024
|
-
"zh-TW": () => import("./zh-TW-
|
|
12025
|
-
"en-US": () => import("./en-US-
|
|
12024
|
+
"zh-TW": () => import("./zh-TW-BN9Qqcf5.mjs"),
|
|
12025
|
+
"en-US": () => import("./en-US-CvOwuGrd.mjs")
|
|
12026
12026
|
};
|
|
12027
12027
|
const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
|
|
12028
12028
|
const [err, res] = await to(
|
|
@@ -14642,6 +14642,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14642
14642
|
} = useConfig("crud");
|
|
14643
14643
|
const tableRef = useTemplateRef("table");
|
|
14644
14644
|
const treeLoadIds = ref([]);
|
|
14645
|
+
const scrollRecord = {
|
|
14646
|
+
top: 0,
|
|
14647
|
+
left: 0
|
|
14648
|
+
};
|
|
14645
14649
|
const reProps = computed(() => {
|
|
14646
14650
|
const {
|
|
14647
14651
|
service,
|
|
@@ -14671,6 +14675,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14671
14675
|
selectOnRowClick,
|
|
14672
14676
|
expandOnRowClick,
|
|
14673
14677
|
tree,
|
|
14678
|
+
onScroll,
|
|
14674
14679
|
...tableOptions
|
|
14675
14680
|
} = props;
|
|
14676
14681
|
const reTableOptions = tableOptions;
|
|
@@ -14810,13 +14815,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14810
14815
|
}
|
|
14811
14816
|
}
|
|
14812
14817
|
const reSelectOnRowClick = selectOnRowClick ?? (!expandOnRowClick && !reTree?.expandTreeNodeOnClick);
|
|
14818
|
+
const reOnScroll = (params) => {
|
|
14819
|
+
onScroll?.(params);
|
|
14820
|
+
const target = params.e.target;
|
|
14821
|
+
if (!target) return;
|
|
14822
|
+
const {
|
|
14823
|
+
scrollTop,
|
|
14824
|
+
scrollLeft
|
|
14825
|
+
} = target;
|
|
14826
|
+
scrollRecord.top = scrollTop;
|
|
14827
|
+
scrollRecord.left = scrollLeft;
|
|
14828
|
+
};
|
|
14813
14829
|
return {
|
|
14814
14830
|
tableOptions: {
|
|
14815
14831
|
...reTableOptions,
|
|
14816
14832
|
columns: reColumns,
|
|
14817
14833
|
selectOnRowClick: reSelectOnRowClick,
|
|
14818
14834
|
expandOnRowClick,
|
|
14819
|
-
tree: reTree
|
|
14835
|
+
tree: reTree,
|
|
14836
|
+
onScroll: reOnScroll
|
|
14820
14837
|
},
|
|
14821
14838
|
externalLoad: loading2,
|
|
14822
14839
|
serviceOptions: {
|
|
@@ -14885,6 +14902,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14885
14902
|
if (index2 === -1) return;
|
|
14886
14903
|
treeLoadIds.value.splice(index2, 1);
|
|
14887
14904
|
}
|
|
14905
|
+
function resumeScrollRecord() {
|
|
14906
|
+
const el = tableRef.value?.$el;
|
|
14907
|
+
if (!el) return;
|
|
14908
|
+
const scrollEl = el.querySelector(".t-table__content");
|
|
14909
|
+
if (!scrollEl) return;
|
|
14910
|
+
const {
|
|
14911
|
+
scrollTop,
|
|
14912
|
+
scrollLeft
|
|
14913
|
+
} = scrollEl;
|
|
14914
|
+
const {
|
|
14915
|
+
top,
|
|
14916
|
+
left
|
|
14917
|
+
} = scrollRecord;
|
|
14918
|
+
if (top === scrollTop && left === scrollLeft) return;
|
|
14919
|
+
scrollEl.scrollTo({
|
|
14920
|
+
top,
|
|
14921
|
+
left
|
|
14922
|
+
});
|
|
14923
|
+
}
|
|
14888
14924
|
const expose = {
|
|
14889
14925
|
tableLoad,
|
|
14890
14926
|
firstLoad,
|
|
@@ -14902,6 +14938,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14902
14938
|
onMounted(() => {
|
|
14903
14939
|
Object.assign(expose, tableRef.value);
|
|
14904
14940
|
});
|
|
14941
|
+
onActivated(() => {
|
|
14942
|
+
resumeScrollRecord();
|
|
14943
|
+
});
|
|
14905
14944
|
__expose(expose);
|
|
14906
14945
|
return (_ctx, _cache) => {
|
|
14907
14946
|
return openBlock(), createBlock(unref(EnhancedTable), mergeProps({
|
|
@@ -14942,7 +14981,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14942
14981
|
};
|
|
14943
14982
|
}
|
|
14944
14983
|
});
|
|
14945
|
-
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
14984
|
+
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-3b89ba8f"]]);
|
|
14946
14985
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
14947
14986
|
...{
|
|
14948
14987
|
name: "QdServiceList"
|
|
@@ -14952,11 +14991,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14952
14991
|
data: {},
|
|
14953
14992
|
loading: { type: Boolean },
|
|
14954
14993
|
loadingProps: {},
|
|
14994
|
+
scroll: {},
|
|
14955
14995
|
asyncLoading: {},
|
|
14956
14996
|
footer: {},
|
|
14957
14997
|
header: {},
|
|
14958
14998
|
layout: {},
|
|
14959
|
-
scroll: {},
|
|
14960
14999
|
size: {},
|
|
14961
15000
|
split: { type: Boolean },
|
|
14962
15001
|
stripe: { type: Boolean },
|
|
@@ -14977,6 +15016,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14977
15016
|
const { data } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
|
|
14978
15017
|
const { t } = useConfig("crud");
|
|
14979
15018
|
const listRef = useTemplateRef("list");
|
|
15019
|
+
let scrollTopRecord = 0;
|
|
14980
15020
|
const reProps = computed(() => {
|
|
14981
15021
|
const {
|
|
14982
15022
|
service,
|
|
@@ -14991,12 +15031,17 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14991
15031
|
data: data2,
|
|
14992
15032
|
loading: externalLoad,
|
|
14993
15033
|
asyncLoading: externalAsyncLoad,
|
|
15034
|
+
scroll,
|
|
14994
15035
|
...listOptions
|
|
14995
15036
|
} = props;
|
|
14996
15037
|
return {
|
|
15038
|
+
scrollTarget: scroll?.target,
|
|
14997
15039
|
externalLoad,
|
|
14998
15040
|
externalAsyncLoad,
|
|
14999
|
-
listOptions
|
|
15041
|
+
listOptions: {
|
|
15042
|
+
...listOptions,
|
|
15043
|
+
scroll
|
|
15044
|
+
},
|
|
15000
15045
|
serviceOptions: {
|
|
15001
15046
|
service,
|
|
15002
15047
|
manual,
|
|
@@ -15050,13 +15095,56 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
15050
15095
|
return "";
|
|
15051
15096
|
});
|
|
15052
15097
|
function onScroll({
|
|
15098
|
+
scrollTop,
|
|
15053
15099
|
scrollBottom
|
|
15054
15100
|
}) {
|
|
15101
|
+
scrollTopRecord = scrollTop;
|
|
15055
15102
|
if (loading.value || noMore.value || scrollBottom > (reProps.value.listOptions.scroll?.rowHeight ?? 100)) {
|
|
15056
15103
|
return;
|
|
15057
15104
|
}
|
|
15058
15105
|
loadMore();
|
|
15059
15106
|
}
|
|
15107
|
+
function getScrollTargetEl() {
|
|
15108
|
+
const { scrollTarget } = reProps.value;
|
|
15109
|
+
if (!scrollTarget) return null;
|
|
15110
|
+
if (typeof scrollTarget !== "string") return scrollTarget;
|
|
15111
|
+
return document.querySelector(scrollTarget);
|
|
15112
|
+
}
|
|
15113
|
+
function onTargetScroll(evt) {
|
|
15114
|
+
const { scrollHeight, clientHeight, scrollTop } = evt.target;
|
|
15115
|
+
const scrollBottom = scrollHeight - clientHeight - scrollTop;
|
|
15116
|
+
onScroll({ scrollTop, scrollBottom });
|
|
15117
|
+
}
|
|
15118
|
+
function addListerTarget() {
|
|
15119
|
+
const el = getScrollTargetEl();
|
|
15120
|
+
if (!el) return;
|
|
15121
|
+
removeListerTarget();
|
|
15122
|
+
el.addEventListener("scroll", onTargetScroll);
|
|
15123
|
+
}
|
|
15124
|
+
function removeListerTarget() {
|
|
15125
|
+
const el = getScrollTargetEl();
|
|
15126
|
+
if (!el) return;
|
|
15127
|
+
el.removeEventListener("scroll", onTargetScroll);
|
|
15128
|
+
}
|
|
15129
|
+
function resumeScrollTopRecord() {
|
|
15130
|
+
let el = getScrollTargetEl();
|
|
15131
|
+
if (!el) el = listRef.value?.$el;
|
|
15132
|
+
if (!el) return;
|
|
15133
|
+
const { scrollTop } = el;
|
|
15134
|
+
const currentScrollTopRecord = scrollTopRecord;
|
|
15135
|
+
if (currentScrollTopRecord === scrollTop) return;
|
|
15136
|
+
const core2 = () => {
|
|
15137
|
+
el.scrollTo({ top: currentScrollTopRecord });
|
|
15138
|
+
setTimeout(() => {
|
|
15139
|
+
if (!el) return;
|
|
15140
|
+
const { scrollTop: scrollTop2, scrollHeight } = el;
|
|
15141
|
+
if (scrollHeight < currentScrollTopRecord) return;
|
|
15142
|
+
if (scrollTop2 >= currentScrollTopRecord) return;
|
|
15143
|
+
core2();
|
|
15144
|
+
});
|
|
15145
|
+
};
|
|
15146
|
+
core2();
|
|
15147
|
+
}
|
|
15060
15148
|
const expose = {
|
|
15061
15149
|
data: serviceData,
|
|
15062
15150
|
firstLoad,
|
|
@@ -15073,8 +15161,19 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
15073
15161
|
mutate
|
|
15074
15162
|
};
|
|
15075
15163
|
onMounted(() => {
|
|
15164
|
+
addListerTarget();
|
|
15076
15165
|
Object.assign(expose, listRef.value);
|
|
15077
15166
|
});
|
|
15167
|
+
onActivated(() => {
|
|
15168
|
+
resumeScrollTopRecord();
|
|
15169
|
+
addListerTarget();
|
|
15170
|
+
});
|
|
15171
|
+
onDeactivated(() => {
|
|
15172
|
+
removeListerTarget();
|
|
15173
|
+
});
|
|
15174
|
+
onBeforeUnmount(() => {
|
|
15175
|
+
removeListerTarget();
|
|
15176
|
+
});
|
|
15078
15177
|
__expose(expose);
|
|
15079
15178
|
return (_ctx, _cache) => {
|
|
15080
15179
|
const _directive_loading = resolveDirective("loading");
|
|
@@ -15108,7 +15207,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
15108
15207
|
};
|
|
15109
15208
|
}
|
|
15110
15209
|
});
|
|
15111
|
-
const QdServiceList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
15210
|
+
const QdServiceList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-7fcb430a"]]);
|
|
15112
15211
|
const qdDictConvStrSeparator = ",";
|
|
15113
15212
|
const qdDictSelectProps = {
|
|
15114
15213
|
showArrow: true,
|
|
@@ -17480,11 +17579,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
17480
17579
|
type: Boolean
|
|
17481
17580
|
},
|
|
17482
17581
|
loadingProps: {},
|
|
17582
|
+
scroll: {},
|
|
17483
17583
|
asyncLoading: {},
|
|
17484
17584
|
footer: {},
|
|
17485
17585
|
header: {},
|
|
17486
17586
|
layout: {},
|
|
17487
|
-
scroll: {},
|
|
17488
17587
|
size: {},
|
|
17489
17588
|
split: {
|
|
17490
17589
|
type: Boolean
|
|
@@ -18865,4 +18964,4 @@ export {
|
|
|
18865
18964
|
qdFormGutter as y,
|
|
18866
18965
|
qdFormGrid as z
|
|
18867
18966
|
};
|
|
18868
|
-
//# sourceMappingURL=index-
|
|
18967
|
+
//# sourceMappingURL=index-CtGgmcHz.mjs.map
|