ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
## 数据导入页面地址 > 图片演示: ![](https://img.kancloud.cn/d7/c5/d7c5c1a584d331896def0852f523820c_1920x903.png) ![](https://img.kancloud.cn/d1/0a/d10a73a057a4e6f7c7b81862d1323cca_1920x903.png) > 说明: 设置数据导入页面地址。 > 注意!依赖cols的设置(移动端暂不支持数据导入) 方法:`import($import)` * 参数 **import** (必须),例: * 类型一:callable 闭包,例: ```php // state设置时$state为状态key值,其余情况为null import(function($state){ return "http://xxx.com/xxx.html"; }); ``` * 类型二:string,例: ```php import("http://xxx.com/xxx.html"); > 提示:该方法调用后,表格`defaultToolbar`属性会默认增加数据导入按钮。数据导入完成后表格数据会自动刷新。 > 示例: ~~~ $builder=YT('general_example')->import(function($state){ return url("demo/importDemo/index"); }) ~~~