Skip to content

Commit

Permalink
fix(comp:text): native tooltip should show when not ellipsised
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Oct 7, 2023
1 parent 5afea2f commit a82c4af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
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

0 comments on commit a82c4af

Please sign in to comment.