You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
448 B

/**
* Use scopedSlots in Vue 2.6+
* downgrade to slots in lower version
*/
export var SlotsMixin = {
methods: {
slots: function slots(name, props) {
if (name === void 0) {
name = 'default';
}
var $slots = this.$slots,
$scopedSlots = this.$scopedSlots;
var scopedSlot = $scopedSlots[name];
if (scopedSlot) {
return scopedSlot(props);
}
return $slots[name];
}
}
};