Piman
  • Piman 無障礙網頁前端 UI 框架
  • 關於 Piman
  • 常見問答
  • Vue3 版本
    • 設計系統
  • Vue2 版本
    • 設計系統
    • 快速開始
    • Accordion
    • Breadcrumb
    • Buttons
    • Cards
    • Checkbox
    • Dialog
    • Dropdown
    • Form
    • Input
    • Message
    • Pagination
    • Popover
    • Radio
    • Select
    • Switch
    • Tabs
    • Tooltip
    • Tree
  • 更新日誌
  • 成為貢獻者,一起開發 Piman
    • Vue2
      • i18n
      • CSS & SCSS
      • Update
      • Develope Component
Powered by GitBook
On this page
  • 基本使用
  • 客製化標頭、尾
  • 點擊外面遮罩時,不關閉對話框
  • 屬性
  • Demo

Was this helpful?

Export as PDF
  1. Vue2 版本

Dialog

介紹使用 Dialog 對話框元件

PreviousCheckboxNextDropdown

Last updated 1 year ago

Was this helpful?

Dialog 是網頁與使用者一種強烈的互動,這個元件顯示後,將會吸引使用者所有的注意力,所以一般會用在非常重要的地方,或是想讓使用者完全專心的情境之下。

基本使用

<bpa-button @click="isBpaDialogVisible = true">
  Open Dialog
</bpa-button>

<bpa-dialog :visible.sync="isBpaDialogVisible">
  Content
</bpa-dialog>

客製化標頭、尾

<bpa-dialog
  :visible.sync="isBpaDialogVisible"
  header="custom header text"
  footer="custom footer text"
>
  Content
</bpa-dialog>
<bpa-dialog
  :visible.sync="isBpaDialogVisible"
>
  <template v-slot:header>
    <mark>custom header Html</mark>
  </template>
  Content
  <template v-slot:footer>
    <mark>custom footer Html</mark>
  </template>
</bpa-dialog>

點擊外面遮罩時,不關閉對話框

<bpa-dialog :clickoutside="false">
  Cotnent
</bpa-dialog>

屬性

Name
Value
Type
Default
Required
Note

id

String

random

header

{ text } or template

String

footer

{ text } or template

String

visible

Boolean

false

clickoutside

Boolean

true

Demo

Dialog 介紹示意圖