arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Switch

介紹使用 Switch 元件

Switch 介紹示意圖

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

hashtag
基本使用

hashtag
客製化文字

hashtag
屬性

Name
Value
Type
Default
Required
Note

hashtag
事件

Name
Parameters
Desciption

hashtag
Demo

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

String

v-slot:close-text

String

關閉/OFF

v-slot:open-text

String

開啟/ON

id

String

random

labelText

change

Radio 介紹示意圖

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