Skip to content

NRadio 组件内的 NTooltip 无法正常显示提示内容 #6832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks done
move132 opened this issue Apr 3, 2025 · 0 comments · May be fixed by #6837
Open
5 tasks done

NRadio 组件内的 NTooltip 无法正常显示提示内容 #6832

move132 opened this issue Apr 3, 2025 · 0 comments · May be fixed by #6837
Labels
untriaged need to sort

Comments

@move132
Copy link

move132 commented Apr 3, 2025

描述错误

<template>
  <div class="rd-2">
    <n-radio-group v-model:value="mode" name="radiogroup">
      <n-space>
        <n-radio v-for="i in modeOptions" :key="i.value" :value="i.value">
          {{ i.label }}
          <n-tooltip placement="top">
            <template #trigger>
              <span style="color: red; font-size: 10px">提示</span>
            </template>
            <div>
              reloaded using link preload but not used within a few seconds from
              the window's load event. Pleas
            </div>
          </n-tooltip>
        </n-radio>
      </n-space>
    </n-radio-group>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { NSpace, NRadio, NRadioGroup, NTooltip } from 'naive-ui';

const mode = ref('direct');
const modeOptions = [
  { label: '直接', value: 'direct' },
  { label: '拆分', value: 'paragraph' },
];
</script>

<style scoped></style>

复现步骤

用 n-radio 包裹 n-tooltip 组件。
悬停单选框或标签区域。
预期:应显示 Tooltip 提示内容。
实际:无任何提示出现。

最小复现链接

https://stackblitz.com/edit/vitejs-vite-vbmf5fqu?file=src%2Fcomponents%2FDemo.vue

系统信息

使用的包管理器

npm

验证

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant