table columns

Is it the first column checkbox
checkbox:true,

Field name, if associated query is enabled, aliases can be used here, such as category.name, please note that the fields returned by the server have a one-to-one correspondence. If a field that does not exist is used, no data will be rendered
field:'name'

Field title, the title displayed in the head
title:'名称'

General search operators, see the introduction to general search above for details
operate:'='
用于查询时的操作符,默认为=,为false表示禁用此字段的通用搜索,支持!=、LIKE、NOT LIKE、>、<、>=<=、FIND_IN_SET、IN、NOT IN、BETWEEN、NOT BETWEEN、RANGE、NOT RANGE、NULL、NOT NULL、false

Whether the field is visible, it will be invisible by default when it is false
visible:false

To format the displayed content, FastAdmin defines many common formatting methods
formatter: Table.api.formatter.search`

Define the event the element responds to
events:Table.api.events.operate

Define the data of the general search drop-down list
searchList: {"value1":'选项1' "value2":'选项2', "value3":'选项3'}or
searchList: $.getJSON("ajax/dynamicselect")

Extra for universal search text box or drop-down list
addclass:

Types of general search text boxes
classtype:

Extra attributes for general search text box or drop-down list
data:

Format the displayed content
formatter:Table.api.formatter.search

Table.api.formatter.iconQuickly render the field into a button, only the Fontawesome button is supported. Quickly
Table.api.formatter.imagerender the field into a picture display form.
Table.api.formatter.imagesQuickly render the field into a multi-picture display form. Please ,separate the field data.
Table.api.formatter.statusQuickly render the field into a state. The default normal/hidden/deleted/lockedfour states
Table.api.formatter.urlQuickly render the field into a URL box
Table.api.formatter.searchQuickly render the field into a searchable link, click it to perform the search
Table.api.formatter.addtabsQuickly render the field into a link that can be added to the tab, click it to add the link to the tab, and
Table.api.formatter.flagquickly render the field into a logo , Only supports index/hot/recommend/newthese four flags.
Table.api.formatter.labelQuickly render the field to the Label label.
Table.api.formatter.datetimeQuickly render the timestamp data into date and time data. The
Table.api.formatter.operateoperation bar fixed button
Table.api.formatter.buttonsQuickly generate multiple buttons
Table.api.formatter.toggleQuickly generate the switch button

Button

buttons:[{
    
    
  	  name: 'log',
      title: '更新域名',
      text: '更新域名',
      icon: 'fa fa-list',
      classname: 'btn btn-primary btn-xs btn-click',
      click: function (e, data) {
    
    
          $.ajax({
    
    
              url:"Cdn/update_domain/account_id/"+data.id,
              success:function (data) {
    
    
                  console.log(data)
              }
          })
      }
  },{
    
    }
]
···

Guess you like

Origin blog.csdn.net/lows_H/article/details/111030204