본문으로 건너뛰기

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 ​

속성값
modelValuetrue, false
titleString
descriptionString
widthString
ariaLabelString
closabletrue, false
showClosetrue, false
closeLabelString

Events ​

이벤트전달 값
update:modelValuefalse

Slots ​

슬롯전달 값
default없음
footer{ close }

Notes ​

  • title도 ariaLabel도 없으면 대화상자에 접근성 이름이 붙지 않는다.