2.0.3 • Published 5 months ago

@wu-component/wu-switch v2.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Switch 开关

表示两种相互对立的状态间的切换,多用于触发「开/关」。

基础用法

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-switch value="true" id="switchId"></wu-plus-switch>
    </div>
</template>
<script>
</script>

:::

自定义颜色

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-switch value="true" id="switchId1" active-color="yellow" inactive-color="red"></wu-plus-switch>
    </div>
</template>
<script>
</script>

:::

禁用

::: demo

<template>
    <div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
        <wu-plus-switch value="false" disabled="true" id="switchId1"></wu-plus-switch>
    </div>
</template>
<script>
</script>

:::

Attributes

参数说明类型可选值默认值
value是否打开Booleantrue、false--
disabled禁用Booleantrue、falsefalse
activeColor激活的颜色String--#409EFF
inactiveColor未激活的颜色String--#C0CCDA
width宽度Number--40
nameswitch 对应的 name 属性String----

Event

事件名说明参数
change值修改(event: CustomEvent) => void
input输入值(event: CustomEvent) => void
2.0.3

5 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.11.8

1 year ago

1.11.6

1 year ago

1.11.4

1 year ago

1.10.1

1 year ago

1.9.24

2 years ago

1.9.21

2 years ago

1.9.20

2 years ago

1.9.17

2 years ago

1.9.1

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.0.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago