Skip to content
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

fix(comp:text): native tooltip should show when not ellipsised #1709

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ exports[`Text > tag work 2`] = `
`;

exports[`Text > tooltip work 1`] = `
"<div class=\\"ix-text\\"><span class=\\"ix-text-inner\\" title=\\"@idux 是一套企业级中后台 UI 组件库, 致力于提供高效愉悦的开发体验。 基于 Vue 3.x + TypeScript 开发,
全部代码开源并遵循 MIT 协议,任何企业、组织及个人均可免费使用。\\">@idux 是一套企业级中后台 UI 组件库, 致力于提供高效愉悦的开发体验。 基于 Vue 3.x + TypeScript 开发,
"<div class=\\"ix-text\\"><span class=\\"ix-text-inner\\">@idux 是一套企业级中后台 UI 组件库, 致力于提供高效愉悦的开发体验。 基于 Vue 3.x + TypeScript 开发,
全部代码开源并遵循 MIT 协议,任何企业、组织及个人均可免费使用。<!----></span>
<!---->
<!---->
Expand Down
2 changes: 1 addition & 1 deletion packages/components/text/demo/Tooltip.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<IxRadioGroup v-model:value="tooltip" :dataSource="radios"></IxRadioGroup>
<div style="width: 280px; margin-top: 16px">
<IxText :tooltip="tooltip">
<IxText ellipsis :tooltip="tooltip">
@idux是一套企业级中后台UI组件库, 致力于提供高效愉悦的开发体验。
<template #title>
@idux是一套企业级中后台UI组件库, 致力于提供高效愉悦的开发体验。
Expand Down
2 changes: 1 addition & 1 deletion packages/components/text/src/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default defineComponent({
<Tag
ref={innerRef}
class={`${prefixCls}-inner`}
title={isNative ? getStringBySlot(titleSlot) : undefined}
title={isNative && isEllipsis.value ? getStringBySlot(titleSlot) : undefined}
onClick={expandable.value && !hasExpandIcon ? toggleExpanded : undefined}
{...attrs}
>
Expand Down