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/segmented/demo/block.vue

34 lines
607 B

<docs>
---
order: 1
title:
zh-CN: Block分段控制器
en-US: Block Segmented
---
## zh-CN
`block` 属性使其适合父元素宽度
## en-US
`block` property will make the `Segmented` fit to its parent width.
</docs>
<template>
<a-segmented v-model:value="value" block :options="data" />
</template>
<script lang="ts">
import { defineComponent, reactive, ref } from 'vue';
export default defineComponent({
setup() {
const data = reactive([123, 456, 'longtext-longtext-longtext-longtext']);
const value = ref(data[0]);
return {
data,
value,
};
},
});
</script>