UNPKG

zly-vant-ui

Version:

Mobile UI Components built on Vue

24 lines (23 loc) 528 B
"use strict"; exports.__esModule = true; exports.SlotsMixin = void 0; /** * Use scopedSlots in Vue 2.6+ * downgrade to slots in lower version */ var SlotsMixin = exports.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]; } } };