mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
修正Model类order方法一处bug,优化改进视图模型
This commit is contained in:
@@ -1730,8 +1730,8 @@ class Model
|
||||
public function order($field, $order = null)
|
||||
{
|
||||
if (!empty($field)) {
|
||||
if (!is_array($field)) {
|
||||
$field = empty($order) ? [$field] : [(string) $field => (string) $order];
|
||||
if (is_string($field)) {
|
||||
$field = empty($order) ? $field : [$field => $order];
|
||||
}
|
||||
$this->options['order'] = $field;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user