ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

ConfigProvider's component-size property will lose efficacy if we set the input component's allowClear property to true

Open ylyly opened this issue 3 years ago • 2 comments
trafficstars

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.6

Environment

MacOS:12.4,Chrome: 103.0.5060.114,Vue:3.2.37

Reproduction link

https://codesandbox.io/s/dazzling-voice-uknmi6?file=/src/components/Demo1.vue

Steps to reproduce

sample code:

<template>
<div style="width:500px;">
<a-radio-group v-model:value="componentSize">
<a-radio-button value="small">Small</a-radio-button>
<a-radio-button value="middle">Middle</a-radio-button>
<a-radio-button value="large">Large</a-radio-button>
</a-radio-group>
<a-divider />

<a-config-provider :component-size="componentSize">
<a-form :model="formState" >
<a-form-item label="标题1">
<a-input v-model:value="formState.name1" />
</a-form-item>
<a-form-item label="标题2">
<a-input v-model:value="formState.name2" allowClear />
</a-form-item>
<a-form-item name="timeRange" label="时间范围">
<a-date-picker placeholder="" v-model:value="formState.beginTime" valueFormat="YYYY-MM-DD 00:00:01" />to
<a-form-item-rest >
<a-date-picker placeholder="" v-model:value="formState.endTime" valueFormat="YYYY-MM-DD 23:59:59"/>
</a-form-item-rest>
</a-form-item>
</a-form>
</a-config-provider>

</div>


</template>
<script >
import { defineComponent, reactive, ref } from 'vue';


export default defineComponent({
setup() {
const formState = reactive({
name1:'bbbccc',
name2: 'aaaa',
beginTime:null,
endTime:null,
type: [],
desc: ''
});
const componentSize = ref('small');

return {
formState,
componentSize,
};
},
});
</script>

What is expected?

click the radio-button will cause all form item to change with same size.

What is actually happening?

input component with allowClear property do not change size.

ylyly avatar Jul 19 '22 02:07 ylyly

windows 10 \ chrome 103.0.5060.114 \ vue 3.2.37 \ ant-design-vue 3.2.10 下也存在此问题

qingyuun avatar Jul 19 '22 08:07 qingyuun

you can use 3.3.0-beta+

tangjinzhou avatar Jul 24 '22 01:07 tangjinzhou

3.3.0-beta2验证已修复

ylyly avatar Sep 11 '22 00:09 ylyly

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Sep 11 '23 00:09 github-actions[bot]