Dialog
Dialog는 사용자가 특정 작업에 집중하도록 화면 중앙에 표시되는 창입니다. 주로 짧은 입력, 설정 변경, 내용 확인처럼 현재 화면을 벗어나지 않고 처리할 작업에 사용됩니다. 열려 있는 동안 뒤쪽 화면의 조작을 막아 사용자가 창 안의 작업을 먼저 마치도록 합니다.
State
Code
vue<script setup>
import { ref } from 'vue'
import { ADialog, AInput, AButton } from '@mobigen/rnd-design-system'
const open = ref(false)
</script>
<template>
<AButton variant="secondary" @click="open = true">Open Dialog</AButton>
<ADialog v-model="open" title="Edit profile" description="Make changes to your profile here.">
<AInput label="Name" model-value="Pedro Duarte" />
<template #footer="{ close }">
<AButton variant="secondary" @click="close">Cancel</AButton>
<AButton variant="primary" @click="open = false">Save changes</AButton>
</template>
</ADialog>
</template>
Props
| 속성 | 값 |
|---|
modelValue | true, false |
title | String |
description | String |
width | String |
ariaLabel | String |
closable | true, false |
showClose | true, false |
closeLabel | String |
Events
| 이벤트 | 전달 값 |
|---|
update:modelValue | false |
Slots
| 슬롯 | 전달 값 |
|---|
default | 없음 |
footer | { close } |
Notes
title도 ariaLabel도 없으면 대화상자에 접근성 이름이 붙지 않는다.