feat:增加lay-upload可选关闭分片上传

This commit is contained in:
Ying
2023-04-25 22:17:09 +08:00
parent 128d0a5d49
commit d92041ddac
2 changed files with 6 additions and 3 deletions

View File

@@ -381,8 +381,10 @@ class BaseController
$columns = Db::query("SHOW FULL COLUMNS FROM {$table}");
$titles = array_column($columns, 'Comment', 'Field');
$data = $this->model->limit($limit)->page($page)->select()->toArray();
if (empty($data)) {
return $this->error('没有可导出的数据!');
}
$folder = date('Y-m-d', time());
// 使用表注释为文件名称
$tableInfo = Db::query("SHOW TABLE STATUS LIKE '{$table}'");
$Comment = $tableInfo[0]['Comment'] ?: '数据_';