You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/switch/demo/size.vue

39 lines
597 B

<docs>
---
order: 3
title:
zh-CN: 两种大小
en-US: Two sizes
---
## zh-CN
`size="small"` 表示小号开关
## en-US
`size="small"` represents a small sized switch.
</docs>
<template>
<div>
<a-switch v-model:checked="checked1" />
<br />
<a-switch v-model:checked="checked2" size="small" />
</div>
</template>
<script lang="ts">
import { defineComponent, reactive, toRefs } from 'vue';
export default defineComponent({
setup() {
const state = reactive({
checked1: true,
checked2: false,
});
return { ...toRefs(state) };
},
});
</script>