Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mine-core/src/Abstracts/AbstractMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class AbstractMapper
use MapperTrait;

/**
* @var MineModel
* @var class-string|MineModel
*/
public $model;

Expand Down
2 changes: 1 addition & 1 deletion src/mine-core/src/Traits/MapperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function delete(array $ids): bool
$this->model::destroy($ids);

$manager = ApplicationContext::getContainer()->get(Manager::class);
$manager->destroy($ids, $this->model::class);
$manager->destroy($ids, $this->model);

return true;
}
Expand Down
7 changes: 3 additions & 4 deletions src/mine-generator/src/VueIndexGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public function getShortBusinessName(): string
public function getComponentType(int $type): string
{
return match ($type) {
1 => "'modal'",
2 => "'drawer'",
3 => "'tag'",
default => "'modal'"
Expand Down Expand Up @@ -221,7 +220,7 @@ protected function getOptions(): string
$options['operationColumn'] = false;
$options['operationColumnWidth'] = 160;
$options['formOption'] = [
'viewType' => $this->tablesContract->getComponentType()->value,
'viewType' => "'{$this->tablesContract->getComponentType()}'",
'width' => 600,
];
if ($this->tablesContract->getComponentType() === ComponentTypeEnum::TAG) {
Expand Down Expand Up @@ -332,7 +331,7 @@ protected function getColumns(): string
$tmp['dict'] = ['data' => $collection, 'translation' => true];
}
// 对日期时间处理
if ($column->view_type == 'date' && $column->options['mode'] == 'date') {
if ($column->view_type === 'date' && $column->options['mode'] === 'date') {
unset($tmp['mode']);
if (isset($column->options['range']) && $column->options['range']) {
$tmp['formType'] = 'range';
Expand All @@ -350,7 +349,7 @@ protected function getColumns(): string
];
}
// 密码处理
if ($column->view_type == 'password') {
if ($column->view_type === 'password') {
$tmp['type'] = 'password';
}
// 允许查看字段的角色(前端还待支持)
Expand Down
1 change: 0 additions & 1 deletion src/mine-helpers/src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Mine\Helper\AppVerify;
use Mine\Helper\LoginUser;
use Mine\MineCollection;
use Mine\MineRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
Expand Down