release revsuit vBeta0.1.0 (#15)

Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
Li4n0
2021-05-16 12:11:35 +08:00
committed by GitHub
co-authored by E99p1ant
parent b39ee101f9
commit 5b63e90390
98 changed files with 2357 additions and 623 deletions
+61
View File
@@ -0,0 +1,61 @@
<template>
<div>
<a-space size="middle">
<a-upload
name="rules"
action="/revsuit/api/setting/importRules"
@change="handleChange"
:showUploadList="false"
>
<a-button type="primary" icon="upload">Import</a-button>
</a-upload>
<a-button type="primary" icon="download" onclick="window.open('/revsuit/api/setting/exportRules')">Export
</a-button>
</a-space>
<a-result v-if="status"
:status="status"
:title="title"
>
<template #extra>
<a-row>
<a-col :span="12" :offset="7">
<div style="text-align: left">
<li v-for="err in errors" :key="err">{{ err }}</li>
</div>
</a-col>
</a-row>
</template>
</a-result>
</div>
</template>
<script>
export default {
name: "Rules",
data() {
return {
status: "",
title: "",
errors: []
}
},
methods: {
handleChange(info) {
let resp = info.file.response
if (info.file.status === 'done' || info.file.status === 'error') {
if (resp.error) {
this.status = "warning"
} else {
this.status = "success"
}
this.title = resp.result
this.errors = resp.error
}
},
}
}
</script>
<style scoped>
</style>