From 9e5b1abfbdae751bf468f111afed5b24cfed915d Mon Sep 17 00:00:00 2001 From: wangkesi Date: Thu, 11 Oct 2018 21:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/goods-classify.vue | 90 ++++++++++++++++++++----------------- src/view/home.vue | 4 +- 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/src/view/goods-classify.vue b/src/view/goods-classify.vue index 48357f9..c29f19e 100644 --- a/src/view/goods-classify.vue +++ b/src/view/goods-classify.vue @@ -129,10 +129,10 @@ export default { this.$router.push({ name: "首页" }); - }, - goTo(no){ - location.href="" - }, + }, + goTo(no) { + location.href = ""; + }, // 取到路由带过来的参数 getParams() { this.no = this.$route.params.no; @@ -275,13 +275,15 @@ export default { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; - word-wrap: break-word; - margin-top:0.1rem; + word-wrap: break-word; + margin-top: 0.1rem; + white-space: normal; + word-break: break-all; i { font-style: normal; background: rgba(255, 242, 229, 1); - padding: 0.05rem 0.1rem; - line-height: 0.28rem; + padding: 0.05rem 0.1rem; + line-height: 0.28rem; } } .ellipsis { @@ -289,9 +291,11 @@ export default { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; - line-height: 1 !important; + line-height: 1 !important; word-wrap: break-word; height: 0.32rem; + white-space: normal; + word-break: break-all; } .goods { background-color: #fff; @@ -372,66 +376,68 @@ export default { // align-items: center; } .item { - align-items: flex-start; - height: 1.87rem; - // position: relative; - a{ - display: block; - } - padding: 0.16rem; - width: 5.32rem; + align-items: flex-start; + height: 1.87rem; + // position: relative; + a { + display: block; + } + padding: 0.16rem; + width: 5.32rem; z-index: 1; // height: 1.87rem; box-sizing: border-box; - margin-bottom: 0.2rem; - .list-img-box{ - margin-right: 0.15rem; - } + margin-bottom: 0.2rem; + .list-img-box { + margin-right: 0.15rem; + } .thumb { width: 1.54rem; height: 1.54rem; } .info { - padding-top:0.05rem; - display: flex; - width: 3.33rem; - flex-grow:1; + padding-top: 0.05rem; + display: flex; + width: 3.33rem; + flex-grow: 1; height: 100%; font-size: 0; - flex-direction: column; - height: 100%; + flex-direction: column; + height: 100%; align-items: flex-start; - justify-content: space-between; - .info-box{ - width: 100%; - display: flex; - flex-direction: column; - } + justify-content: space-between; + .info-box { + width: 100%; + display: flex; + flex-direction: column; + } .title { font-size: 0.3rem; - color: #333; - width: 100%; + color: #333; + width: 100%; padding: 0; line-height: 1; } .rule { font-size: 0.22rem; - color: #999; - width: 100%; - padding: 0.1rem 0 0; - height: 0.22rem; - overflow: hidden; + color: #999; + width: 100%; + padding: 0.1rem 0 0; + height: 0.22rem; + overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; word-wrap: break-word; margin-top: 0.16rem; + white-space: normal; + word-break: break-all; line-height: 1; } .full { height: 0.2rem; - font-size: 0.2rem; - width: 100%; + font-size: 0.2rem; + width: 100%; font-style: normal; font-weight: 400; color: rgba(244, 163, 83, 1); diff --git a/src/view/home.vue b/src/view/home.vue index 5e7b01c..3dc82fd 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -487,7 +487,9 @@ export default { margin-bottom: 0.13rem; text-overflow: ellipsis; overflow: hidden; - display: -webkit-box; + display: -webkit-box; + white-space: normal; + word-break: break-all; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-height: 1;