Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
yaru
fgqyxxlr
Commits
e7a0f973
Commit
e7a0f973
authored
Jul 11, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增列超出指定长度浮动提示(单击文本复制列)
parent
2b20edef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+12
-2
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
e7a0f973
...
...
@@ -169,6 +169,12 @@
window
.
open
(
src
);
}
});
// 单击tooltip复制文本
$
.
btTable
.
on
(
'click'
,
'.tooltip-show'
,
function
()
{
var
input
=
$
(
this
).
prev
();
input
.
select
();
document
.
execCommand
(
"copy"
);
});
},
// 当所有数据被加载时触发
onLoadSuccess
:
function
(
data
)
{
...
...
@@ -190,14 +196,18 @@
var
pageNumber
=
table
.
pageNumber
;
return
pageSize
*
(
pageNumber
-
1
)
+
index
+
1
;
},
// 列超出指定长度浮动提示
// 列超出指定长度浮动提示
(单击文本复制列)
tooltip
:
function
(
value
,
length
)
{
var
_length
=
$
.
common
.
isEmpty
(
length
)
?
20
:
length
;
var
_text
=
""
;
var
_value
=
$
.
common
.
nullToStr
(
value
);
if
(
_value
.
length
>
_length
)
{
_text
=
_value
.
substr
(
0
,
_length
)
+
"..."
;
return
$
.
common
.
sprintf
(
"<a href='#' class='tooltip-show' data-toggle='tooltip' title='%s'>%s</a>"
,
_value
,
_text
);
_value
=
_value
.
replace
(
/
\'
/g
,
"’"
);
var
actions
=
[];
actions
.
push
(
$
.
common
.
sprintf
(
'<input id="tooltip-show" style="opacity: 0;position: absolute;z-index:-1" type="text" value="%s"/>'
,
_value
));
actions
.
push
(
$
.
common
.
sprintf
(
"<a href='###' class='tooltip-show' data-toggle='tooltip' title='%s'>%s</a>"
,
_value
,
_text
));
return
actions
.
join
(
''
);
}
else
{
_text
=
_value
;
return
_text
;
...
...
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