其他分享
首页 > 其他分享> > FastAdmin表格中添加操作按钮

FastAdmin表格中添加操作按钮

作者:互联网

{
                            field: 'buttons',
                            width: "120px",
                            title: __('试题'),
                            table: table,
                            events: Table.api.events.operate,
                            buttons: [
                                {
                                    name: 'detail',
                                    text: __('考试试题'),
                                    title: __('考试试题'),
                                    classname: 'btn btn-xs btn-primary btn-dialog',
                                    icon: 'fa fa-list',
                                    url: 'exam/exam_item/index',
                                    callback: function (data) {
                                        Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
                                    },
                                    visible: function (row) {
                                        //返回true时按钮显示,返回false隐藏
                                        return true;
                                    }
                                },
                            ],
                            formatter: Table.api.formatter.buttons
                        },

 

标签:__,试题,表格,title,buttons,api,FastAdmin,按钮,btn
来源: https://www.cnblogs.com/catyxiao/p/15958732.html