From ed58f75cf5d70b721d54f5e7c39db7d8f9944089 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 8 Nov 2023 15:41:21 +0800 Subject: [PATCH] * zin-dtable: add the createAttr attribute. --- lib/zin/wg/dtable/v1.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 {