update:table组件

This commit is contained in:
JaguarJack
2021-03-31 20:21:16 +08:00
parent 5ce104e820
commit 2ad466e617
4 changed files with 66 additions and 9 deletions

View File

@@ -12,11 +12,11 @@ trait ComponentsTrait
* @param array $options
* @return ComponentsTrait|HeaderItem
*/
public function component(string $name, string $updateField, $options = [])
public function component(string $name, string $updateField = '', $options = [])
{
$this->attributes['component'][] = [
'name' => $name,
'field' => $updateField,
'field' => $updateField ? : $this->attributes['prop'],
'options' => $options
];