@@ -1014,16 +1014,12 @@ public function upload($name = 'avatar', $options = [], $value = '')
10141014 $ li = '' ;
10151015 $ croper_container = '' ;
10161016 if (isset ($ options ['cropper ' ])) {
1017- $ options ['width ' ] = $ options ['width ' ] ?? '300 ' ;
1018- $ options ['height ' ] = $ options ['height ' ] ?? '300 ' ;
1019- $ options ['mark ' ] = $ options ['mark ' ] ?? '1 ' ;
1020- $ options ['area ' ] = $ options ['area ' ] ?? '800px ' ;
10211017 $ cops = ['name ' =>$ name ,
10221018 'path ' => $ options ['path ' ],
1023- 'width ' => $ options ['width ' ] ,
1024- 'height ' => $ options ['height ' ] ,
1025- 'mark ' => $ options ['mark ' ],
1026- 'area ' => $ options ['area ' ],
1019+ 'width ' => $ options ['saveW ' ] ?? ' 300 ' ,
1020+ 'height ' => $ options ['saveW ' ] ?? ' 300 ' ,
1021+ 'mark ' => $ options ['mark ' ] ?? 1 ,
1022+ 'area ' => $ options ['area ' ] ?? ' 800px ' ,
10271023 'filter ' => 'cropper ' ,
10281024 ];
10291025 $ data_value = $ this ->getOptionsAttr ($ name ,$ cops );
@@ -1098,17 +1094,19 @@ public function upload($name = 'avatar', $options = [], $value = '')
10981094 'chunk ' => $ options ['chunk ' ] ?? false ,
10991095 ];
11001096 $ options = array_merge ($ op , $ options );
1097+ $ label = $ this ->label ($ name ,$ options ) ;
1098+ $ verify = $ options ['verify ' ]??"" ;
1099+ $ options ['verify ' ] = '' ;
11011100 $ select_container = '' ;
11021101 if ((isset ($ options ['select ' ]) && $ options ['select ' ]) || !isset ($ options ['select ' ])) {
1103- $ options ['select ' ] = $ options ['select ' ] ?? 'upload-select ' ; //可选upload-choose
1102+ $ select_options = $ options ;
1103+ $ select_options ['filter ' ] = $ options ['select ' ] ?? 'upload-select ' ; //可选upload-choose
11041104 $ css .= 'width:53%!important; ' ;
11051105 $ select_container = <<<EOF
1106- <button id="select- {$ id }" type="button" class="layui-btn layui-btn-danger { $ options [ ' select ' ]} " lay-filter=" {$ options ['select ' ]}"><i class="layui-icon layui-icon-radio"></i> {$ this ->__ ('Choose ' )}</button>
1106+ <button id="select- {$ id }" type="button" { $ this -> getOptionsAttr ( $ name , $ select_options )} class="layui-btn layui-btn-danger {$ options ['select ' ]}"><i class="layui-icon layui-icon-radio"></i> {$ this ->__ ('Choose ' )}</button>
11071107EOF ;
11081108 }
1109- $ label = $ this ->label ($ name ,$ options ) ;
1110- $ verify = $ options ['verify ' ]??"" ;
1111- $ options ['verify ' ] = '' ;
1109+
11121110 if (!isset ($ options ['filter ' ])) $ options ['filter ' ] = 'upload ' ; //监听
11131111 $ str = <<<EOF
11141112<style>
0 commit comments