From 7049ca6890d62948ce55188f38c043fc18ba0b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=81?= Date: Mon, 9 May 2022 22:39:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Item.vue => components/UiGoodsItem.vue | 2 +- layouts/default.vue | 2 +- pages/goods/detail/_id.vue | 329 +++++++++++++++++- pages/goods/list/index.vue | 8 +- 4 files changed, 322 insertions(+), 19 deletions(-) rename pages/goods/list/module/Item.vue => components/UiGoodsItem.vue (94%) diff --git a/pages/goods/list/module/Item.vue b/components/UiGoodsItem.vue similarity index 94% rename from pages/goods/list/module/Item.vue rename to components/UiGoodsItem.vue index 84e9786..a31a1d6 100644 --- a/pages/goods/list/module/Item.vue +++ b/components/UiGoodsItem.vue @@ -15,7 +15,7 @@ @@ -94,6 +306,64 @@ export default { &__preview { width: 456px; margin-right: 30px; + &-big { + width: 456px; + height: 456px; + margin-bottom: 24px; + } + &-control { + width: 100%; + height: 58px; + position: relative; + overflow: hidden; + padding-left: 43px; + &::before { + content: ""; + width: 43px; + height: 58px; + background: #fff; + position: absolute; + left: 0; + top: 0; + z-index: 1; + } + &::after { + content: ""; + width: 43px; + height: 58px; + background: #fff; + position: absolute; + right: 0; + top: 0; + } + &--left, + &--right { + width: 20px; + height: 34px; + position: absolute; + top: 12px; + z-index: 1; + cursor: pointer; + } + &--left { + left: 0; + } + &--right { + right: 0; + } + &--imgs { + width: 1500px; + img { + width: 58px; + height: 58px; + margin-right: 20px; + cursor: pointer; + } + .img-active { + border: 1px solid #ff512b; + } + } + } } &__details { width: 714px; @@ -195,4 +465,37 @@ export default { } } } +.section { + width: 1200px; + margin: 64px auto 0; + &-recommend { + width: 210px; + margin-right: 30px; + + /deep/.goods-item { + border: 1px solid #f2f2f2; + } + } + &-details { + width: 960px; + } + &-title { + width: 100%; + height: 40px; + line-height: 40px; + background: #f7f7f7; + border: 1px solid #f2f2f2; + padding-left: 16px; + font-size: 14px; + font-family: Microsoft YaHei-Regular, Microsoft YaHei; + font-weight: 400; + color: #666666; + } +} +.attr-item__active { + background: red !important; +} +.attr-item__disabled { + background: cyan !important; +} diff --git a/pages/goods/list/index.vue b/pages/goods/list/index.vue index 7087ff2..872d9b1 100644 --- a/pages/goods/list/index.vue +++ b/pages/goods/list/index.vue @@ -36,11 +36,11 @@
- + >
import { ApiGetGoodsList } from "@/plugins/api/goods"; import Sort from "./module/SortItem.vue"; -import GoodsItem from "./module/Item.vue"; +import UiGoodsItem from "@/components/UiGoodsItem.vue"; export default { - components: { Sort, GoodsItem }, + components: { Sort, UiGoodsItem }, data() { return { navActive: 0,