From 1bf7ab7c685e461c982d2ea36739465f0fdebbff Mon Sep 17 00:00:00 2001 From: ewall <1054064180@qq.com> Date: Thu, 9 Aug 2018 16:49:51 +0800 Subject: [PATCH] 'add' --- src/assets/styles/variables.less | 3 +- src/view/classify.vue | 135 +++++++++++++++++++++++++++---- 2 files changed, 122 insertions(+), 16 deletions(-) diff --git a/src/assets/styles/variables.less b/src/assets/styles/variables.less index e084418..6821746 100644 --- a/src/assets/styles/variables.less +++ b/src/assets/styles/variables.less @@ -7,4 +7,5 @@ // 字号大小 @sizeXL: 18px; @sizeL: 16px; -@sizeM: 14px; \ No newline at end of file +@sizeM: 14px; +@sizeS: 12px; \ No newline at end of file diff --git a/src/view/classify.vue b/src/view/classify.vue index 740879e..b389981 100644 --- a/src/view/classify.vue +++ b/src/view/classify.vue @@ -2,16 +2,37 @@
- +
分类
- +
-
+
-
+
+
为你推荐
+
男装
+
女装
+
男鞋
+
女鞋
+
手势配饰
+
个人护理
+
-
+
+
+
+ +
+
人气美衣
+
+
+ +
连衣裙
+
+
+
+
@@ -22,14 +43,27 @@ export default { components: {}, data() { return { - msg: "Hello World!" + mainHeight: "" }; }, - created() {}, + created() { + this.mainHeight = window.innerHeight - 45 + "px"; + }, mounted() {}, watch: {}, computed: {}, - methods: {} + methods: { + // 回退 + goBack() { + this.$router.go(-1); + }, + // 回到首页 + goHome() { + this.$router.push({ + path:'/' + }) + } + } }; @@ -39,11 +73,15 @@ export default { background: @bgColor; // 顶部栏 .topNav { + box-sizing: border-box; + height: 45px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; - padding: 0.133333rem 0.24rem; + padding: 0 0.24rem; + background: #fff; + border-bottom: 1px solid @bgColor; .title { font-size: @sizeL; } @@ -54,12 +92,79 @@ export default { } // 主体 .main { - } - // 主体左侧 - .mainLeft { - } - // 主体右侧 - .mainRight { + display: flex; + flex-direction: row; + overflow: hidden; + // 主体左侧 + .mainLeft { + width: 2.48rem; + height: 100%; + font-size: @sizeM; + .item { + position: relative; + box-sizing: border-box; + width: 100%; + height: 1.28rem; + line-height: 1.28rem; + text-align: center; + } + .item_on::before { + content: ""; + position: absolute; + left: 0; + top: 0; + width: 0.10667rem; + height: 1.28rem; + font-size: 0; + background-color: #de3d96; + } + .item_on { + background: #fff; + } + } + // 主体右侧 + .mainRight { + width: 7.52rem; + height: 100%; + background: #fff; + .container { + padding: 0 .373333rem; + .display_img { + img { + display: block; + width: 100%; + height: 2.72rem; + margin-top: .373333rem; + } + } + .title { + box-sizing: border-box; + font-size: @sizeS; + font-weight: bold; + padding: 0.533333rem 0 0.533333rem 0; + } + .content { + display: flex; + flex-flow: row wrap; + justify-content: space-between; + border-bottom: 1px solid @bgColor; + + .content_item { + padding: 0 .066667rem; + img { + display: block; + width: 1.653333rem; + height: 1.653333rem; + } + .txt { + text-align: center; + font-size: @sizeS; + padding: 0.293333rem 0 0.666667rem 0; + } + } + } + } + } } }