style: redis 按钮位置调整

This commit is contained in:
ssongliu
2022-12-05 15:44:13 +08:00
parent c89de70d87
commit a0f8a7b968
4 changed files with 11 additions and 35 deletions

View File

@@ -22,7 +22,7 @@
</el-tag>
</div>
</el-col>
<el-col :lg="5" :xl="4">
<el-col :lg="6" :xl="4">
<div>
{{ $t('website.lastBackupAt') }}:
<el-tag v-if="data.lastBackupAt != ''" type="info">{{ data.lastBackupAt }}</el-tag>
@@ -30,8 +30,6 @@
</div>
</el-col>
<el-col :lg="4" :xl="6">
<el-button type="primary" link @click="onOperate('restart')">{{ $t('app.restart') }}</el-button>
<el-divider direction="vertical" />
<el-button type="primary" link @click="setting">{{ $t('commons.button.set') }}</el-button>
</el-col>
</el-row>
@@ -47,10 +45,8 @@
</div>
</template>
<script lang="ts" setup>
import { CheckAppInstalled, InstalledOp } from '@/api/modules/app';
import i18n from '@/lang';
import { CheckAppInstalled } from '@/api/modules/app';
import router from '@/routers';
import { ElMessage, ElMessageBox } from 'element-plus';
import { onMounted, reactive, ref } from 'vue';
import Status from '@/components/status/index.vue';
@@ -95,29 +91,6 @@ const onCheck = async () => {
loading.value = false;
};
const onOperate = async (operation: string) => {
operateReq.operate = operation;
ElMessageBox.confirm(
i18n.global.t('app.operatorHelper', [i18n.global.t('app.' + operation)]),
i18n.global.t('app.' + operation),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'info',
},
).then(() => {
loading.value = true;
InstalledOp(operateReq)
.then(() => {
ElMessage.success(i18n.global.t('commons.msg.operationSuccess'));
onCheck();
})
.finally(() => {
loading.value = false;
});
});
};
onMounted(() => {
key.value = props.appKey;
onCheck();