prompt of refreshing config

This commit is contained in:
hbrwang 2020-12-04 14:07:32 +08:00
parent e73f4d88ac
commit 65b238e69e

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="configure-container"> <div class="configure-container">
<el-row id="head"> <el-row id="head">
<el-button type="primary" @click="fetchData">Refresh</el-button> <el-button type="primary" @click="refresh">Refresh</el-button>
<el-button type="primary" @click="uploadConfig">Upload</el-button> <el-button type="primary" @click="uploadConfig">Upload</el-button>
</el-row> </el-row>
<el-input v-model="textarea" type="textarea" autosize placeholder="frpc configrue file, can not be empty..." /> <el-input v-model="textarea" type="textarea" autosize placeholder="frpc configrue file, can not be empty..." />
@ -31,6 +31,12 @@ export default {
} }
this.textarea = await res.text() this.textarea = await res.text()
return this.textarea
},
async refresh() {
if (await this.fetchData()) {
this.$message.success('Success')
}
}, },
uploadConfig() { uploadConfig() {
this.$confirm('This operation will upload your frpc configure file content and hot reload it, do you want to continue?', 'Notice', { this.$confirm('This operation will upload your frpc configure file content and hot reload it, do you want to continue?', 'Notice', {