Commit 1ea4bfee by xinla

element ui部分基础组件样式定制

1 parent d8d3d075
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
} }
// background-color: $subMenuBg !important; // background-color: $subMenuBg !important;
&:hover { &:hover {
color: $blue; color: var(--color);
background-color: transparent !important; background-color: transparent !important;
} }
} }
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
} }
// 当前激活菜单 // 当前激活菜单
.el-menu-item.is-active { .el-menu-item.is-active {
background: linear-gradient(to right, $blue 0%, $light-blue 100%); background: linear-gradient(to right, var(--color) 0%, $light-blue 100%);
box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2); box-shadow: 0px 13px 16px 0px rgba(7, 168, 85, 0.2);
border-radius: 8px; border-radius: 8px;
color: #fff !important; color: #fff !important;
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
// 当前激活菜单所属上级菜单标题目录 // 当前激活菜单所属上级菜单标题目录
.is-active > .el-submenu__title { .is-active > .el-submenu__title {
color: $blue !important; color: var(--color) !important;
} }
} }
......
...@@ -105,11 +105,11 @@ export default { ...@@ -105,11 +105,11 @@ export default {
top: 0; top: 0;
} }
.top-wrap { .top-wrap {
height: 64px; height: var(--top-nav-heght);
} }
.main-wrap { .main-wrap {
height: calc(100vh - 64px); height: calc(100vh - var(--top-nav-heght));
background: #edf2f9; background: #edf2f9;
.main { .main {
height: 100%; height: 100%;
......
...@@ -237,9 +237,9 @@ ...@@ -237,9 +237,9 @@
} }
.diy-theme { .diy-theme {
.el-date-table td.in-range div { // .el-date-table td.in-range div {
// background-color: #e6f8ef; // background-color: #e6f8ef;
} // }
// .el-input__inner, // .el-input__inner,
// .tag-input { // .tag-input {
// background-color: transparent; // background-color: transparent;
...@@ -247,6 +247,7 @@ ...@@ -247,6 +247,7 @@
// .tag-input { // .tag-input {
// } // }
// 分页
.el-pagination.is-background .btn-prev, .el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-next,
.el-pagination.is-background .el-pager li { .el-pagination.is-background .el-pager li {
...@@ -268,6 +269,7 @@ ...@@ -268,6 +269,7 @@
// margin: 0 auto; // margin: 0 auto;
// } // }
// 弹窗
.el-dialog { .el-dialog {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -297,6 +299,8 @@ ...@@ -297,6 +299,8 @@
color: #86909c; color: #86909c;
} }
} }
// 按钮
.el-button--default { .el-button--default {
border-color: var(--color); border-color: var(--color);
color: var(--color); color: var(--color);
...@@ -304,8 +308,74 @@ ...@@ -304,8 +308,74 @@
.el-button--default.el-button--primary { .el-button--default.el-button--primary {
color: #fff; color: #fff;
} }
} .el-button--small:not(.el-button--text) {
.el-button--small:not(.el-button--text) {
padding: 9px 19px; padding: 9px 19px;
border-radius: var(--border-radius-small); border-radius: var(--border-radius-small);
}
// 步骤条
.el-step__icon {
width: 40px;
height: 40px;
border: 0;
}
.el-step.is-center .el-step__main {
position: absolute;
top: 1px;
left: calc(50% + 30px);
}
.el-step.is-horizontal .el-step__line {
height: 1px;
top: 20px;
left: 120px;
right: 10px;
background: #e8e9ed;
}
.el-step.is-center .el-step__line {
top: 20px;
left: calc(50% + 30px + 80px);
right: calc(-50% + 30px);
}
.el-step__head.is-success .el-step__icon.is-text {
background: #c7eddb; // 图标背景
}
.el-step__title.is-process {
color: #86909c; // 标题颜色
}
.el-step__head.is-process {
color: #fff; // 数字颜色
.el-step__icon.is-text {
background: var(--color);
}
}
.el-step__head.is-wait {
color: #86909c;
.el-step__icon.is-text {
background: #e8e9ed;
}
}
// 抽屉
.el-drawer.rtl {
top: var(--top-nav-heght);
height: auto;
box-shadow: -4px 0px 40px 0px rgba(29, 33, 41, 0.1);
border-radius: 16px 0px 0px 0px;
}
// 标签页选中高亮线
.el-tabs__active-bar {
display: none;
}
.el-tabs__item.is-active::after {
content: '';
display: inline-block;
position: absolute;
width: 40px;
height: 2px;
bottom: 0;
left: calc(50% - 10px);
transform: translateX(-50%);
background: var(--color);
}
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
**/ **/
/* theme color */ /* theme color */
$--color-primary: var(--color); $--color-primary: #07c160;
$--color-success: #07c160; $--color-success: #07c160;
$--color-warning: #faad14; $--color-warning: #faad14;
$--color-danger: #eb5e12; $--color-danger: #eb5e12;
......
...@@ -386,7 +386,7 @@ aside { ...@@ -386,7 +386,7 @@ aside {
color: #333; color: #333;
padding: 0 20px; padding: 0 20px;
background: #fff; background: #fff;
border-radius: 4px 4px 0 0; border-radius: var(--border-radius-big) var(--border-radius-big) 0 0;
.desc { .desc {
font-weight: 400; font-weight: 400;
margin-left: 5px; margin-left: 5px;
...@@ -394,7 +394,7 @@ aside { ...@@ -394,7 +394,7 @@ aside {
color: #999; color: #999;
} }
& + .g-card { & + .g-card {
border-radius: 0 0 4px 4px; border-radius: 0 0 var(--border-radius-big) var(--border-radius-big);
margin-top: 0; margin-top: 0;
} }
} }
...@@ -403,14 +403,14 @@ aside { ...@@ -403,14 +403,14 @@ aside {
@extend .g-title; @extend .g-title;
font-size: 16px; font-size: 16px;
& + .g-card { & + .g-card {
border-radius: 0 0 4px 4px; border-radius: 0 0 var(--border-radius-big) var(--border-radius-big);
margin-top: 0; margin-top: 0;
} }
} }
// 卡片样式 // 卡片样式
&card { &card {
margin-top: 10px; margin-top: 16px;
border-radius: var(--border-radius-big); border-radius: var(--border-radius-big);
background: #fff; background: #fff;
overflow: auto; overflow: auto;
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
--border-radius: 8px; --border-radius: 8px;
--border-radius-small: 4px; --border-radius-small: 4px;
--border-radius-big: 16px; --border-radius-big: 16px;
--top-nav-heght: 64px;
} }
// base color // base color
$light-blue: #90de45; $light-blue: #90de45;
......
<template> <template>
<div> <div>
<div class="tab"> <div class="g-card g-pad20">
<el-steps style="margin-top:10px;" :active="active" align-center> <el-steps :active="active" align-center>
<el-step title="活码设置"></el-step> <el-step title="活码设置"></el-step>
<el-step title="生成活码"></el-step> <el-step title="生成活码"></el-step>
</el-steps> </el-steps>
...@@ -18,44 +17,43 @@ ...@@ -18,44 +17,43 @@
</div> </div>
<div class="ac"> <div class="ac">
<template v-if="active === 0"> <template v-if="active === 0">
<el-button @click="$router.back()"> 取消 </el-button> <el-button @click="$router.back()">取消</el-button>
<el-button type="primary" v-loading="loading" :disabled="loading" @click="handleGroupCode"> 下一步 </el-button> <el-button type="primary" v-loading="loading" :disabled="loading" @click="handleGroupCode">下一步</el-button>
</template> </template>
<template v-else> <template v-else>
<!-- <el-button @click="prev"> 上一步 </el-button> --> <!-- <el-button @click="prev"> 上一步 </el-button> -->
<el-button type="primary" @click="finished"> 完成 </el-button> <el-button type="primary" @click="finished">完成</el-button>
</template> </template>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import BaseInfo from './baseInfo' import BaseInfo from './baseInfo'
import GroupCode from './groupCode' import GroupCode from './groupCode'
export default { export default {
components: { components: {
BaseInfo, BaseInfo,
GroupCode GroupCode,
}, },
data () { data() {
return { return {
loading: false, loading: false,
// 当前群活码ID // 当前群活码ID
groupCodeId: null, groupCodeId: null,
// 当前激活的步骤 // 当前激活的步骤
active: 0, active: 0,
baseInfo: {} baseInfo: {},
} }
}, },
created () { created() {
if (this.$route.query.groupCodeId) this.groupCodeId = this.$route.query.groupCodeId if (this.$route.query.groupCodeId) this.groupCodeId = this.$route.query.groupCodeId
}, },
methods: { methods: {
// 下一步 // 下一步
next (groupCodeId, info) { next(groupCodeId, info) {
this.loading = false this.loading = false
if (groupCodeId || info) { if (groupCodeId || info) {
if (groupCodeId) this.groupCodeId = groupCodeId if (groupCodeId) this.groupCodeId = groupCodeId
...@@ -65,39 +63,39 @@ ...@@ -65,39 +63,39 @@
} }
}, },
// 上一步 // 上一步
prev () { prev() {
this.active -= 1 this.active -= 1
if (this.active < 0) this.active = 0 if (this.active < 0) this.active = 0
}, },
// 完成 // 完成
finished () { finished() {
this.next() this.next()
this.$router.back() this.$router.back()
}, },
// 新增或更新群活码 // 新增或更新群活码
handleGroupCode () { handleGroupCode() {
if (!this.$refs.baseInfo.handleValidateFn()) return if (!this.$refs.baseInfo.handleValidateFn()) return
this.loading = true this.loading = true
this.$refs.baseInfo.submit() this.$refs.baseInfo.submit()
}, },
// 管理实际群活码 // 管理实际群活码
handleRealCode () { handleRealCode() {
this.next() this.next()
} },
} },
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab { .tab {
height: 78px; height: 78px;
background: #fff; background: #fff;
border-top: 1px solid #f1f1f1; border-top: 1px solid #f1f1f1;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
} }
.page-content { .page-content {
padding-top: 50px; padding-top: 50px;
padding-bottom: 20px; padding-bottom: 20px;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!