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
                        },

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM