diff --git a/lib/zin/wg/dtable/v1.php b/lib/zin/wg/dtable/v1.php index 2a5f648006..69f94667cf 100644 --- a/lib/zin/wg/dtable/v1.php +++ b/lib/zin/wg/dtable/v1.php @@ -14,6 +14,7 @@ class dtable extends wg 'emptyTip?:string', // 表格数据源为空时显示的文本 'createTip?:string', // 表格数据源为空时的创建文本 'createLink?:array|string', // 表格数据源为空时的创建链接 + 'createAttr?:string', // 表格数据源为空时的创建链接属性 ); static $dtableID = 0; @@ -202,8 +203,9 @@ class dtable extends wg { if(!empty($createLink)) { - $createTip = $this->prop('createTip', $lang->create); - $emptyTip = array('html' => "
$emptyTip
$createTip", 'className' => 'row gap-4 items-center'); + $createTip = $this->prop('createTip', $lang->create); + $createAttr = $this->prop('createAttr', ''); + $emptyTip = array('html' => "
$emptyTip
$createTip", 'className' => 'row gap-4 items-center'); } else {