Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup ({ scrollable }, { emit }) {
provide('onClose', onClose)
function onClose () {
emit('onClose')
}
function escFullScreen (e) {
if (e.key === 'Escape') {
onClose()
}
}
function toggleOverflow (overflow) {
if (scrollable) { return }
document.body.style.overflow = overflow
}
setup() {
provide(key, store)
return {}
},
})
setup ({ rules }) {
if (rules.includes('required')) {
provide('required', true)
}
}
}
setup() {
provide(key, {
...toRefs(readonly(state)),
...computeds,
...actions,
})
return {}
},
render(h) {
export default function useGlobalFileDnD(enableProvide = false) {
const { events, hovering: dragging, cancel } = useFileDnD()
const html = document.querySelector('html')
eventNames.forEach(evt => {
useEvent(html, evt, events[evt])
})
useEvent(html, 'dragend', cancel)
enableProvide &&
provide(enableProvide !== true ? enableProvide : key, dragging)
return dragging
}
setup () {
provide('required', false)
}
}