yanzhen-design-vue
Version:
28 lines (27 loc) • 521 B
JavaScript
import { useSlots, computed, ref, onMounted } from "vue";
import { omit } from "lodash-es";
function useModal(props, emit) {
const $slots = useSlots();
const slotKeys = computed(() => Object.keys($slots));
const zIndex = ref();
const config = {
zIndex
};
const modalProps = computed(() => {
return omit(props, ...Object.keys(config));
});
const ctx = {
slotKeys,
modalProps
};
const methods = {};
onMounted(() => {
});
return {
ctx,
methods
};
}
export {
useModal
};