UNPKG

mt-ui-components-vue3

Version:

玛果添实UI组件库(Vue3)

20 lines 696 B
import 'vue'; export function getSlot(slots, props) { var prop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; if (props[prop] === false) { // force not render return false; } return props[prop] || slots[prop]; } export function getSlotVNode(slots, props) { var _slots$prop; var prop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; if (props[prop] === false) { return false; } return props[prop] || ((_slots$prop = slots[prop]) === null || _slots$prop === void 0 ? void 0 : _slots$prop.call(slots)); } export var isPromise = function isPromise(fn) { return !!fn && typeof fn.then === 'function'; };