* [refac bug #60621] Init remove btn show or not for fileselector.

This commit is contained in:
wangyidong
2025-03-19 10:42:04 +08:00
committed by 孙广明
parent b52b738a38
commit e87bb82eeb
+2 -1
View File
@@ -31,7 +31,7 @@ class fileSelector extends wg
'fileIcons?: string|array= "paper-clip"', // 文件图标。
'uploadBtn?: string|array', // 上传按钮。
'renameBtn?: bool|string|array|callback=true', // 重命名按钮。
'removeBtn?: bool|string|array|callback=true', // 删除按钮。
'removeBtn?: bool|string|array|callback', // 删除按钮。
'removeConfirm?: string|array', // 删除确认提示。
'maxFileSize?: int|string', // 限制文件大小。
'maxFileCount?: int=0', // 限制文件数目,如果设置为非大于 `0` 的数则不限制。
@@ -53,6 +53,7 @@ class fileSelector extends wg
protected function created()
{
if(!$this->hasProp('removeBtn')) $this->setProp('removeBtn', common::hasPriv('file', 'delete'));
if(!$this->hasProp('totalFileSize'))
{
$maxFileSize = ini_get('post_max_size');