first
This commit is contained in:
23
node_modules/vant/es/mixins/slots.js
generated
vendored
Normal file
23
node_modules/vant/es/mixins/slots.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 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];
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user