Skip to content
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

feat(directiveComponent): create new composable #17395

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

kieuminhcanh
Copy link
Member

The useDirectiveComponent directive is a powerful utility that allows you to render Vue components dynamically and mount them to DOM elements using directives. It simplifies the process of creating and managing dynamic components in your Vue applications.

<template>
  <v-btn v-tooltip-directive="{ text: 'This is dynamic tooltip' }">Hello</v-btn>
</template>

<script setup>
  import { useDirectiveComponent } from "vuetify/composables/directiveComponent";

  const vTooltipDirective = useDirectiveComponent('VTooltip', { activator: 'parent' });
</script>

@johnleider johnleider changed the base branch from master to dev May 17, 2023 02:37
@johnleider johnleider changed the title Add useDirectiveComponent composable feat(useDirectiveComponent): create new composable May 17, 2023
@johnleider johnleider changed the title feat(useDirectiveComponent): create new composable feat(directiveComponent): create new composable May 17, 2023
@KaelWD KaelWD force-pushed the feat/directives-component branch from b14cc6f to eab8a17 Compare May 17, 2023 09:22
@johnleider johnleider added this to the v3.x.x milestone May 17, 2023
Copy link
Member Author

@kieuminhcanh kieuminhcanh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I've got error with your update. You can try my demo. I also realize that useLayoutItem called before provide(VuetifyLayoutKey, {...}) finish in layout.ts.

@johnleider johnleider merged commit 6c9eb7a into vuetifyjs:dev Aug 17, 2023
blalan05 pushed a commit that referenced this pull request Oct 28, 2023
Co-authored-by: Kael <kaelwd@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants