You are reading docs for v1.3.1, click here for the latest version.
PromptDialog

This is an overview of the most common usage of PromptDialog. For more information about the available properties, methods, or events, head over to the complete API documentation for PromptDialog.

PromptDialog는 사용자의 인풋을 요구할 수 있게 해줍니다.


const dialogs = require('ui/dialogs')

module.exports = {
  mounted() {
    dialogs.prompt('How are you?', 'Amazing!')
    .then(result => {
      console.log(`Dialog result: ${result.result}, text: ${result.text}`)
    })
  }
}

PromptDialog 는 전역적으로 사용할 수 있기 때문에, 다이얼로그 모듈에서 임포트하는 대신, 다음과 같이 간단히 호출할 수 있습니다.

prompt('How are you?', 'Amazing!')
.then(result => {
  console.log(`Dialog result: ${result.result}, text: ${result.text}`)
})

여러분의 코드 어디에서라도 말이죠.

Contributors