This commit is contained in:
commie
2026-01-08 05:42:44 +08:00
parent 7439a4a794
commit c153975eed
1976 changed files with 776 additions and 133 deletions
+11 -2
View File
@@ -1066,8 +1066,17 @@ define(['jquery', 'bootstrap', 'moment', 'bootstrap-table', 'bootstrap-table-lan
if (typeof this.disable !== "undefined") {
disable = typeof this.disable === "function" ? this.disable.call(this, value, row, index) : this.disable;
}
return '<label data-toggle="tooltip" title="' + __('点击切换') + '" class="lyear-switch switch-success switch-light btn-change ' + (disable ? 'btn disabled no-padding' : '') + '" data-index="' + index + '" data-id="'
+ row[pk] + '" ' + (url ? "data-url='" + url + "'" : "") + (confirm ? "data-confirm='" + confirm + "'" : "") + ' data-params="' + this.field + "=" + (value == yes ? no : yes) + '"><input type="checkbox" '+(value ? 'checked' : '')+'><span></span></label>';
return '<label data-toggle="tooltip" '
+'title="' + __('点击切换') + '" '
+'class="lyear-switch switch-success switch-light btn-change ' + (disable ? 'btn disabled no-padding' : '') + '" '
+'data-index="' + index + '" '
+'data-id="'+ row[pk] + '" '
+ (url ? "data-url='" + url + "'" : "")
+ (confirm ? "data-confirm='" + confirm + "'" : "")
+ ' data-params="' + this.field + "=" + (value == yes ? no : yes) + '">'
+'<input type="checkbox" '+(value ? 'checked' : '')+'>'
+'<i title="开启|关闭"></i>'
+'</label>';
},
normal: function (value, row, index) {
var colorArr = ["primary", "success", "danger", "warning", "info", "gray", "red", "yellow", "aqua", "blue", "navy", "teal", "olive", "lime", "fuchsia", "purple", "maroon"];