ant-design-vue
ant-design-vue copied to clipboard
使用a-space导致Dev环境与Prod环境结果不一致
trafficstars
相同的ISSUE #5264
Version
4.2.5
Environment
vue 3.5.7
Reproduction link
https://github.com/vueComponent/ant-design-vue/issues/5264
Steps to reproduce
<script setup>
const value = ref()
const status = ref(true)
</script>
<template>
<h2>BUG</h2>
<a-space :size="20" style="width: 100%">
<template v-if="status">
<a-input v-model:value="value" placeholder="1" />
1
</template>
<template v-if="!status">
<a-input v-model:value="value" placeholder="2" />
2
</template>
<div>
<button type="button" @click="status = !status">{{ status }}</button>
</div>
</a-space>
<h2>NO-BUG</h2>
<div :size="20" style="width: 100%">
<template v-if="status">
<a-input v-model:value="value" placeholder="1" />
1
</template>
<template v-if="!status">
<a-input v-model:value="value" placeholder="2" />
2
</template>
<div>
<button type="button" @click="status = !status">{{ status }}</button>
</div>
</div>
</template>
What is expected?
生产环境和开发环境结果一致,placeholder正常变化
What is actually happening?
生产环境和开发环境结果不一致,开发环境placeholder正常变化,生产环境placeholder不变化