|
@@ -995,7 +995,7 @@ class Input
|
|
|
} elseif (isset($param['load'])) {
|
|
|
$change = ' onchange="loadChange($(this), \'' . $param['load'] . '\')" ';
|
|
|
$child_class .= ' change';
|
|
|
- } elseif (isset($param['bind'])) {
|
|
|
+ } elseif (isset($param['bind']) && !isset($param['update_search'])) {
|
|
|
$param['bind'][2] = isset($param['bind'][2]) ? str_replace('"', '\'', json_encode($param['bind'][2], true)) : false;
|
|
|
$change = $param['bind'][0] . '="' . $param['bind'][1] . '($(this), ' . $param['bind'][2] . ')" ';
|
|
|
|
|
@@ -1028,6 +1028,11 @@ class Input
|
|
|
$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);
|
|
|
+
|
|
|
+ if (isset($param['bind'])) {
|
|
|
+ $param['bind'][2] = isset($param['bind'][2]) ? str_replace('"', '\'', json_encode($param['bind'][2], true)) : false;
|
|
|
+ $xm .= ' xm-select-callback="'.$param['bind'][1].'" xm-select-callback-param="'.$param['bind'][2].'"';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (isset($param['update_create'])) {
|
|
@@ -1266,8 +1271,8 @@ class Input
|
|
|
|
|
|
$auto .= ' onload="' . $param['bind'][1] . '($(this), ' . $param['bind'][2] . ')" ';
|
|
|
}
|
|
|
-
|
|
|
- return '<input ' . $auto . ' type="' . (isset($param['update']) ? $param['update'] : 'text') . '" class="autoload_text layui-input update_value ' . (isset($param['class']) ? $param['class'] : 'form-control') . ' ' . (isset($param['valid']) ? $param['valid'] : '') . '" value="' . $value . '" name="' . $param['name'] . '" id="' . $param['name'] . '_value" autocomplete="new'.time().'" placeholder="' . (isset($param['placeholder']) ? $param['placeholder'] : '') . '"/>' . $input;
|
|
|
+ //id _value
|
|
|
+ return '<input ' . $auto . ' type="' . (isset($param['update']) ? $param['update'] : 'text') . '" class="autoload_text layui-input update_value ' . (isset($param['class']) ? $param['class'] : 'form-control') . ' ' . (isset($param['valid']) ? $param['valid'] : '') . '" value="' . $value . '" name="' . $param['name'] . '" id="' . $param['name'] . '" autocomplete="new'.time().'" placeholder="' . (isset($param['placeholder']) ? $param['placeholder'] : '') . '"/>' . $input;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1453,4 +1458,15 @@ class Input
|
|
|
<div id="sku_table"></div><div id="sku_table_col" style="display:none">'.$col.'</div>';
|
|
|
return $html;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * show
|
|
|
+ *
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public static function _show($param, $class = '')
|
|
|
+ {
|
|
|
+ $value = (isset($param['value']) ? $param['value'] : (isset($param['default']) ? $param['default'] : ''));
|
|
|
+ return $value;
|
|
|
+ }
|
|
|
}
|