4 Commits

Author SHA1 Message Date
wolfcode
7a4fd01c4c Update composer.json 2025-04-01 11:28:50 +08:00
wolfcode
de07c44890 Update Admin.php 2025-03-27 20:14:06 +08:00
wolfcode
bc03616e43 refactor(admin): refactor model generation and improve array string handling
- Update CommonTool to fix array string formatting issue- Refactor model generation template to use getOptions method
2025-03-27 14:58:32 +08:00
wolfcode
8aba56c8c2 🚀 Layui v2.10.1 2025-03-27 11:22:43 +08:00
7 changed files with 17 additions and 10 deletions

View File

@@ -124,7 +124,7 @@ class Admin extends AdminController
}
$save ? $this->success('保存成功') : $this->error('保存失败');
}
$row->auth_ids = explode(',', $row->auth_ids ?: '');
// $row->auth_ids = explode(',', $row->auth_ids ?: '');
$this->assign('row', $row);
return $this->fetch();
}

View File

@@ -7,11 +7,14 @@ use app\common\model\TimeModel;
class {{modelName}} extends TimeModel
{
protected $name = "{{table}}";
protected $table = "{{prefix_table}}";
protected $deleteTime = {{deleteTime}};
protected function getOptions(): array
{
return [
'name' => "{{table}}",
'table' => "{{prefix_table}}",
'deleteTime' => {{deleteTime}},
];
}
public array $notes = {{selectArrays}};

View File

@@ -100,6 +100,9 @@ class CommonTool
{
$arrayString = str_replace('array (', '[', $arrayString);
$arrayString = str_replace(')', ']', $arrayString);
$arrayString = str_replace('=>
[', '=> [', $arrayString);
return $arrayString;
}
}

View File

@@ -22,7 +22,7 @@
"require": {
"php": ">=8.1.0",
"topthink/framework": "^8.0",
"topthink/think-orm": "^4.0",
"topthink/think-orm": "4.0.3",
"topthink/think-multi-app": "^1.1.0",
"topthink/think-view": "^2.0",
"topthink/think-captcha": "^3.0",

View File

@@ -1023,8 +1023,9 @@ define(["jquery", "tableSelect", "miniTheme", "xmSelect", "lazyload"], function
maxmin: true,
anim: 0,
moveOut: true,
move: false,
shade: 0.3,
shadeClose: shadeClose,
scrollbar: false,
before: function () {
},
success: function (layero, index) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long