added upload functionality

This commit is contained in:
Marvin Zhang
2019-06-04 20:45:56 +08:00
parent 44a941c72a
commit dd08a8b0dc
2 changed files with 22 additions and 3 deletions

View File

@@ -87,7 +87,7 @@
:action="$request.baseUrl + '/spiders/manage/upload'"
:on-success="onUploadSuccess"
:file-list="fileList">
<el-button size="small" type="primary">{{$t('Upload')}}</el-button>
<el-button type="primary" icon="el-icon-upload">{{$t('Upload')}}</el-button>
</el-upload>
</el-form-item>
</el-form>
@@ -493,6 +493,14 @@ export default {
})
},
onUploadSuccess () {
// clear fileList
this.fileList = []
// fetch spider list
this.$store.dispatch('spider/getSpiderList')
// close popup
this.addCustomizedDialogVisible = false
}
},
created () {