Skip to content

Commit 956205a

Browse files
committed
init
1 parent 213262c commit 956205a

File tree

7 files changed

+73
-60
lines changed

7 files changed

+73
-60
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div id="app">
33
<transition name="move" mode="out-in">
4-
<router-view></router-view>
4+
<router-view/>
55
</transition>
66
</div>
77
</template>

src/components/design-form.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div class="container">设计表单</div>
3+
</template>
4+
5+
<script>
6+
export default {
7+
8+
};
9+
</script>
10+
11+
<style>
12+
.container {
13+
}
14+
</style>
15+
16+
17+

src/components/header.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export default {
5050
.dropdown {
5151
height: 100%;
5252
padding: 0 30px;
53-
background: #eee;
53+
color: #eee;
54+
user-select: none;
55+
/* background: #eee; */
5456
}
5557
.el-dropdown-link {
5658
cursor: pointer;

src/components/widget-config.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<template>
2+
<div>
3+
表单控件配置
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
10+
};
11+
</script>
12+
13+

src/views/home.vue

Lines changed: 29 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,42 @@
11
<template>
22
<div class="wrapper">
33
<header class="header">
4-
<v-header></v-header>
4+
<v-header/>
55
</header>
6-
<div class="sidebar">
7-
<v-sidebar></v-sidebar>
6+
<div class="widget-form">
7+
<widgetForm/>
88
</div>
9-
<div id="container">
10-
<div
11-
class="handle-sidebar"
12-
:class="showSidebar?'el-icon-caret-left':'el-icon-caret-right'"
13-
@click="toggleSidebar()"
14-
></div>
15-
<div style="min-width: 1100px;">
16-
<transition name="move" mode="out-in">
17-
<router-view></router-view>
18-
</transition>
19-
</div>
9+
<div class="design-form">
10+
<designForm/>
11+
</div>
12+
<div class="widget-config">
13+
<widgetConfig/>
2014
</div>
2115
</div>
2216
</template>
2317

2418
<script>
2519
import vHeader from "@/components/header.vue";
26-
import vSidebar from "@/components/sidebar.vue";
20+
import widgetForm from "@/components/widget-form.vue";
21+
import designForm from "@/components/design-form.vue";
22+
import widgetConfig from "@/components/widget-config.vue";
2723
export default {
2824
components: {
2925
vHeader,
30-
vSidebar
26+
widgetForm,
27+
designForm,
28+
widgetConfig
3129
},
3230
data() {
3331
return {
34-
showSidebar: true,
35-
dom_container: ""
3632
};
3733
},
3834
methods: {
39-
toggleSidebar() {
40-
this.showSidebar
41-
? (document.getElementById("container").style.left = 0)
42-
: (document.getElementById("container").style.left = "200px");
43-
this.showSidebar = !this.showSidebar;
44-
}
35+
4536
},
4637
mounted() {
47-
this.$nextTick(function() {
48-
window.dom_container = document.getElementById("container");
38+
this.$nextTick(function () {
39+
4940
});
5041
}
5142
};
@@ -59,9 +50,9 @@ export default {
5950
color: #fff;
6051
background: #242f42;
6152
}
62-
.sidebar {
53+
.widget-form {
6354
position: absolute;
64-
width: 200px;
55+
width: 300px;
6556
left: 0;
6657
top: 70px;
6758
bottom: 0;
@@ -73,39 +64,25 @@ export default {
7364
display: none;
7465
}
7566
76-
#container {
67+
.design-form {
7768
background: none repeat scroll 0 0 #fff;
7869
position: absolute;
79-
left: 200px;
80-
right: 0;
70+
left: 300px;
71+
right: 300px;
8172
top: 70px;
8273
bottom: 0;
8374
padding: 40px;
8475
box-sizing: border-box;
8576
overflow: auto;
86-
transition: 0.3s;
8777
}
88-
.handle-sidebar {
78+
.widget-config {
8979
position: absolute;
90-
top: 0;
91-
left: 0;
92-
font-size: 30px;
93-
}
94-
@media screen and (min-width: 720px) {
95-
.handle-sidebar {
96-
display: none;
97-
}
98-
.user-info {
99-
padding-right: 50px;
100-
}
101-
}
102-
.move-enter-active,
103-
.move-leave-active {
104-
transition: opacity 0.5s;
105-
}
106-
.move-enter,
107-
.move-leave {
108-
opacity: 0;
80+
width: 300px;
81+
right: 0;
82+
top: 70px;
83+
bottom: 0;
84+
background: #324157;
85+
-ms-overflow-style: none;
10986
}
11087
</style>
11188

vue.config.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
module.exports = {
2-
baseUrl: "./",
3-
productionSourceMap: false,
2+
baseUrl: "./",
3+
productionSourceMap: false,
4+
chainWebpack: config => {
5+
// 移除 prefetch 插件
6+
config.plugins.delete('prefetch')
7+
},
48

5-
devServer: {
6-
port: 5000
7-
}
8-
};
9+
devServer: {
10+
port: 5000
11+
}
12+
};

0 commit comments

Comments
 (0)