mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-10-29 17:08:21 +08:00
fix(table): 自定义操作按钮配置对象渲染中被就地污染,切换形态后退化为文本
This commit is contained in:
@@ -1487,6 +1487,8 @@
|
||||
},
|
||||
buildOperatHtml: function (operat, data) {
|
||||
var html = '';
|
||||
// 拷贝替代引用:后续默认值写入与格式化不得写回共享配置对象
|
||||
operat = $.extend({}, operat);
|
||||
operat.class = operat.class || '';
|
||||
operat.icon = operat.icon || '';
|
||||
operat.auth = operat.auth || 'add';
|
||||
@@ -1726,6 +1728,8 @@
|
||||
|
||||
} else if (typeof item === 'object') {
|
||||
$.each(item, function (i, operat) {
|
||||
// 拷贝替代引用:默认值写入与 url 拼接不得写回共享配置对象
|
||||
operat = $.extend({}, operat);
|
||||
operat.class = operat.class || '';
|
||||
operat.icon = operat.icon || '';
|
||||
operat.auth = operat.auth || 'add';
|
||||
|
||||
Reference in New Issue
Block a user