深圳全飞鸿

标题: fastadmin列表自定义按钮 [打印本页]

作者: f008    时间: 2025-6-9 16:36
标题: fastadmin列表自定义按钮
为实现在table栏位中添加自定义按钮,展开对应的页面信息
1.只需要在对于界面的js代码页面中的按照如下代码插入即可
  1. {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, buttons:
  2.                                 [
  3.                                     {
  4.                                         name: 'name1',
  5.                                         text:__('授权料号'),
  6.                                         title: __('授权料号'),
  7.                                         icon: 'fa fa-list',//图标
  8.                                         classname: 'btn btn-xs btn-primary btn-dialog', //btn-dialog表示为弹窗
  9.                                         url: 'barcodetemplateconfig/index?t_id={id}',
  10.                                         extend: 'data-area=\'["90%","75%"]\'',//弹窗大小
  11.                                        Fast.api.open('barcodetemplateconfig/index?t_id={id})',  __('授权'), {t_id:tmpid});
复制代码
其中的在url中填写需要展开的页面即可,注意,需要展开的页面必须在系统中存在,不然无法找到barcodetemplateconfig/index?t_id={id}中的t_id={id}为在本页面中点自定义按钮打开了barcodetemplateconfig/index的页面,为了使打开的页面的t_id与本页面相同所添加

微信截图_20250609162648.png (483.64 KB, 下载次数: 0)

微信截图_20250609162648.png





欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2