浮动提示方法tooltip支持弹窗

pull/141/head
RuoYi 5 years ago
parent 0ebd155be4
commit a3e946b57e

@ -181,10 +181,10 @@
$.btTable.on('click', '.tooltip-show', function() {
var target = $(this).data('target');
var input = $(this).prev();
if ($.common.equals("0", target)) {
if ($.common.equals("copy", target)) {
input.select();
document.execCommand("copy");
} else if ($.common.equals("1", target)) {
} else if ($.common.equals("open", target)) {
parent.layer.alert(input.val(), {
title: "信息内容",
shadeClose: true,
@ -214,12 +214,12 @@
var pageNumber = table.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 列超出指定长度浮动提示target=0单击文本复制不弹窗target=1弹窗打开
// 列超出指定长度浮动提示 targetcopy单击复制文本 open弹窗打开文本
tooltip: function (value, length, target) {
var _length = $.common.isEmpty(length) ? 20 : length;
var _text = "";
var _value = $.common.nullToStr(value);
var _target = $.common.isEmpty(target) ? '0' : target;
var _target = $.common.isEmpty(target) ? 'copy' : target;
if (_value.length > _length) {
_text = _value.substr(0, _length) + "...";
_value = _value.replace(/\'/g,"");

@ -111,7 +111,7 @@
title: '备注',
align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value, 10, 1);
return $.table.tooltip(value, 10, "open");
}
},
{

Loading…
Cancel
Save