mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-27 00:51:55 +08:00
release revsuit vBeta0.1.0 (#15)
Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user