提交 c9a2a993 authored 作者: lidongxu's avatar lidongxu

style(index.vue): 首页样式-再次修改

el-row和el-col配合 gutter 时,每个子元素 el-col 有两边 padding 导致和自己写的对不齐,索性全都改成 el-row 和 el-col 写法
上级 5c3037f8
...@@ -83,34 +83,18 @@ ...@@ -83,34 +83,18 @@
box-sizing: content-box; box-sizing: content-box;
} }
.el-menu--collapse .el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow {
> div
> .el-submenu
> .el-submenu__title
.el-submenu__icon-arrow {
display: none; display: none;
} }
.el-dropdown .el-dropdown-link{ .el-dropdown .el-dropdown-link {
color: var(--el-color-primary) !important; color: var(--el-color-primary) !important;
} }
.el-select{ .el-select {
width: 215px; width: 215px;
} }
.el-tabs{ .el-tabs {
flex: 1; flex: 1;
} }
.el-row{
margin-left: 0 !important;
margin-right: 0 !important;
.el-col:nth-child(1){
padding-left: 0 !important;
}
.el-col:nth-last-child(1){
padding-right: 0 !important;
}
}
\ No newline at end of file
...@@ -126,6 +126,7 @@ aside { ...@@ -126,6 +126,7 @@ aside {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
} }
.components-container { .components-container {
......
<template> <template>
<el-card> <el-row :gutter="20">
<div slot="header" <el-col :span="24">
class="el-card__header"> <el-card shadow="never">
<span> <div slot="header"
常用菜单 class="el-card__header">
</span> <span>
<el-button class="custom" 常用菜单
type="primary" </span>
link <el-button class="custom"
@click="visible = true"> type="primary"
自定义 link
</el-button> @click="visible = true">
</div>
<div class="el-card__body">
<div v-for="o in commonMenuList"
class="item">
<el-button type="primary"
plain
@click="$router.push(o.path)">
{{ o.label }}
</el-button>
</div>
<div v-if="commonMenuList.length === 0">
<p class="none">
暂无常用菜单,立即
<a @click.prevent="visible = true">
自定义 自定义
</a> </el-button>
</p> </div>
</div> <div class="el-card__body">
</div> <div v-for="o in commonMenuList"
<el-dialog title="编辑常用菜单" class="item">
v-model="visible"> <el-button type="primary"
<el-transfer ref="myTransfer" plain
v-model="selectList" @click="$router.push(o.path)">
:data="menuList" {{ o.label }}
filterable </el-button>
filter-placeholder="菜单名称" </div>
@left-check-change="leftChange" <div v-if="commonMenuList.length === 0">
@right-check-change="rightChange"></el-transfer> <p class="none">
</el-dialog> 暂无常用菜单,立即
</el-card> <a @click.prevent="visible = true">
自定义
</a>
</p>
</div>
</div>
<el-dialog title="编辑常用菜单"
v-model="visible">
<el-transfer ref="myTransfer"
v-model="selectList"
:data="menuList"
filterable
filter-placeholder="菜单名称"
@left-check-change="leftChange"
@right-check-change="rightChange"></el-transfer>
</el-dialog>
</el-card>
</el-col>
</el-row>
</template> </template>
<script setup> <script setup>
...@@ -84,30 +88,41 @@ const rightChange = (val) => { ...@@ -84,30 +88,41 @@ const rightChange = (val) => {
<style scoped <style scoped
lang="scss"> lang="scss">
.el-card__header { .el-card {
.custom { margin-top: 20px;
float: right; width: 100%;
padding: 3px 0;
.el-card__header {
.custom {
float: right;
padding: 3px 0;
}
} }
}
.el-card__body {
padding-left: 15px !important;
.item { .el-card__body {
display: inline-block; padding-left: 15px !important;
margin-right: 20px; display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
gap: 20px;
.item {
display: inline-block;
/* margin: 0 20px 20px 0; */
}
} }
}
.none { .none {
font-size: 14px; font-size: 14px;
a { a {
color: #337ab7; color: #337ab7;
}
} }
} }
/* 穿梭框样式重写 */ /* 穿梭框样式重写 */
::v-deep(.el-dialog__body) { ::v-deep(.el-dialog__body) {
display: flex; display: flex;
...@@ -176,7 +191,8 @@ const rightChange = (val) => { ...@@ -176,7 +191,8 @@ const rightChange = (val) => {
::v-deep(.el-dialog) { ::v-deep(.el-dialog) {
width: 100%; width: 100%;
} }
::v-deep(.el-transfer){
::v-deep(.el-transfer) {
flex-direction: column; flex-direction: column;
} }
} }
......
...@@ -40,8 +40,8 @@ const setOptions = () => { ...@@ -40,8 +40,8 @@ const setOptions = () => {
} }
}, },
grid: { grid: {
left: 10, left: 15,
right: 10, right: 15,
bottom: 20, bottom: 20,
top: 30, top: 30,
containLabel: true containLabel: true
......
<template> <template>
<el-row class="panel-group" :gutter="20"> <el-row class="panel-group"
:gutter="20">
<el-col :xs="12" <el-col :xs="12"
:sm="12" :sm="12"
:lg="6" :lg="6"
...@@ -112,6 +113,10 @@ const handleSetLineChartData = (type) => { ...@@ -112,6 +113,10 @@ const handleSetLineChartData = (type) => {
background: var(--el-bg-color-overlay); background: var(--el-bg-color-overlay);
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05); box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .05);
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 15px 15px 15px;
&:hover { &:hover {
.card-panel-icon-wrapper { .card-panel-icon-wrapper {
...@@ -153,8 +158,7 @@ const handleSetLineChartData = (type) => { ...@@ -153,8 +158,7 @@ const handleSetLineChartData = (type) => {
.card-panel-icon-wrapper { .card-panel-icon-wrapper {
float: left; float: left;
margin: 14px 0 0 14px; padding: 15px;
padding: 16px;
transition: all 0.38s ease-out; transition: all 0.38s ease-out;
border-radius: 6px; border-radius: 6px;
} }
...@@ -165,10 +169,11 @@ const handleSetLineChartData = (type) => { ...@@ -165,10 +169,11 @@ const handleSetLineChartData = (type) => {
} }
.card-panel-description { .card-panel-description {
float: right;
font-weight: bold; font-weight: bold;
margin: 26px; width: 25%;
margin-left: 0px; // white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
.card-panel-text { .card-panel-text {
line-height: 18px; line-height: 18px;
...@@ -190,17 +195,24 @@ const handleSetLineChartData = (type) => { ...@@ -190,17 +195,24 @@ const handleSetLineChartData = (type) => {
display: none; display: none;
} }
.card-panel-icon-wrapper { .card-panel {
float: none !important; justify-content: center !important;
width: 100%; align-items: center !important;
height: 100%; .card-panel-icon-wrapper {
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important; float: none !important;
// width: 100%;
// height: 100%;
margin: 0 !important;
padding: 5px 15px !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
} }
} }
} }
</style> </style>
<template> <template>
<div class="dashboard-editor-container app-container"> <div class="dashboard-editor-container app-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" /> <panel-group @handleSetLineChartData="handleSetLineChartData" />
<common-menu class="row"></common-menu> <common-menu />
<el-row :gutter="32" <el-row :gutter="20"
class="row"> class="row">
<el-col :xs="24" <el-col :xs="24"
:sm="24" :sm="24"
...@@ -26,8 +26,11 @@ ...@@ -26,8 +26,11 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="line-chart row"> <el-row :gutter="20">
<line-chart :chartData="lineChartData" /> <el-col :span="24">
<line-chart class="line-chart"
:chartData="lineChartData" />
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
...@@ -67,18 +70,18 @@ const handleSetLineChartData = (type) => { ...@@ -67,18 +70,18 @@ const handleSetLineChartData = (type) => {
<style lang="scss" <style lang="scss"
scoped> scoped>
.dashboard-editor-container { .dashboard-editor-container {
.row {
margin-top: 20px;
}
.chart-wrapper { .chart-wrapper {
background: var(--el-bg-color-overlay); background: var(--el-bg-color-overlay);
padding: 16px 16px 0; padding: 16px 16px 0;
margin-top: 20px;
} }
.line-chart { .line-chart {
background: var(--el-bg-color-overlay); background: var(--el-bg-color-overlay);
padding: 16px 16px 0; padding: 16px 16px 0;
margin-top: 20px;
} }
::v-deep(.el-row) { ::v-deep(.el-row) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论