Browse Source

修改显示侧边栏

master
13176889840 4 years ago
parent
commit
71cbd933c7
  1. 2
      src/views/form/preview/ProjectForm.vue
  2. 86
      src/views/form/theme/index.vue

2
src/views/form/preview/ProjectForm.vue

@ -295,7 +295,7 @@ export default {
@import "@/assets/styles/elementui-mobile.scss"; @import "@/assets/styles/elementui-mobile.scss";
.project-form { .project-form {
margin: 15px auto; margin: 15px auto;
width: 800px; width: 100%;
padding: 15px; padding: 15px;
background-repeat: repeat; background-repeat: repeat;
background-color: rgba(229, 239, 247, 0.87); background-color: rgba(229, 239, 247, 0.87);

86
src/views/form/theme/index.vue

@ -3,23 +3,41 @@
<div class="left-container"> <div class="left-container">
<el-scrollbar class="left-scrollbar-container"> <el-scrollbar class="left-scrollbar-container">
<p class="theme-title">外观主题</p> <p class="theme-title">外观主题</p>
<el-row> <div class="tag-wr">
<el-col :span="3"> <div class="tag-title">风格</div>
<div class="tag-list">
<div v-for="item in styleList" :key="item.key" class="tag-item"
:class="{'tag-item-on':activeStyle==item.key}" @click="activeStyleHandle(item)">
{{ item.label }}</div>
</div>
</div>
<!-- <el-row>
<el-col :span="6">
<span class="theme-prompt-text">风格</span> <span class="theme-prompt-text">风格</span>
</el-col> </el-col>
<el-col v-for="item in styleList" <el-col v-for="item in styleList"
:key="item.key" :key="item.key"
:span="3"> :span="6">
<span :class="{'style-btn-active':activeStyle==item.key}" <span :class="{'style-btn-active':activeStyle==item.key}"
class="style-btn" class="style-btn"
@click="activeStyleHandle(item)">{{ item.label }}</span> @click="activeStyleHandle(item)">{{ item.label }}</span>
</el-col> </el-col>
</el-row> </el-row> -->
<el-row> <div class="tag-wr">
<el-col :span="3"> <div class="tag-title">颜色</div>
<div class="tag-list">
<div class="tag-item"
:class="{'tag-item-on':activeColor==''}" @click="activeColorHandle('')">全部</div>
<div v-for="c in colorList" :key="c" class="tag-item tag-c"
:style="{backgroundColor: c}"
:class="{'tag-item-on':activeColor==c}" @click="activeColorHandle(c)"></div>
</div>
</div>
<!-- <el-row>
<el-col :span="6">
<span class="theme-prompt-text">颜色</span> <span class="theme-prompt-text">颜色</span>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="6">
<span :class="{'style-btn-active':activeColor==''}" <span :class="{'style-btn-active':activeColor==''}"
class="style-btn" class="style-btn"
@click="activeColorHandle('')">全部</span> @click="activeColorHandle('')">全部</span>
@ -27,11 +45,11 @@
<el-col v-for="c in colorList" <el-col v-for="c in colorList"
:key="c" :key="c"
:class="{'style-btn-active':activeColor==c}" :class="{'style-btn-active':activeColor==c}"
:span="3" :span="6"
:style="{backgroundColor: c}" :style="{backgroundColor: c}"
class="color-btn" class="color-btn"
@click.native="activeColorHandle(c)" /> @click.native="activeColorHandle(c)" />
</el-row> </el-row> -->
<el-row> <el-row>
<el-col v-for="t in themeList" <el-col v-for="t in themeList"
:key="t.id" :key="t.id"
@ -411,7 +429,7 @@ export default {
} }
.left-scrollbar-container { .left-scrollbar-container {
height: 100%; height: 100%;
margin: 20px; margin: 20px 10px 20px 10px;
} }
::v-deep .el-scrollbar__wrap { ::v-deep .el-scrollbar__wrap {
overflow-x: hidden !important; overflow-x: hidden !important;
@ -426,7 +444,7 @@ export default {
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
} }
.preview-container { .preview-container {
width: 70%; width: 60%;
} }
.theme-title { .theme-title {
color: rgba(16, 16, 16, 100); color: rgba(16, 16, 16, 100);
@ -519,3 +537,49 @@ export default {
text-align: left; text-align: left;
} }
</style> </style>
<style lang="scss" scoped>
.tag-wr {
width: 100%;
display: flex;
margin-bottom: 10px;
.tag-title {
flex-shrink: 0;
width: 50px;
font-size: 16px;
font-weight: 500;
}
.tag-list {
// flex: 1;
display: flex;
flex-wrap: wrap;
.tag-item {
box-sizing: border-box;
margin: 0px 6px 6px 0;
// line-height: 30px;
border-radius: 4px;
padding: 3px;
color: #707070;
font-size: 14px;
text-align: center;
cursor: pointer;
border: 1px solid #eaeaea;
}
.tag-item:nth-child(4n) {
margin-right: 0;
}
.tag-c {
width: 40px;
height: 20px;
border: 0;
}
.tag-c:hover {
border: 1px solid rgba(11, 141, 213, 100);
}
.tag-item-on {
border: 1px solid rgba(11, 141, 213, 100);
}
}
}
</style>

Loading…
Cancel
Save