dever 6 years ago
parent
commit
d929b4a2f5
1 changed files with 20 additions and 0 deletions
  1. 20 0
      src/Lib/Input.php

+ 20 - 0
src/Lib/Input.php

@@ -238,6 +238,11 @@ class Input
 
         <input type="button" style="'.$class.'" class="form-control upload_show" mul="yes" v="' . $param['name'] . '_' . $param['index'] . '" id="file_show_' . $param['name'] . '_' . $param['index'] . '" key="' . $param['key'] . '" value="图库"/>
 
+        <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-filter="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-showPercent="true">
+          <div class="layui-progress-bar" lay-percent="0%"></div>
+        </div>
+
+
         <div style="margin:10px;" update_type="html"  class="update_value ' . $param['name'] . '_' . $param['index'] . '_mul">' . $pic . '</div>
 
         <input type="text" class="update_value form-control ' . (isset($param['valid']) ? $param['valid'] : '') . '" name="' . $param['name'] . '" id="' . $param['name'] . '_' . $param['index'] . '" value="' . (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : '')) . '">';
@@ -258,6 +263,10 @@ class Input
 
         <input type="button" style="'.$class.'" class="form-control upload_show" t="file" v="' . $param['name'] . '_' . $param['index'] . '" id="file_show_' . $param['name'] . '_' . $param['index'] . '" key="' . $param['key'] . '" value="文件库"/>
 
+        <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-filter="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-showPercent="true">
+          <div class="layui-progress-bar" lay-percent="0%"></div>
+        </div>
+
         <div style="margin-top:10px;"><input type="text" class="update_value form-control ' . (isset($param['valid']) ? $param['valid'] : '') . '" name="' . $param['name'] . '" id="' . $param['name'] . '_' . $param['index'] . '" value="' . (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : '')) . '">
         </div>';
         //return '<input type="file" class="form-control" value="' . (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : '')) . '" name="' . $param['name'] . '"/>';
@@ -287,6 +296,10 @@ class Input
 
         <input type="button" style="'.$class.'" class="form-control upload_show" t="file" mul="yes" v="' . $param['name'] . '_' . $param['index'] . '" id="file_' . $param['name'] . '_' . $param['index'] . '" key="' . $param['key'] . '" value="文件库"/>
 
+        <div style="margin-top:10px;display:none;" class="layui-progress layui-progress-big" id="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-filter="file_' . $param['name'] . '_' . $param['index'] . '_progress" lay-showPercent="true">
+          <div class="layui-progress-bar" lay-percent="0%"></div>
+        </div>
+
         <ul style="margin:10px;" update_type="html"  class="update_value ' . $param['name'] . '_' . $param['index'] . '_mul">' . $file . '</ul>
 
         <input type="hidden" class="update_value form-control ' . (isset($param['valid']) ? $param['valid'] : '') . '" name="' . $param['name'] . '" id="' . $param['name'] . '_' . $param['index'] . '" value="' . (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : '')) . '">';
@@ -683,6 +696,13 @@ class Input
         } else {
             $xm .= ' xm-select-radio=""';
         }
+
+        if (isset($param['option']) && isset($param['update']) && $param['update'] == 'select') {
+            $total = count($param['option']);
+            if ($total <= 5) {
+                $xm = '';
+            }
+        }
         
         $html .= $hidden . '<select '.$xm.' class="update_value form-control ' . $child_class . '  ' . (isset($param['valid']) ? $param['valid'] : '') . '" name="' . $param['name'] . '" id="' . $param['name'] . '"  ' . $change . '>';