ソースを参照

修改frame组件bug

xaboy 7 年 前
コミット
d465afd9c4
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/components/Frame.php

+ 2 - 2
src/components/Frame.php

@@ -96,8 +96,8 @@ class Frame extends FormComponentDriver
     public function build()
     {
         $value = $this->value;
-        if ($this->props['maxLength'] == 1)
-            $value = is_array($value) && isset($value[0]) ? $value[0] : '';
+        if ($this->props['maxLength'] == 1 && is_array($value))
+            $value = isset($value[0]) ? $value[0] : '';
 
         return [
             'type' => $this->name,