Browse Source

更改Ui

old
wangqing 4 years ago
parent
commit
39402f0741
  1. 33
      src/assets/styles/form/home.scss
  2. 3
      src/assets/styles/form/index.scss
  3. 5
      src/assets/styles/form/mixin.scss
  4. 2
      src/assets/styles/index.scss
  5. 51
      src/assets/styles/mixin.scss
  6. 52
      src/assets/styles/resources/utils.scss
  7. 1
      src/assets/styles/resources/variables.scss
  8. 20
      src/components/Form/DescText/index.vue
  9. 83
      src/components/Form/ImageSelect/index.vue
  10. 8
      src/components/Form/index.js
  11. 24
      src/router/modules/form.js
  12. 6
      src/router/modules/root.js
  13. 3
      src/views/account/ForgetPwd.vue
  14. 3
      src/views/form/RightPanel.vue
  15. 13
      src/views/form/logic.vue
  16. 70
      src/views/form/newIndex.vue
  17. 142
      src/views/home/NewIndex.vue
  18. 2
      src/views/official/index.vue
  19. 1
      src/views/test.vue

33
src/assets/styles/form/home.scss

@ -1,11 +1,11 @@
$selectedColor: #fafafa;
$lighterBlue: #e4efff;
@import '../element-variables.scss';
$selectedColor: rgba(24, 144, 255, 0.05);
$lighterBlue: #1890ff;
.form-edit-container {
position: relative;
width: 100%;
height: 100%;
height: calc(100vh - 60px);
overflow-y: hidden;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
.components-list {
padding: 8px;
@ -42,34 +42,35 @@ $lighterBlue: #e4efff;
font-size: 15px;
}
&:hover {
border: 1px dashed #4144f8;
color: #4480f5;
border: 1px dashed $--color-primary;
color: $--color-primary;
.svg-icon {
color: #4144f8;
color: $--color-primary;
}
}
}
.left-board {
width: 260px;
position: absolute;
left: 40px;
left: 10px;
top: 0;
height: 100vh;
margin-top: 5px;
height: calc(100vh - 80px);
background-color: rgba(255, 255, 255, 100);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 100);
}
.el-menu.el-menu--horizontal {
border-bottom: none;
}
.left-scrollbar {
height: calc(100vh - 290px);
height: calc(100vh - 80px);
overflow: hidden;
margin: 5px;
border-radius: 7px;
background-color: rgba(255, 255, 255, 100);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 100);
}
.center-scrollbar {
height: calc(100vh - 230px);
height: calc(100vh - 60px);
overflow: hidden;
width: 90%;
margin: 20px auto 0;
@ -91,7 +92,7 @@ $lighterBlue: #e4efff;
right: 0;
text-align: center;
font-size: 18px;
color: #0067f3;
color: $--color-primary;
letter-spacing: 4px;
}
.action-bar {
@ -135,7 +136,7 @@ $lighterBlue: #e4efff;
right: 0;
top: 0;
height: 3px;
background: rgb(89, 89, 223);
background: $--color-primary;
z-index: 2;
}
}

3
src/assets/styles/form/index.scss

