-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialog component + change vue file typings
- Loading branch information
Showing
4 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<dialog class="modal" ref="dialog"> | ||
<div class="modal-box max-w-full flex flex-col"> | ||
<div class="flex flex-col flex-1 min-h-0"> | ||
<h3 class="font-bold text-lg"> | ||
<slot name="header" /> | ||
</h3> | ||
|
||
<div class="overflow-auto"> | ||
<slot /> | ||
</div> | ||
</div> | ||
|
||
<div class="modal-action"> | ||
<form method="dialog"> | ||
<vscode-button type="submit">Close</vscode-button> | ||
</form> | ||
</div> | ||
</div> | ||
</dialog> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from "vue"; | ||
const dialog = ref<HTMLDialogElement>(); | ||
function showDialog(): void { | ||
dialog.value.showModal(); | ||
} | ||
defineExpose({ | ||
showDialog, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
declare module '*.vue' { | ||
import { defineComponent } from 'vue'; | ||
export default defineComponent; | ||
declare module "*.vue" { | ||
import { DefineComponent } from "vue"; | ||
const component: DefineComponent<{}, {}, any>; | ||
export default component; | ||
} |