|
@@ -381,6 +381,11 @@ JS
|
|
|
})->useTable()
|
|
|
->customFormat(function ($data) {
|
|
|
$arr = json_decode($data,true);
|
|
|
+ foreach ($arr as $key => $value) {
|
|
|
+ if (isset($arr[$key]['order']) == false) {
|
|
|
+ $arr[$key]['order'] = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 按 order 字段对数组进行排序
|
|
|
usort($arr, function($a, $b) {
|
|
|
#return $a['order'] <=> $b['order']; // 升序排序
|