Skip to content

Commit

Permalink
feat: useTemplateRef
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Oct 15, 2024
1 parent 31ff639 commit 3fe645e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pages/table.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import DialogConfirm from '~/components/DialogConfirm.vue'
import type { DataTableHeaders } from '~/plugins/vuetify'
definePageMeta({
Expand All @@ -9,7 +8,7 @@ definePageMeta({
})
const search = ref('')
const dialogDelete = ref<InstanceType<typeof DialogConfirm> | null>(null)
const dialogDelete = useTemplateRef('dialogDelete')
function showDialogDelete(name: string) {
dialogDelete.value
?.open('Are you sure you want to delete this dessert?')
Expand Down

0 comments on commit 3fe645e

Please sign in to comment.