@ -1,3 +1,4 @@
@import '../element-variables.scss';
$editorTabsborderColor: #121315;
body,
html {
@ -120,7 +121,7 @@ textarea {
margin-left: 6px;
}
.el-icon-plus {
color: #409eff;
color: $--color-primary;
}
.el-icon-delete {
color: #157a0c;

5
src/assets/styles/form/mixin.scss

@ -1,3 +1,4 @@
@import '../element-variables.scss';
@mixin action-bar {
.action-bar {
height: 33px;
@ -8,7 +9,7 @@
display: inline-block;
padding: 0 6px;
line-height: 32px;
color: #8285f5;
color: $--color-primary;
cursor: pointer;
font-size: 14px;
user-select: none;
@ -16,7 +17,7 @@
font-size: 20px;
}
&:hover {
color: #4348d4;
color: $--color-primary;
}
}
.bar-btn + .bar-btn {

2
src/assets/styles/index.scss

@ -9,7 +9,7 @@ body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
label {
font-weight: 700;

51
src/assets/styles/mixin.scss

@ -55,3 +55,54 @@
border-bottom: $transparent-border-style;
}
}
// @mixin 通过 @include 调用使用
// % 通过 @extend 调用使用
// 文字超出隐藏默认为单行超出隐藏可设置多行
@mixin text-overflow($line: 1, $fixed-width: true) {
@if ($line==1 and $fixed-width==true) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@else {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $line;
overflow: hidden;
}
}
// 定位居中默认水平居中可选择垂直居中或者水平垂直都居中
@mixin position-center($type: x) {
position: absolute;
@if ($type==x) {
left: 50%;
transform: translateX(-50%);
}
@if ($type==y) {
top: 50%;
transform: translateY(-50%);
}
@if ($type==xy) {
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
}
}
// 文字两端对齐
%justify-align {
text-align: justify;
text-align-last: justify;
}
// 清除浮动
%clearfix {
zoom: 1;
&::before,
&::after {
content: '';
display: block;
clear: both;
}
}

52
src/assets/styles/resources/utils.scss

@ -1,52 +0,0 @@
// @mixin 通过 @include 调用使用
// % 通过 @extend 调用使用
// 文字超出隐藏默认为单行超出隐藏可设置多行
@mixin text-overflow($line: 1, $fixed-width: true) {
@if ($line==1 and $fixed-width==true) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@else {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $line;
overflow: hidden;
}
}
// 定位居中默认水平居中可选择垂直居中或者水平垂直都居中
@mixin position-center($type: x) {
position: absolute;
@if ($type==x) {
left: 50%;
transform: translateX(-50%);
}
@if ($type==y) {
top: 50%;
transform: translateY(-50%);
}
@if ($type==xy) {
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
}
}
// 文字两端对齐
%justify-align {
text-align: justify;
text-align-last: justify;
}
// 清除浮动
%clearfix {
zoom: 1;
&::before,
&::after {
content: '';
display: block;
clear: both;
}
}

1
src/assets/styles/resources/variables.scss

@ -1 +0,0 @@
// 全局变量

20
src/components/Form/DescText/index.vue

@ -0,0 +1,20 @@
<template>
<p>
{{ value }}
</p>
</template>
<script>
export default {
name: 'DescText',
props: {
value: {
type: String,
default: ''
}
},
methods: {
}
}
</script>

83
src/components/Form/ImageSelect/index.vue

@ -0,0 +1,83 @@
<template>
<div>
<el-radio-group
v-if="!multiple"
v-bind="$attrs" v-on="$listeners" @change="onChange"
>
<div v-for="option in options" :key="option.value" class="img-radio-item">
<el-image
class="image"
:src="option.image"
fit="scale-down"
:preview-src-list="[option.image]"
/>
<el-radio :label="option.value">{{ option.label }}</el-radio>
</div>
</el-radio-group>
<el-checkbox-group
v-else
v-bind="$attrs" v-on="$listeners"
@change="onChange"
>
<div v-for="option in options" :key="option.value" class="img-radio-item">
<el-image
class="image"
:src="option.image"
fit="scale-down"
:preview-src-list="[option.image]"
/>
<el-checkbox :label="option.value">{{ option.label }}</el-checkbox>
</div>
</el-checkbox-group>
</div>
</template>
<script>
export default {
name: 'ImageSelect',
props: {
options: {
type: Array,
default: function() {
return []
},
required: true
},
multiple: {
type: Boolean,
default: false
}
},
methods: {
onChange(e) {
console.log(e)
this.$emit('change', e)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-radio-button__inner,
.el-radio-group,
.el-checkbox-group {
display: flex !important;
}
.img-radio-item {
display: flex;
flex-direction: column !important;
align-content: center !important;
align-items: center !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
margin: 3px !important;
.image {
width: 100px;
height: 100px;
margin: 2px 15px 4px 15px;
}
.el-radio {
margin: 4px;
}
}
</style>

8
src/components/Form/index.js

@ -0,0 +1,8 @@
const ImageSelect = require('./ImageSelect/index').default
const DescText = require('./DescText/index').default
export default {
install: Vue => {
Vue.component(ImageSelect.name, ImageSelect)
Vue.component(DescText.name, DescText)
}
}

24
src/router/modules/form.js

@ -0,0 +1,24 @@
export default [
{
path: '/form1',
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/form/newIndex.vue'),
children: [
{
path: '',
meta: {requireLogin: true},
component: () => import(/* webpackChunkName: 'root' */ '@/views/form/editor')
},
{
path: 'logic',
meta: {requireLogin: true},
component: () => import(/* webpackChunkName: 'root' */ '@/views/form/logic')
},
{
path: 'statistics',
meta: {requireLogin: true},
component: () => import(/* webpackChunkName: 'root' */ '@/views/form/statistics')
}
]
}
]

6
src/router/modules/root.js

@ -20,12 +20,12 @@ export default [
component: () => import(/* webpackChunkName: 'root' */ '@/views/official/index.vue'),
children: [
{
path: '/',
path: '',
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/official/introduction.vue')
},
{
path: '/login',
path: 'login',
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/account/login.vue')
},
@ -54,7 +54,7 @@ export default [
{
path: '/home1',
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/home/newIndex')
component: () => import(/* webpackChunkName: 'root' */ '@/views/home/NewIndex')
},
{
path: '/home',

3
src/views/account/ForgetPwd.vue

@ -65,7 +65,7 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPasswordHandle">
<el-button type="primary" @click="resetPasswordHandle">
提交
</el-button>
</el-form-item>
@ -260,6 +260,7 @@ export default {
</script>
<style lang="scss" scoped>
@import '@/assets/styles/mixin.scss';
.app-container {
height: 100%;
width: 100%;

3
src/views/form/RightPanel.vue

@ -1063,12 +1063,13 @@ export default {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
.field-box {
position: relative;
height: calc(100vh - 242px);
height: calc(100vh - 70px);
box-sizing: border-box;
overflow: hidden;
}
.el-scrollbar {
height: 100%;
padding-bottom: 50px;
}
}
.select-item {

13
src/views/form/logic.vue

@ -15,7 +15,7 @@
<div class="show-logic-container">
<div v-if="!logicList.length" class="not-logic-container">
<el-row>
<el-col :offset="10">
<el-col :offset="10" :span="5">
<el-button type="text" @click="addLogicHandle">
<i class="el-icon-circle-plus-outline" />
<span class="label">添加逻辑</span>
@ -25,7 +25,7 @@
</div>
<div v-else class="logic-item-container">
<el-row align="middle" justify="center" type="flex">
<el-col :offset="1" :span="11">
<el-col :offset="1" :span="10">
<p> {{ logicList.length }}. 条显示逻辑</p>
</el-col>
<el-col :offset="6" :span="6">
@ -273,13 +273,14 @@ export default {
<style lang="scss" scoped>
.project-logic-container {
width: 100%;
background-color: #f7f7f7;
min-height: 84vh;
min-width: 80vw;
height: 100%;
padding: 0;
display: flex;
justify-content: center;
position: relative;
overflow: hidden;
.scrollbar-container {
height: 90vh;
height: 100%;
}
.header-row {
width: 230px;

70
src/views/form/newIndex.vue

@ -0,0 +1,70 @@
<template>
<div class="form-index-container">
<el-card class="header-container">
<el-row type="flex" align="middle">
<el-col :span="1" :offset="1">
<i class="el-icon-back" />
</el-col>
<el-col :span="3">
<img src="@/assets/images/indexLogo.png" class="header-logo" @click="$router.push({path:'/home'})">
</el-col>
<el-col :span="1">
<el-button type="primary">编辑</el-button>
</el-col>
<el-col :span="2">
<el-button type="success">保存为模板</el-button>
</el-col>
<el-col :span="1">
<el-button type="primary" plain>主题</el-button>
</el-col>
<el-col :span="1">
<el-button type="success" plain>设置</el-button>
</el-col>
<el-col :span="1">
<el-button type="info" plain>逻辑</el-button>
</el-col>
<el-col :span="1">
<el-button type="warning" plain>统计</el-button>
</el-col>
</el-row>
</el-card>
<div class="main-container">
<router-view />
</div>
</div>
</template>
<script>
export default {
name: 'NewIndex',
components: {
}
}
</script>
<style lang="scss" scoped>
.form-index-container {
height: 100%;
width: 100%;
}
::v-deep .el-card__body {
padding: 0;
}
.header-container {
width: 100%;
height: 60px;
.el-icon-back {
font-size: 22px;
font-weight: 550;
color: #000;
}
.header-logo {
height: 60px;
width: 200px;
}
}
.main-container {
width: 100vw;
height: calc(100vh - 60px);
}
</style>

142
src/views/home/NewIndex.vue

@ -0,0 +1,142 @@
<template>
<div class="home-container">
<div>
<div class="banner-container">
<el-carousel height="60px">
<el-carousel-item v-for="item in 4" :key="item">
<img style="height: 60px;" src="https://static.wenjuan.pub/1620698916041_333.jpg">
</el-carousel-item>
</el-carousel>
</div>
</div>
<div class="flex-row">
<div class="left-container">
<div class="userinfo-view">
<span class="hi-tips">HI.</span>
<span class="name text-overflow">15080929435</span>
<el-avatar class="avatar" size="small"
src="https://freebrio.oss-cn-shanghai.aliyuncs.com/t/avatar.jpg"
/>
</div>
<div class="menu-view">
<div class="menu-item">
<font-icon class="fas fa-laptop" />
<span>工作台</span>
</div>
<div class="menu-item">
<font-icon class="fas fa-clipboard" />
<span>模板中心</span>
</div>
<div class="menu-item">
<font-icon class="fas fa-user" />
<span>个人中心</span>
</div>
<div class="menu-item">
<font-icon class="fas fa-cog" />
<span>系统设置</span>
</div>
</div>
</div>
<div class="right-container">
<el-button type="primary">新建项目</el-button>
<el-button>新建项目</el-button>
<my-project />
</div>
</div>
<div class="about-container">
<font-icon class="fas fa-user" />
<span class="desc-text">关于填鸭</span>
</div>
</div>
</template>
<script>
import MyProject from '@/views/project/MyProject'
export default {
name: 'NewIndex',
components: {
MyProject
}
}
</script>
<style lang="scss" scoped>
.home-container {
background-color: rgba(247, 247, 247, 90);
display: flex;
height: 100%;
width: 100%;
flex-direction: column;
}
.banner-container {
height: 98px;
}
.left-container {
min-width: 280px;
height: 501px;
line-height: 20px;
border-radius: 2px;
margin: 0 89px;
text-align: center;
//border: 1px solid rgba(255, 255, 255, 100);
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
padding-left: 20px;
}
.userinfo-view {
display: flex;
align-items: center;
height: 42px;
line-height: 42px;
background-color: rgba(255, 255, 255, 100);
.hi-tips {
font-size: 21px;
margin-left: 30px;
}
.name {
width: 100px;
}
.avatar {
margin-left: 10px;
}
}
.menu-view {
margin-top: 20px;
height: 501px;
background-color: rgba(255, 255, 255, 100);
padding: 20px;
.menu-item {
color: rgba(16, 16, 16, 100);
font-size: 20px;
text-align: left;
line-height: 40px;
.fas {
color: #1c7bf9;
margin: 5px;
}
span {
margin-left: 10px;
}
}
}
.project-container {
display: flex;
flex-direction: row;
.project-item {
display: flex;
}
}
.about-container {
position: fixed;
width: 100%;
bottom: 20px;
display: flex;
justify-content: center;
margin-top: 40px;
.fa-user {
font-size: 19px;
color: rgba(172, 172, 172, 100);
margin: 1px;
}
}
</style>

2
src/views/official/index.vue

@ -21,7 +21,7 @@
<el-col class="header-col" :span="3">
<el-button v-if="isLogin" class="header-btn" @click="$router.push({path:'/home'})"> </el-button>
<el-button v-if="!isLogin&&this.$route.path!='/login' " class="header-btn"
@click="$router.push({path:'/login '})"
@click="$router.push({path:'/login'})"
>
</el-button>

1
src/views/test.vue

@ -30,7 +30,6 @@ export default {
methods: {
success(params) {
// eslint-disable-next-line no-debugger
debugger
// params , 便
console.log(params)
},

Loading…
Cancel
Save