2024-08-02 18:19:39 +08:00

11 lines
313 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSlot = getSlot;
function getSlot(instance, slotName = 'default', fallback = []) {
const slots = instance.$slots;
const slot = slots[slotName];
if (slot === undefined)
return fallback;
return slot();
}