mirror of https://gitee.com/karson/fastadmin.git
Compare commits
4 Commits
1a8f81cc35
...
feed46823f
| Author | SHA1 | Date |
|---|---|---|
|
|
feed46823f | |
|
|
cc4c0ab3ed | |
|
|
ddccd51105 | |
|
|
6d82e89ff6 |
|
|
@ -201,16 +201,20 @@ class Addon extends Command
|
|||
new \RecursiveDirectoryIterator($addonDir), \RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
$addonDir = str_replace(DS, '/', $addonDir);
|
||||
$excludeDirRegex = "/\/(\.git|\.svn|\.vscode|\.idea|unpackage)\//i";
|
||||
foreach ($files as $name => $file) {
|
||||
if (!$file->isDir()) {
|
||||
$filePath = $file->getRealPath();
|
||||
$relativePath = str_replace(DS, '/', substr($filePath, strlen($addonDir)));
|
||||
if (!in_array($file->getFilename(), ['.git', '.DS_Store', 'Thumbs.db'])) {
|
||||
$zip->addFile($filePath, $relativePath);
|
||||
}
|
||||
$filePath = str_replace(DS, '/', $file->getPathname());
|
||||
if ($file->isDir() || preg_match($excludeDirRegex, $filePath))
|
||||
continue;
|
||||
$relativePath = substr($filePath, strlen($addonDir));
|
||||
if (!in_array($file->getFilename(), ['.DS_Store', 'Thumbs.db'])) {
|
||||
$zip->addFile($filePath, $relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
$output->info("Package Resource Path:" . $addonFile);
|
||||
$output->info("Package Successed!");
|
||||
break;
|
||||
case 'move':
|
||||
|
|
|
|||
|
|
@ -268,13 +268,13 @@ class Backend extends Controller
|
|||
$op = $this->request->get("op", '', 'trim');
|
||||
$sort = $this->request->get("sort", !empty($this->model) && $this->model->getPk() ? $this->model->getPk() : 'id');
|
||||
$order = $this->request->get("order", "DESC");
|
||||
$offset = $this->request->get("offset/d", 0);
|
||||
$limit = $this->request->get("limit/d", 0);
|
||||
$offset = max(0, $this->request->get("offset/d", 0));
|
||||
$limit = max(0, $this->request->get("limit/d", 0));
|
||||
$limit = $limit ?: 999999;
|
||||
//新增自动计算页码
|
||||
$page = $limit ? intval($offset / $limit) + 1 : 1;
|
||||
if ($this->request->has("page")) {
|
||||
$page = $this->request->get("page/d", 1);
|
||||
$page = max(0, $this->request->get("page/d", 1));
|
||||
}
|
||||
$this->request->get([config('paginate.var_page') => $page]);
|
||||
$filter = (array)json_decode($filter, true);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap'], function ($, undefined) {
|
||||
define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table', 'bootstrap-table-lang', 'bootstrap-table-export', 'bootstrap-table-commonsearch', 'bootstrap-table-template', 'bootstrap-table-jumpto', 'bootstrap-table-fixed-columns'], function ($, undefined) {
|
||||
var Table = {
|
||||
list: {},
|
||||
// Bootstrap-table 基础配置
|
||||
|
|
|
|||
Loading…
Reference in New Issue