Anyon e634118a22 refactor(plugin): 迁移 v8 插件化组件体系
将 v6 中直接放在本地 app 的后台与微信能力迁移为 v8 插件组件,并把运行时基础能力沉淀到独立插件包。

主要内容:

- 新增 think-library、system、worker、static、install 等基础插件包。

- 新增 account、payment、wechat-client、wechat-service、wemall、wuma 等业务插件包。

- 移除 v6 的 app/admin 与 app/wechat 本地应用实现,改由插件分发接管。

- 将 Helper 能力彻底并入 System,统一为 plugin\system\helper\* 命名空间。

- 同步插件迁移发布清单与根 route 占位,保证安装发布流程可复现。
2026-05-08 15:30:46 +08:00

41 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace think\admin\builder\form;
/**
* 表单动作定义器.
* @class FormActions
*/
class FormActions
{
public function __construct(private FormBuilder $builder, private FormActionBar $parent)
{
}
public function submit(string $name = '保存数据', string $confirm = '', array $attrs = [], string $class = ''): self
{
$this->builder->addSubmitButtonToNode($this->parent, $name, $confirm, $attrs, $class);
return $this;
}
public function cancel(string $name = '取消编辑', string $confirm = '确定要取消编辑吗?', array $attrs = [], string $class = 'layui-btn-danger'): self
{
$this->builder->addCancelButtonToNode($this->parent, $name, $confirm, $attrs, $class);
return $this;
}
public function button(string $name, string $type = 'button', string $confirm = '', array $attrs = [], string $class = ''): self
{
$this->builder->addActionButtonToNode($this->parent, $name, $type, $confirm, $attrs, $class);
return $this;
}
public function html(string $html, array $schema = []): self
{
$this->builder->addButtonHtmlToNode($this->parent, $html, $schema);
return $this;
}
}