rabin 3 lat temu
rodzic
commit
d5f2b04fd6
2 zmienionych plików z 12 dodań i 2 usunięć
  1. 2 2
      src/Database.php
  2. 10 0
      src/Lib/Input.php

+ 2 - 2
src/Database.php

@@ -3769,7 +3769,7 @@ class Database
      */
     private function update_child($data, $param, $key, &$result, $index, $config, $delete = true)
     {
-        if (isset($config['tab']) && $config['tab']) {
+        if (isset($config['tab_config']) && $config['tab_config']) {
             if ($index != 0) {
                 $style = 'display:none;';
             } else {
@@ -3778,7 +3778,7 @@ class Database
             $result .= '<div class="layui-tab layui-tab-brief dever_' . $key . '_child dever_form_add_child" lay-filter="component-tabs-brief" style="'.$style.'" id="' . $key . '-child-' . ($index + 1) . '"><ul class="layui-tab-title">';
             $tab = '<div class="layui-tab-content">';
             $i = 0;
-            foreach ($config['tab'] as $k => $v) {
+            foreach ($config['tab_config'] as $k => $v) {
                 $content = $this->update_child_data($data, $param, $key, $index, $k, $config);
                 if ($content) {
                     $class_0 = $class_1 = '';

+ 10 - 0
src/Lib/Input.php

@@ -870,7 +870,9 @@ class Input
     public static function _linkage($param, $class = '', $hidden = '', $change = '')
     {
         $div = 'div';
+        $fast = Dever::input('fast');
         $w = 'width:20%;';
+        
         if ($class == 'span') {
             $div = 'span';
             $w = '';
@@ -878,6 +880,11 @@ class Input
 
         if (layadmin()) {
             $w = 'margin-top:0px;width:20%;margin-left:-3px;';
+            if ($fast == 1) {
+                $w = 'margin-top:0px;width:50%;margin-left:-3px;';
+            } else {
+                $w = 'margin-top:0px;width:20%;margin-left:-3px;';
+            }
         }
 
         if (!isset($param['search_state'])) {
@@ -1008,6 +1015,9 @@ class Input
             }
 
             if (isset($param['update_search'])) {
+                if (strstr($param['update_search'], '{id}')) {
+                    $param['update_search'] = str_replace('{id}', 'where_id=' . $param['where_id'], $param['update_search']);
+                }
                 $xm = str_replace('xm-select-search=""', 'xm-select-search="'.Dever::url($param['update_search'] . '&yes='.$search_value.'&json=1').'"', $xm);
             }