diff --git a/src/UI/Elm/Components/Upload.php b/src/UI/Elm/Components/Upload.php index 19a65e5..42d94cb 100644 --- a/src/UI/Elm/Components/Upload.php +++ b/src/UI/Elm/Components/Upload.php @@ -96,7 +96,7 @@ public function data(array $data) protected function getPlaceHolder() { - return '请上传' . $this->field; + return '请上传' . $this->title; } public function createValidate() diff --git a/src/UI/Iview/Components/Switches.php b/src/UI/Iview/Components/Switches.php index 095a150..4deb1e8 100644 --- a/src/UI/Iview/Components/Switches.php +++ b/src/UI/Iview/Components/Switches.php @@ -76,9 +76,8 @@ public function closeStr($close) */ public function getRule() { - $rule = parent::getRule(); - if (isset($rule['props']['slot']) && !count($rule['props']['slot'])) unset($rule['props']['slot']); - return $rule; + if (isset($this->props['slot']) && !count($this->props['slot'])) unset($this->props['slot']); + return parent::getRule(); } public function createValidate()