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 版本

Switch

介紹使用 Switch 元件

PreviousSelectNextTabs

Last updated 1 year ago

Was this helpful?

Switch 切換開關,通常用在開啟或關閉的功能上。

基本使用

<bpa-switch labelText="text" v-model="isOpen"/>

客製化文字

<bpa-switch labelText="text" v-model="isOpen">
  <template v-slot:close-text><img src="favicon.ico" alt=""/>Off</template>
  <template v-slot:open-text>On👍🏽</template>
</bpa-switch>

屬性

Name
Value
Type
Default
Required
Note

id

String

random

labelText

String

v-slot:close-text

String

關閉/OFF

v-slot:open-text

String

開啟/ON

事件

Name
Parameters
Desciption

change

Demo

Switch 介紹示意圖
Radio 介紹示意圖