Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
a89186de
Commit
a89186de
authored
Mar 25, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/3月迭代' into dev
parents
4c11c017
2c25df71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
salutatory.vue
src/views/enterprise/salutatory.vue
+30
-4
No files found.
src/views/enterprise/salutatory.vue
View file @
a89186de
...
@@ -25,11 +25,15 @@
...
@@ -25,11 +25,15 @@
<el-button
type=
"primary"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
<el-button
type=
"primary"
@
click=
"changeRoute"
>
新建欢迎语
</el-button>
</div>
</div>
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%' }" v-loading="loading">
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%' }" v-loading="loading">
<el-table-column
prop=
"title"
label=
"标题"
width=
"200"
show-overflow-tooltip
>
<el-table-column
prop=
"title"
label=
"标题"
width=
"200"
>
<template
slot-scope=
"
{ row }">
<div
ref=
"title"
slot-scope=
"
{ row }">
{{
row
.
title
}}
<!-- 算出文本的长度,再设置 -->
<el-tooltip
placement=
"top"
:content=
"row.title"
v-if=
"row.isOverflow"
>
<span
class=
"title-text"
>
{{
row
.
title
}}
</span>
</el-tooltip>
<span
v-else
>
{{
row
.
title
}}
</span>
<el-tag
size=
"mini"
v-if=
"row.defaultWelcomeFlag == 1"
>
默认欢迎语
</el-tag>
<el-tag
size=
"mini"
v-if=
"row.defaultWelcomeFlag == 1"
>
默认欢迎语
</el-tag>
</
template
>
</
div
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"welcomeContent"
label=
"内容"
show-overflow-tooltip
min-width=
"200"
>
<el-table-column
prop=
"welcomeContent"
label=
"内容"
show-overflow-tooltip
min-width=
"200"
>
<template
slot-scope=
"
{ row }">
{{
row
.
welcomeContent
}}
</
template
>
<template
slot-scope=
"
{ row }">
{{
row
.
welcomeContent
}}
</
template
>
...
@@ -235,6 +239,20 @@ export default {
...
@@ -235,6 +239,20 @@ export default {
});
});
}
}
});
});
this
.
$nextTick
(()
=>
{
const
span
=
document
.
createElement
(
'span'
);
span
.
style
.
position
=
'fixed'
;
span
.
style
.
opacity
=
0
;
span
.
style
.
visibility
=
'hidden'
;
const
maxWidth
=
this
.
$refs
.
title
.
offsetWidth
-
85
;
this
.
tableData
.
map
(
el
=>
{
span
.
innerHTML
=
el
.
title
;
document
.
body
.
appendChild
(
span
);
el
.
isOverflow
=
span
.
offsetWidth
>
maxWidth
;
return
el
;
});
document
.
body
.
removeChild
(
span
);
});
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
...
@@ -254,6 +272,14 @@ export default {
...
@@ -254,6 +272,14 @@ export default {
};
};
</
script
>
</
script
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
<
style
type=
"text/scss"
lang=
"scss"
scoped
>
.title-text
{
display
:
inline-block
;
vertical-align
:
middle
;
max-width
:
calc
(
100%
-
85px
);
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.warp
{
.warp
{
background
:
#fff
;
background
:
#fff
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
...
...
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