style: 修改网站目录样式 (#693)

#### What this PR does / why we need it?

#### Summary of your change

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
This commit is contained in:
wangdan-fit2cloud 2023-04-18 18:24:59 +08:00 committed by GitHub
parent e224bc4b24
commit 2dbc7f28fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 74 additions and 49 deletions

View File

@ -61,6 +61,7 @@ declare module 'vue' {
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']

View File

@ -1,60 +1,70 @@
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<el-row :gutter="20"> <div class="site-form-wrapper">
<el-col :span="14" :offset="1"> <el-form class="site-form" ref="siteForm" :model="update" label-width="100px">
<br /> <el-form-item :label="$t('website.siteAlias')">
<el-descriptions :column="1" border> {{ website.alias }}
<el-descriptions-item :label="$t('website.siteAlias')">{{ website.alias }}</el-descriptions-item> </el-form-item>
<el-descriptions-item :label="$t('website.primaryPath')"> <el-form-item :label="$t('website.primaryPath')">
<el-space wrap>
{{ website.sitePath }} {{ website.sitePath }}
<el-button type="primary" link @click="toFolder(website.sitePath)"> <el-button type="primary" link @click="toFolder(website.sitePath)">
<el-icon><FolderOpened /></el-icon> <el-icon>
<FolderOpened />
</el-icon>
</el-button> </el-button>
</el-descriptions-item> </el-space>
</el-descriptions> </el-form-item>
<div v-if="configDir"> <el-form-item v-if="configDir" :label="$t('website.runDir')" prop="runDir">
<br /> <el-space wrap>
<el-form :inline="true" ref="siteForm" :model="update"> <el-select v-model="update.siteDir">
<el-form-item :label="$t('website.runDir')" prop="runDir"> <el-option :label="'/'" :value="'/'"></el-option>
<el-select v-model="update.siteDir"> <el-option
<el-option :label="'/'" :value="'/'"></el-option> v-for="(item, index) in dirs"
<el-option :label="item"
v-for="(item, index) in dirs" :value="item"
:label="item" :key="index"
:value="item" ></el-option>
:key="index" </el-select>
></el-option> <el-button type="primary" @click="submit(siteForm)">
</el-select> {{ $t('nginx.saveAndReload') }}
</el-form-item> </el-button>
<el-form-item> </el-space>
<el-button type="primary" @click="submit(siteForm)"> </el-form-item>
{{ $t('nginx.saveAndReload') }} <el-form-item label="运行用户/组" prop="runDir">
</el-button> <el-space wrap>
</el-form-item> <el-input v-model="update.siteDir" class="user-num-input">
</el-form> <template #prepend>用户</template>
<el-form-item> </el-input>
<el-alert :closable="false"> <el-input v-model="update.siteDir" class="user-num-input">
<template #default> <template #prepend>用户组</template>
<span class="warnHelper">{{ $t('website.runDirHelper') }}</span> </el-input>
</template> <el-button type="primary" @click="submit(siteForm)">保存</el-button>
</el-alert> </el-space>
</el-form-item> </el-form-item>
</div> </el-form>
<br /> <el-form-item>
<el-descriptions :title="$t('website.folderTitle')" :column="1" border>
<el-descriptions-item label="waf">{{ $t('website.wafFolder') }}</el-descriptions-item>
<el-descriptions-item label="ssl">{{ $t('website.sslFolder') }}</el-descriptions-item>
<el-descriptions-item label="log">{{ $t('website.logFoler') }}</el-descriptions-item>
<el-descriptions-item label="index">{{ $t('website.indexFolder') }}</el-descriptions-item>
</el-descriptions>
<br />
<el-alert :closable="false"> <el-alert :closable="false">
<template #default> <template #default>
<span class="warnHelper">{{ $t('website.runUserHelper') }}</span> <span class="warnHelper">{{ $t('website.runDirHelper') }}</span>
</template> </template>
</el-alert> </el-alert>
</el-col> </el-form-item>
</el-row>
<br />
<el-descriptions :title="$t('website.folderTitle')" :column="1" border>
<el-descriptions-item label="waf">{{ $t('website.wafFolder') }}</el-descriptions-item>
<el-descriptions-item label="ssl">{{ $t('website.sslFolder') }}</el-descriptions-item>
<el-descriptions-item label="log">{{ $t('website.logFoler') }}</el-descriptions-item>
<el-descriptions-item label="index">{{ $t('website.indexFolder') }}</el-descriptions-item>
</el-descriptions>
<br />
<el-alert :closable="false">
<template #default>
<span class="warnHelper">{{ $t('website.runUserHelper') }}</span>
</template>
</el-alert>
</div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -160,7 +170,21 @@ onMounted(() => {
}); });
</script> </script>
<style scoped> <style lang="scss" scoped>
.site-form-wrapper {
min-width: 600px;
width: 60%;
padding: 20px;
}
.site-form {
:deep(.el-form-item__label) {
padding-right: 20px !important;
box-sizing: content-box;
}
.user-num-input {
width: 190px;
}
}
.warnHelper { .warnHelper {
white-space: pre-line; white-space: pre-line;
display: block; display: block;