mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: remove slots mixin
This commit is contained in:
parent
a0725b942d
commit
96c7aa15b8
@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Use scopedSlots in Vue 2.6+
|
|
||||||
* downgrade to slots in lower version
|
|
||||||
*/
|
|
||||||
export const SlotsMixin = {
|
|
||||||
methods: {
|
|
||||||
slots(name = 'default', props) {
|
|
||||||
const { $slots, $scopedSlots } = this;
|
|
||||||
const scopedSlot = $scopedSlots[name];
|
|
||||||
|
|
||||||
if (scopedSlot) {
|
|
||||||
return scopedSlot(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $slots[name];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
Loading…
x
Reference in New Issue
Block a user