feat: 修改样式

This commit is contained in:
wangdan 2023-02-02 19:10:55 +08:00 committed by wangdan-fit2cloud
parent fa668f8956
commit 2d3fce1d3e
9 changed files with 84 additions and 25 deletions

View file

@ -84,7 +84,7 @@
} }
} }
:deep .el-sub-menu { :deep(.el-sub-menu) {
margin: 10px; margin: 10px;
span { span {

View file

@ -1 +1,18 @@
@use 'fit2cloud-ui-plus/src/styles/index.scss'; @use 'fit2cloud-ui-plus/src/styles/index.scss';
.search-button {
.el-input__wrapper {
border-radius: 50px;
}
}
// drawer头部增加按钮
.drawer-header-button {
span {
color: currentColor !important;
font-size: var(--el-font-size-base) !important;
}
.active-button {
color: var(--el-button-hover-text-color);
border-color: var(--el-button-hover-border-color);
}
}

View file

@ -3,15 +3,22 @@
<template #toolbar> <template #toolbar>
<el-row :gutter="5"> <el-row :gutter="5">
<el-col :span="20"> <el-col :span="20">
<el-button @click="changeTag('all')" type="primary" :link="activeTag !== 'all'"> <el-button
class="tag-button"
:class="activeTag === 'all' ? '' : 'no-active'"
@click="changeTag('all')"
:type="activeTag === 'all' ? 'primary' : ''"
:plain="activeTag !== 'all'"
>
{{ $t('app.all') }} {{ $t('app.all') }}
</el-button> </el-button>
<div v-for="item in tags" :key="item.key" style="display: inline"> <div v-for="item in tags" :key="item.key" style="display: inline">
<el-button <el-button
class="tag-button" class="tag-button"
:class="activeTag === item.key ? '' : 'no-active'"
@click="changeTag(item.key)" @click="changeTag(item.key)"
type="primary" :type="activeTag === item.key ? 'primary' : ''"
:link="activeTag !== item.key" :plain="activeTag !== item.key"
> >
{{ item.name }} {{ item.name }}
</el-button> </el-button>
@ -220,6 +227,10 @@ onMounted(() => {
} }
.tag-button { .tag-button {
margin-left: 30px; margin-right: 10px;
&.no-active {
background: none;
border: none;
}
} }
</style> </style>

View file

@ -20,7 +20,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div style="float: right"> <div style="float: right" class="search-button">
<el-input <el-input
class="table-button" class="table-button"
v-model="searchReq.name" v-model="searchReq.name"

View file

@ -352,23 +352,23 @@ defineExpose({
<style lang="scss" scoped> <style lang="scss" scoped>
.terminal-tabs { .terminal-tabs {
:deep .el-tabs__header { :deep(.el-tabs__header) {
padding: 0; padding: 0;
position: relative; position: relative;
margin: 0 0 3px 0; margin: 0 0 3px 0;
} }
::deep .el-tabs__nav { :deep(.el-tabs__nav) {
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
transition: transform var(--el-transition-duration); transition: transform var(--el-transition-duration);
float: left; float: left;
z-index: calc(var(--el-index-normal) + 1); z-index: calc(var(--el-index-normal) + 1);
} }
:deep .el-tabs__item { :deep(.el-tabs__item) {
color: #575758; color: #575758;
padding: 0 0px; padding: 0 0px;
} }
:deep .el-tabs__item.is-active { :deep(.el-tabs__item.is-active) {
color: #ebeef5; color: #ebeef5;
background-color: #575758; background-color: #575758;
} }

View file

@ -397,7 +397,7 @@ onUnmounted(() => {
margin-top: 10px; margin-top: 10px;
} }
& :deep .el-input__inner { &:deep(.el-input__inner) {
border-radius: 0; border-radius: 0;
} }
} }

View file

@ -3,19 +3,34 @@
<template #header> <template #header>
<DrawerHeader :header="$t('website.create')" :back="handleClose"> <DrawerHeader :header="$t('website.create')" :back="handleClose">
<template #buttons> <template #buttons>
<el-button <span class="drawer-header-button">
type="primary" <template v-for="item in buttonList" :key="item.value">
:plain="website.type !== 'deployment'" <el-button
@click="website.type = 'deployment'" :class="website.type === item.value ? 'active-button' : ''"
> @click="website.type = item.value"
{{ $t('website.deployment') }} :type="website.type === item.value ? '' : 'info'"
</el-button> :plain="website.type === item.value"
<el-button type="primary" :plain="website.type !== 'static'" @click="website.type = 'static'"> :text="website.type !== item.value"
{{ $t('website.static') }} :bg="website.type !== item.value"
</el-button> >
<el-button type="primary" :plain="website.type !== 'proxy'" @click="website.type = 'proxy'"> {{ item.label }}
{{ $t('website.proxy') }} </el-button>
</el-button> </template>
<!-- <el-button
type="primary"
:plain="website.type !== 'deployment'"
@click="website.type = 'deployment'"
>
{{ $t('website.deployment') }}
</el-button>
<el-button type="primary" :plain="website.type !== 'static'" @click="website.type = 'static'">
{{ $t('website.static') }}
</el-button>
<el-button type="primary" :plain="website.type !== 'proxy'" @click="website.type = 'proxy'">
{{ $t('website.proxy') }}
</el-button> -->
</span>
</template> </template>
</DrawerHeader> </DrawerHeader>
</template> </template>
@ -180,6 +195,21 @@ import { reactive, ref } from 'vue';
import Params from '@/views/app-store/detail/params/index.vue'; import Params from '@/views/app-store/detail/params/index.vue';
import Check from '../check/index.vue'; import Check from '../check/index.vue';
const buttonList = [
{
label: i18n.global.t('website.deployment'),
value: 'deployment',
},
{
label: i18n.global.t('website.static'),
value: 'static',
},
{
label: i18n.global.t('website.proxy'),
value: 'proxy',
},
];
const websiteForm = ref<FormInstance>(); const websiteForm = ref<FormInstance>();
const website = ref({ const website = ref({
primaryDomain: '', primaryDomain: '',

View file

@ -48,6 +48,7 @@
<template v-if="nginxIsExist && !openNginxConfig" #search> <template v-if="nginxIsExist && !openNginxConfig" #search>
<div :class="{ mask: nginxStatus != 'Running' }"> <div :class="{ mask: nginxStatus != 'Running' }">
<el-select v-model="req.websiteGroupId" @change="search()"> <el-select v-model="req.websiteGroupId" @change="search()">
<template #prefix>分组</template>
<el-option :label="$t('website.allGroup')" :value="0"></el-option> <el-option :label="$t('website.allGroup')" :value="0"></el-option>
<el-option <el-option
v-for="(group, index) in groups" v-for="(group, index) in groups"

View file

@ -37,7 +37,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
open: viteEnv.VITE_OPEN, open: viteEnv.VITE_OPEN,
proxy: { proxy: {
'/api/v1': { '/api/v1': {
target: 'http://127.0.0.1:9999', target: 'http://47.104.134.163:9999/',
changeOrigin: true, changeOrigin: true,
}, },
}, },