File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,23 @@ public function password(string $name, array $options = [])
9090 */
9191 public function range ($ name , $ options = [], $ value = null )
9292 {
93- return $ this ->input ($ name ,'range ' , $ options ,$ value );
93+ $ label = $ options ['label ' ] ?? $ name ;
94+ $ tips = $ options ['tips ' ] ?? $ label ;
95+ $ placeholder = $ options ['placeholder ' ] ?? $ tips ;
96+ $ value = !is_null ($ value ) ? 'value=" ' . $ value . '" ' : '' ;
97+ $ disorread = $ this ->readonlyOrdisabled ($ options ) ? $ this ->readonlyOrdisabled ($ options ) : $ this ->readonlyOrdisabled ($ options );
98+ $ disorread = $ disorread ? 'layui-disabled ' : '' ;
99+ return ' <div class="layui-form-item"> ' .$ this ->label ($ label , $ options ).'
100+ <div class="layui-input-block">
101+ <div class="layui-input-inline" style="width: 100px;">
102+ <input ' . $ this ->verify ($ options ) . $ this ->filter ($ options ) . $ this ->readonlyOrdisabled ($ options ) .' type="text" name=" ' .$ name .'_min" placeholder=" ' .lang ($ placeholder ).'" autocomplete="off" class="layui-input ' . $ this ->addClass ($ options ) . ' ' . $ disorread . '" ' . $ value . '/>
103+ </div>
104+ <div class="layui-form-mid">-</div>
105+ <div class="layui-input-inline" style="width: 100px;">
106+ <input ' . $ this ->verify ($ options ) . $ this ->filter ($ options ) . $ this ->readonlyOrdisabled ($ options ) .' type="text" name=" ' .$ name .'_max" placeholder=" ' .lang ($ placeholder ).'" autocomplete="off" class="layui-input ' . $ this ->addClass ($ options ) . ' ' . $ disorread . '" ' . $ value . '/>
107+ </div>
108+ </div>
109+ </div> ' ;
94110 }
95111
96112 /**
You can’t perform that action at this time.
0 commit comments