The fastadmin framework background table enables automatic refresh function

The fastadmin background table framework bootstrap table does not enable its own automatic refresh plug-in by default. It needs to be opened manually. Record it

  1. First modify the file \public\assets\js\require-backend.js
    insert image description here
    as shown in the figure, and add the code in the first place
'bootstrap-table-auto-refresh': '../libs/bootstrap-table/dist/extensions/auto-refresh/bootstrap-table-auto-refresh',

insert image description here
The second new code:

        'bootstrap-table-auto-refresh': {
    
    
            deps: ['bootstrap-table'],
            exports: '$.fn.bootstrapTable.defaults'
        },
  1. Then modify the file public\assets\jsrequire-table.js
    insert image description here
    to add
'bootstrap-table-auto-refresh',

Finally, enable the automatic refresh function for the table in the curd resource file \public\assets\js\backend* user *.js generated by yourself . The specific parameters can be found at https://www.bootstrap-table.com.cn/doc/extensions/ auto-refresh/ View modification

insert image description here

If
in \application\config.php

'app_debug'              => Env::get('app.debug', true),

The production environment is enabled, remember to use the command

php think min -m backend -r all

Repackage the backend resource file once

Guess you like

Origin blog.csdn.net/meinaozi/article/details/116205015