Browse Source

Merge remote-tracking branch 'github/2.0' into github

jqh 4 years ago
parent
commit
c9d93145c2

+ 4 - 4
resources/assets/dcat/extra/Upload/AddFile.js

@@ -81,21 +81,21 @@ export default class AddFile {
     // 显示错误信息
     showError ($li, code, file) {
         let _this = this,
-            __ = _this.uploader.lang.trans,
+            lang = _this.uploader.lang,
             text = '',
             $info = $('<p class="error"></p>');
 
         switch (code) {
             case 'exceed_size':
-                text = __('exceed_size');
+                text = lang.trans('exceed_size');
                 break;
 
             case 'interrupt':
-                text = __('interrupt');
+                text = lang.trans('interrupt');
                 break;
 
             default:
-                text = __('upload_failed');
+                text = lang.trans('upload_failed');
                 break;
         }
 

File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/extra/upload.js


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/extra/upload.js.map


+ 3 - 3
src/Grid/ColumnSelector/CacheStore.php

@@ -15,16 +15,16 @@ class CacheStore extends SessionStore
 
     public function store(array $input)
     {
-        $this->driver->put($this->getVisibleColumnsKey(), $input, $this->ttl);
+        $this->driver->put($this->getKey(), $input, $this->ttl);
     }
 
     public function get()
     {
-        return $this->driver->get($this->getVisibleColumnsKey());
+        return $this->driver->get($this->getKey());
     }
 
     public function forget()
     {
-        $this->driver->forget($this->getVisibleColumnsKey());
+        $this->driver->forget($this->getKey());
     }
 }

+ 4 - 4
src/Grid/ColumnSelector/SessionStore.php

@@ -20,20 +20,20 @@ class SessionStore implements ColumnSelectorStore
 
     public function store(array $input)
     {
-        session()->put($this->getVisibleColumnsKey(), $input);
+        session()->put($this->getKey(), $input);
     }
 
     public function get()
     {
-        return session()->get($this->getVisibleColumnsKey());
+        return session()->get($this->getKey());
     }
 
     public function forget()
     {
-        session()->remove($this->getVisibleColumnsKey());
+        session()->remove($this->getKey());
     }
 
-    protected function getVisibleColumnsKey()
+    protected function getKey()
     {
         return $this->grid->getName().'/'.request()->path().'/'.Admin::user()->getKey();
     }

+ 2 - 2
src/Show.php

@@ -131,8 +131,8 @@ class Show implements Renderable
             $this->repository = Admin::repository($model);
         } elseif ($model instanceof Model) {
             if ($key = $model->getKey()) {
-                $this->key = $model->getKey();
-                $this->keyName = $model->getKeyName();
+                $this->setKey($key);
+                $this->setKeyName($model->getKeyName());
 
                 $this->model($model);
             } else {

Some files were not shown because too many files changed in this diff