Skip to content

nuxt4下 a-rate 在 a-modal 中使用无法显示 #8436

@limou-sc

Description

@limou-sc
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

"@ant-design-vue/nuxt": "^1.4.6", "ant-design-vue": "^4.2.6", "nuxt": "^4.2.2", "vue": "^3.5.25",

Reproduction link

https://github.com/limou-sc/test-antdv/tree/master

Steps to reproduce

  1. 在 Modal 组件内使用 组件
  2. 首次加载页面,打开 Modal 组件不可见
  3. 修改 Modal 组件代码并保存(触发热更新)
  4. 有时 会显示,有时不会
  5. 刷新页面 再次不可见
<template>
<div>
<NuxtRouteAnnouncer />
<a-rate :value="4" disabled />
<br />
<a-button type="primary" @click="showModal">Open Modal</a-button>
<a-modal v-model:open="open" title="Basic Modal" @ok="handleOk">
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
<!-- 不显示 -->
<a-rate :value="5" disabled />
<p>11111111111</p>
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const open = ref<boolean>(false);

const showModal = () => {
open.value = true;
};

const handleOk = (e: MouseEvent) => {
console.log(e);
open.value = false;
};
</script>

What is expected?

在 modal 中可正常使用 rate 组件

What is actually happening?

a-rate 在 a-modal 中使用无法显示,修改modal组件内的内容后热更新有时会显示,刷新页面后又不显示

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions