qidian-shared 1.0.34 → 1.0.36
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/hooks/index.d.ts +1 -0
- package/dist/hooks/useTplRefsList.d.ts +5 -0
- package/dist/qidian-shared.cjs.js +13 -0
- package/dist/qidian-shared.cjs.js.map +1 -1
- package/dist/qidian-shared.es.js +14 -1
- package/dist/qidian-shared.es.js.map +1 -1
- package/dist/qidian-shared.umd.js +13 -0
- package/dist/qidian-shared.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -13105,6 +13105,18 @@ function useProxy() {
|
|
|
13105
13105
|
}
|
|
13106
13106
|
return instance.proxy;
|
|
13107
13107
|
}
|
|
13108
|
+
function useTplRefsList(onBeforeUpdateClear = true) {
|
|
13109
|
+
const refs = vue.ref([]);
|
|
13110
|
+
refs.value.set = (el, index) => {
|
|
13111
|
+
if (!el) return;
|
|
13112
|
+
if (isEmpty(index)) refs.value.push(el);
|
|
13113
|
+
else refs.value[index] = el;
|
|
13114
|
+
};
|
|
13115
|
+
vue.onBeforeUpdate(() => {
|
|
13116
|
+
if (onBeforeUpdateClear) refs.value.length = 0;
|
|
13117
|
+
});
|
|
13118
|
+
return refs;
|
|
13119
|
+
}
|
|
13108
13120
|
function useTimer(type = "timeout") {
|
|
13109
13121
|
const timer = vue.ref(null);
|
|
13110
13122
|
const clearTimer = () => {
|
|
@@ -13186,6 +13198,7 @@ exports.useProxy = useProxy;
|
|
|
13186
13198
|
exports.useServiceLoadMore = useServiceLoadMore;
|
|
13187
13199
|
exports.useServicePagination = useServicePagination;
|
|
13188
13200
|
exports.useTimer = useTimer;
|
|
13201
|
+
exports.useTplRefsList = useTplRefsList;
|
|
13189
13202
|
exports.validator = validator;
|
|
13190
13203
|
exports.validatorRegs = validatorRegs;
|
|
13191
13204
|
exports.valueFillter = valueFillter;
|