wip
This commit is contained in:
parent
91aaa2296a
commit
b2a8699edf
|
|
@ -9,10 +9,10 @@
|
||||||
{{-- <button type="button" @click="upload" class="btn btn-primary">上传插件</button> --}}
|
{{-- <button type="button" @click="upload" class="btn btn-primary">上传插件</button> --}}
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="{{ admin_route('plugins.import') }}"
|
action=""
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-change="handleFileChange"
|
:show-file-list="false"
|
||||||
:before-upload="beforeFileUpload"
|
:http-request="uploadFile"
|
||||||
accept=".zip"
|
accept=".zip"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传插件 (仅支持 zip 文件)</el-button>
|
<el-button size="small" type="primary">上传插件 (仅支持 zip 文件)</el-button>
|
||||||
|
|
@ -83,16 +83,11 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handleFileChange(e) {
|
uploadFile(file) {
|
||||||
console.log(e);
|
$http.post('plugins/import', file).then((res) => {
|
||||||
},
|
layer.msg(res.message)
|
||||||
|
location.reload();
|
||||||
beforeFileUpload(e) {
|
})
|
||||||
console.log(e);
|
|
||||||
},
|
|
||||||
|
|
||||||
upload() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
installedPlugin(code, type, index) {
|
installedPlugin(code, type, index) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue