|
@@ -1561,6 +1561,16 @@ class Database
|
|
|
|
|
|
$config = $this->config();
|
|
|
|
|
|
+ if ($type == 'layui') {
|
|
|
+ if (isset($config['manage']['list_table'])) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!isset($config['manage']['list_table'])) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$result = array();
|
|
|
|
|
|
if (isset($config['struct'])) {
|
|
@@ -1710,11 +1720,18 @@ class Database
|
|
|
{
|
|
|
$html = 'config.table = {};config.table.cols = [];';
|
|
|
|
|
|
- $data = array($this->list_thead('layui'));
|
|
|
- $data = Dever::json_encode($data);
|
|
|
+ $data = $this->list_thead('layui');
|
|
|
+ if ($data) {
|
|
|
+ $data = array($data);
|
|
|
+ $data = Dever::json_encode($data);
|
|
|
|
|
|
- $html .= 'config.table.cols = ' . $data;
|
|
|
- return $html;
|
|
|
+ $html .= 'config.table.cols = ' . $data;
|
|
|
+ return $html;
|
|
|
+ } else {
|
|
|
+ $html .= 'config.table.cols = []';
|
|
|
+ return $html;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
# layui表的数据 没有使用其异步方式
|
|
@@ -2203,6 +2220,16 @@ class Database
|
|
|
|
|
|
$config = $this->config();
|
|
|
|
|
|
+ if ($type == 'layui') {
|
|
|
+ if (isset($config['manage']['list_table'])) {
|
|
|
+ return array();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!isset($config['manage']['list_table'])) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$high = array();
|
|
|
|
|
|
$search = Dever::load('manage/auth.oper', 2) ? Dever::preInput('search_') : false;
|