mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-04 13:08:48 +08:00
9be58078d2
* feat(demo): A-B * feat(demo): update B-checkbox * feat(demo): update CheckBox -DatePicker * feat(demo): update DatePicker - Form * feat(demo): update Form - List * feat(demo): update List-pagination * feat(demo): update List - skeleton * feat(demo): update skeleton - switch * feat(demo): update skeleton - switch * feat(demo): update switch - upload * feat(demo): update watermark * fix(demo): del hashId
71 lines
1.3 KiB
Vue
71 lines
1.3 KiB
Vue
<docs>
|
|
---
|
|
order: 11
|
|
title:
|
|
zh-CN: 后缀图标
|
|
en-US: Suffix
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
基本使用。
|
|
|
|
## en-US
|
|
|
|
Basic Usage
|
|
|
|
</docs>
|
|
|
|
<template>
|
|
<a-space>
|
|
<a-select
|
|
v-model:value="value1"
|
|
style="width: 120px"
|
|
:options="options1"
|
|
@change="handleChange"
|
|
>
|
|
<template #suffixIcon><smile-outlined class="ant-select-suffix" /></template>
|
|
</a-select>
|
|
<a-select v-model:value="value2" style="width: 120px" disabled :options="options2">
|
|
<template #suffixIcon><meh-outlined class="ant-select-suffix" /></template>
|
|
</a-select>
|
|
</a-space>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { SmileOutlined, MehOutlined } from '@ant-design/icons-vue';
|
|
import type { SelectProps } from 'ant-design-vue';
|
|
import { ref } from 'vue';
|
|
|
|
const handleChange = (value: string) => {
|
|
console.log(`selected ${value}`);
|
|
};
|
|
|
|
const options1 = ref<SelectProps['options']>([
|
|
{
|
|
value: 'jack',
|
|
label: 'Jack',
|
|
},
|
|
{
|
|
value: 'lucy',
|
|
label: 'Lucy',
|
|
},
|
|
{
|
|
value: 'disabled',
|
|
label: 'Disabled',
|
|
disabled: true,
|
|
},
|
|
{
|
|
value: 'yiminghe',
|
|
label: 'Yiminghe',
|
|
},
|
|
]);
|
|
const options2 = ref<SelectProps['options']>([
|
|
{
|
|
value: 'lucy',
|
|
label: 'Lucy',
|
|
},
|
|
]);
|
|
const value1 = ref('lucy');
|
|
const value2 = ref('lucy');
|
|
</script>
|