处理数据看板

This commit is contained in:
2026-01-16 04:34:39 +08:00
parent 345ee6dbb0
commit 74679328e9
113 changed files with 1984 additions and 5744 deletions

View File

@@ -5565,6 +5565,42 @@ function findScopedSlotInvoker(vueId, instance) {
parent = parent.parent;
}
}
function withScopedSlot(fn, { name, path, vueId }) {
const instance = getCurrentInstance();
fn.path = path;
const scopedSlots = instance.$ssi || (instance.$ssi = {});
const invoker = scopedSlots[vueId] || (scopedSlots[vueId] = createScopedSlotInvoker(instance));
if (!invoker.slots[name]) {
invoker.slots[name] = {
fn
};
} else {
invoker.slots[name].fn = fn;
}
return getValueByDataPath(instance.ctx.$scope.data, path);
}
function createScopedSlotInvoker(instance) {
const invoker = (slotName, args, index2) => {
const slot = invoker.slots[slotName];
if (!slot) {
return;
}
const hasIndex = typeof index2 !== "undefined";
index2 = index2 || 0;
const prevInstance = setCurrentRenderingInstance(instance);
const data = slot.fn(args, slotName + (hasIndex ? "-" + index2 : ""), index2);
const path = slot.fn.path;
setCurrentRenderingInstance(prevInstance);
(instance.$scopedSlotsData || (instance.$scopedSlotsData = [])).push({
path,
index: index2,
data
});
instance.$updateScopedSlots();
};
invoker.slots = {};
return invoker;
}
function setRef(ref2, id, opts = {}) {
const { $templateRefs } = getCurrentInstance();
$templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f });
@@ -5572,6 +5608,7 @@ function setRef(ref2, id, opts = {}) {
const o = (value, key) => vOn(value, key);
const f = (source, renderItem) => vFor(source, renderItem);
const r = (name, props, key) => renderSlot(name, props, key);
const w = (fn, options) => withScopedSlot(fn, options);
const s = (value) => stringifyStyle(value);
const e = (target, ...sources) => extend(target, ...sources);
const n = (value) => normalizeClass(value);
@@ -8396,5 +8433,6 @@ exports.toRef = toRef;
exports.toRefs = toRefs;
exports.unref = unref;
exports.useSlots = useSlots;
exports.w = w;
exports.watch = watch;
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map