-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more convenient way for vue
#2
Comments
what means the |
For now in vue, there are only 2 ways to enable this:
But it's still not convenient enough, you still have to import and call With vue directives, we can do update to the element precisely, this can also reduce DOM scanning, as well as better type hints. So, maybe finally we can register import { vCursorPlugin, IpadCursorConfig } from "ipad-mouse/vue"
const config: IpadCursorConfig = {}
app.use(vCursorPlugin, config) Then use it directly in <script setup>
</script>
<template>
<!-- detect css display type to decide text | block -->
<div v-cursor></div>
<!-- block -->
<div v-cursor="'block'" />
<!-- text -->
<div v-cursor="'text'" />
<!-- override style -->
<div v-cursor="{ ? }" />
</template> It will be more important to design the API than implementing this |
thanks your explanation! |
Yay, feel free to contribute a react implementation! |
v-cursor
directiveIpadCursorProvider
,IpadCursor
The text was updated successfully, but these errors were encountered: