Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e7b00978
authored
Feb 12, 2025
by
Netfan
Committed by
GitHub
Feb 12, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: width for ellipsisText tooltip in popover content (#5517)
* 修复省略文本用在气泡中时,提示弹出层的宽度计算有误的问题
1 parent
52622333
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
packages/effects/common-ui/src/components/ellipsis-text/ellipsis-text.vue
packages/effects/common-ui/src/components/ellipsis-text/ellipsis-text.vue
View file @
e7b0097
...
@@ -5,6 +5,8 @@ import { computed, ref, watchEffect } from 'vue';
...
@@ -5,6 +5,8 @@ import { computed, ref, watchEffect } from 'vue';
import
{
VbenTooltip
}
from
'@vben-core/shadcn-ui'
;
import
{
VbenTooltip
}
from
'@vben-core/shadcn-ui'
;
import
{
useElementSize
}
from
'@vueuse/core'
;
interface
Props
{
interface
Props
{
/**
/**
* 是否启用点击文本展开全部
* 是否启用点击文本展开全部
...
@@ -78,11 +80,13 @@ const ellipsis = ref();
...
@@ -78,11 +80,13 @@ const ellipsis = ref();
const
isExpand
=
ref
(
false
);
const
isExpand
=
ref
(
false
);
const
defaultTooltipMaxWidth
=
ref
();
const
defaultTooltipMaxWidth
=
ref
();
const
{
width
:
eleWidth
}
=
useElementSize
(
ellipsis
);
watchEffect
(
watchEffect
(
()
=>
{
()
=>
{
if
(
props
.
tooltip
&&
el
lipsis
.
value
)
{
if
(
props
.
tooltip
&&
el
eWidth
.
value
)
{
defaultTooltipMaxWidth
.
value
=
defaultTooltipMaxWidth
.
value
=
props
.
tooltipMaxWidth
??
el
lipsis
.
value
.
offsetWidth
+
24
;
props
.
tooltipMaxWidth
??
el
eWidth
.
value
+
24
;
}
}
},
},
{
flush
:
'post'
},
{
flush
:
'post'
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment