mirror of https://gitee.com/karson/fastadmin.git
修复Table.api.formatter.buttons和Table.api.formatter.formatter链接计算错误的BUG
parent
07a16a6797
commit
04f4107423
|
|
@ -8098,6 +8098,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|||
buttons.push({name: 'edit', icon: 'fa fa-pencil', classname: 'btn btn-xs btn-success btn-editone'});
|
||||
buttons.push({name: 'del', icon: 'fa fa-trash', classname: 'btn btn-xs btn-danger btn-delone'});
|
||||
var html = [];
|
||||
var url, classname, icon, text, title;
|
||||
$.each(buttons, function (i, j) {
|
||||
if (j.name === 'dragsort' && typeof row[Table.config.dragsortfield] === 'undefined') {
|
||||
return true;
|
||||
|
|
@ -8108,8 +8109,8 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|||
var attr = table.data("operate-" + j.name);
|
||||
if (typeof attr === 'undefined' || attr) {
|
||||
//自动加上ids
|
||||
j.url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = j.url ? Fast.api.fixurl(j.url) : 'javascript:;';
|
||||
url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = url ? Fast.api.fixurl(url) : 'javascript:;';
|
||||
classname = j.classname ? j.classname : 'btn-primary btn-' + name + 'one';
|
||||
icon = j.icon ? j.icon : '';
|
||||
text = j.text ? j.text : '';
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
|||
buttons.push({name: 'edit', icon: 'fa fa-pencil', classname: 'btn btn-xs btn-success btn-editone'});
|
||||
buttons.push({name: 'del', icon: 'fa fa-trash', classname: 'btn btn-xs btn-danger btn-delone'});
|
||||
var html = [];
|
||||
var url, classname, icon, text, title;
|
||||
$.each(buttons, function (i, j) {
|
||||
if (j.name === 'dragsort' && typeof row[Table.config.dragsortfield] === 'undefined') {
|
||||
return true;
|
||||
|
|
@ -386,8 +387,8 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
|||
var attr = table.data("operate-" + j.name);
|
||||
if (typeof attr === 'undefined' || attr) {
|
||||
//自动加上ids
|
||||
j.url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = j.url ? Fast.api.fixurl(j.url) : 'javascript:;';
|
||||
url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = url ? Fast.api.fixurl(url) : 'javascript:;';
|
||||
classname = j.classname ? j.classname : 'btn-primary btn-' + name + 'one';
|
||||
icon = j.icon ? j.icon : '';
|
||||
text = j.text ? j.text : '';
|
||||
|
|
@ -404,12 +405,13 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
|||
// 默认按钮组
|
||||
var buttons = $.extend([], this.buttons || []);
|
||||
var html = [];
|
||||
var url, classname, icon, text, title;
|
||||
$.each(buttons, function (i, j) {
|
||||
var attr = table.data("buttons-" + j.name);
|
||||
if (typeof attr === 'undefined' || attr) {
|
||||
//自动加上ids
|
||||
j.url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = j.url ? Fast.api.fixurl(j.url) : 'javascript:;';
|
||||
url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
||||
url = url ? Fast.api.fixurl(url) : 'javascript:;';
|
||||
classname = j.classname ? j.classname : 'btn-primary btn-' + name + 'one';
|
||||
icon = j.icon ? j.icon : '';
|
||||
text = j.text ? j.text : '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue