Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
cb0a6006
Commit
cb0a6006
authored
Mar 30, 2017
by
qingwei.li
Committed by
杨奕
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Table: improveper formance for init tooltip, fixed #3836
parent
11843891
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
packages/table/src/table-body.js
packages/table/src/table-body.js
+2
-1
No files found.
packages/table/src/table-body.js
View file @
cb0a6006
import
{
getCell
,
getColumnByCell
,
getRowIdentity
}
from
'
./util
'
;
import
{
getCell
,
getColumnByCell
,
getRowIdentity
}
from
'
./util
'
;
import
{
hasClass
}
from
'
element-ui/src/utils/dom
'
;
import
ElCheckbox
from
'
element-ui/packages/checkbox
'
;
import
ElCheckbox
from
'
element-ui/packages/checkbox
'
;
import
ElTooltip
from
'
element-ui/packages/tooltip
'
;
import
ElTooltip
from
'
element-ui/packages/tooltip
'
;
import
debounce
from
'
throttle-debounce/debounce
'
;
import
debounce
from
'
throttle-debounce/debounce
'
;
...
@@ -208,7 +209,7 @@ export default {
...
@@ -208,7 +209,7 @@ export default {
// 判断是否text-overflow, 如果是就显示tooltip
// 判断是否text-overflow, 如果是就显示tooltip
const
cellChild
=
event
.
target
.
querySelector
(
'
.cell
'
);
const
cellChild
=
event
.
target
.
querySelector
(
'
.cell
'
);
if
(
cellChild
.
scrollWidth
>
cellChild
.
offsetWidth
)
{
if
(
hasClass
(
cellChild
,
'
el-tooltip
'
)
&&
cellChild
.
scrollWidth
>
cellChild
.
offsetWidth
)
{
const
tooltip
=
this
.
$refs
.
tooltip
;
const
tooltip
=
this
.
$refs
.
tooltip
;
this
.
tooltipContent
=
cell
.
innerText
;
this
.
tooltipContent
=
cell
.
innerText
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment