汪总电商平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.3 KiB

4 weeks ago
"use strict";define(["jquery","bootstrap","backend","table","form"],function(e,t,a,n,c){var l={select:function(){n.api.init({extend:{index_url:"wanlshop/icon/select"}});var t=[],c=e("#table");c.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table",function(a,n){"check"==a.type||"uncheck"==a.type?n=[n]:t=[],e.each(n,function(e,n){if(a.type.indexOf("uncheck")>-1){var c=t.indexOf(n.class);c>-1&&t.splice(c,1)}else-1==t.indexOf(n.class)&&t.push(n.class)})}),c.bootstrapTable({url:e.fn.bootstrapTable.defaults.extend.index_url,sortName:"id",showToggle:!1,showExport:!1,columns:[[{field:"state",checkbox:!0},{field:"class",title:__("Class")},{field:"class",title:__("Icon"),formatter:l.api.formatter.icon},{field:"name",title:__("Name")},{field:"operate",title:__("Operate"),events:{"click .btn-chooseone":function(e,t,n,c){var l=a.api.query("multiple");l="true"==l,Fast.api.close({name:n.class,multiple:l})}},formatter:function(){return'<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> '+__("Choose")+"</a>"}}]]}),e(document).on("click",".btn-choose-multi",function(){var e=a.api.query("multiple");e="true"==e,Fast.api.close({name:t.join(","),multiple:e})}),n.api.bindevent(c)},api:{formatter:{icon:function(e,t,a){return'<span><i class="wlIcon '+e+'"></i></span>'}}}};return l});