http://www.xueh188.top/index.php/archives/28/

{
                            field: 'buttons',
                            width: "120px",
                            title: __('  '),
                            table: table,
                            events: Table.api.events.operate,
                            buttons: [
                                {
                                    name: 'review',
                                    text: __('    '),
                                    title: __('    '),
                                    classname: 'btn btn-sm btn-primary btn-dialog btn-review',
                                    icon: 'fa fa-diamond',
                                    url: 'Withdrawals/review',
                                    visible: function (row) {
                                        //  true     ,  false  
                                        //console.log(row);
                                        if(row.status==1 && row.group==2 ){
                                            return true;
                                        }else {
                                            return false;
                                        }

                                    }
                                },
                                {
                                    name: 'pay',
                                    text: __('  '),
                                    title: __('  '),
                                    classname: 'btn btn-sm btn-success btn-dialog btn-pay',
                                    icon: 'fa fa-credit-card',
                                    url: 'Withdrawals/pay',
                                    visible: function (row) {
                                        //  true     ,  false  
                                        //console.log(row);
                                        if(row.status==2 && row.pay_status==0 && row.group==2 ){
                                            return true;
                                        }else {
                                            return false;
                                        }

                                    }
                                },
                                {
                                    name: 'detail',
                                    text: __('  '),
                                    title: __('  '),
                                    classname: 'btn btn-sm btn-info btn-dialog btn-detail',
                                    icon: 'fa fa-file-text-o',
                                    url: 'Withdrawals/detail',
                                    visible: function (row) {
                                        //  true     ,  false  
                                        return true;

                                    }
                                },
                            ],
                            formatter: Table.api.formatter.buttons,operate:false
                        }

좋은 웹페이지 즐겨찾기