From 281272c9f973974642e40ef0830302a366fda54a Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Thu, 23 Apr 2026 17:29:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20wardrobe=20assets=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/download.svg | 5 +- src/assets/icons/downloadBtn.svg | 4 + src/assets/images/wardrobe/checked.png | Bin 0 -> 317 bytes src/assets/images/wardrobe/select.png | Bin 0 -> 208 bytes src/components/CommodityItem.vue | 166 +++++++++++---------- src/views/wardrobe/Assets.vue | 193 +++++++++++++++++++------ 6 files changed, 243 insertions(+), 125 deletions(-) create mode 100644 src/assets/icons/downloadBtn.svg create mode 100644 src/assets/images/wardrobe/checked.png create mode 100644 src/assets/images/wardrobe/select.png diff --git a/src/assets/icons/download.svg b/src/assets/icons/download.svg index f8078ae..f3d2676 100644 --- a/src/assets/icons/download.svg +++ b/src/assets/icons/download.svg @@ -1,4 +1,3 @@ - - - + + diff --git a/src/assets/icons/downloadBtn.svg b/src/assets/icons/downloadBtn.svg new file mode 100644 index 0000000..519f378 --- /dev/null +++ b/src/assets/icons/downloadBtn.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/images/wardrobe/checked.png b/src/assets/images/wardrobe/checked.png new file mode 100644 index 0000000000000000000000000000000000000000..d9fd543d69e6448af6ef94449774a6a1b98dbf4a GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9GG!XV7ZFl!D-1!HlL zyA#8@b22Z19F}xPUq=Rpjs4tz5?O(Kz7p4nlHmNblJdl&R0g-q^xVXG8>b}$Wp;SF zIEGX(zP);ow^>1=?csgC2Q2q&EIEP?@bDaNWldnTFyi1gVC3HN(|4AK=vt1wSM&|< z+*1!+eAlASKVt{G$vxgbVl$Slls#a{p8b|b}$WxPFI z978G?-(K0sdq9E5<>GFQ*%e~%A70$k-tL{Xz`@C(bpM`bCwnu~6KB$-^%Oei2A=n8U|{@Qw^NFfWx -import { ref, onMounted, onUnmounted, reactive, toRefs } from "vue"; +import { ref, onMounted, onUnmounted, reactive, toRefs } from 'vue' const props = defineProps({ - url: { - type: String, - default: '' - }, - name: { - type: String, - default: 'aaa' - }, - price: { - type: String, - default: '111' - } -}) -const emit = defineEmits([ - 'addShopping', - 'openDetail' -]) -let data = reactive({ + url: { + type: String, + default: '' + }, + name: { + type: String, + default: 'aaa' + }, + price: { + type: String, + default: '111' + }, + download: { + type: Boolean, + default: false + } }) +const emit = defineEmits(['addShopping', 'openDetail', 'download']) +let data = reactive({}) const addShopping = () => { - emit('addShopping') + if (props.download) { + emit('download') + } else { + emit('addShopping') + } } const openDetail = () => { - emit('openDetail') + emit('openDetail') } -onMounted(()=>{ -}) -onUnmounted(()=>{ -}) +onMounted(() => {}) +onUnmounted(() => {}) defineExpose({}) -const {} = toRefs(data); +const {} = toRefs(data)
- -
-
-
- {{ props.name }} -
-
- {{ props.price }} -
-
-
-
- -
-
-
-
+
+ +
+
+
+ {{ props.name }} +
+
+ {{ props.price }} +
+
+
+
+ +
+
+
+
\ No newline at end of file +.commodity-item { + width: var(--commodity-width, 100%); + &.is-download{ + img{ + cursor: initial; + } + } + > img { + width: 100%; + cursor: pointer; + height: var(--commodity-height, auto); + margin-bottom: var(--commodity-marginBottom, 1rem); + } + > .detail { + display: flex; + justify-content: space-between; + align-items: center; + > .text { + color: #232323; + > .name { + font-family: 'KaiseiOpti-Regular'; + font-weight: 400; + font-size: var(--commodity-name-fontSize, 1.6rem); + line-height: var(--commodity-name-lineHeight, 2.3rem); + margin-bottom: var(--commodity-name-marginBottom, 0rem); + } + > .price { + font-family: 'KaiseiOpti-Regular'; + font-weight: 400; + font-size: var(--commodity-price-fontSize, 1.4rem); + line-height: var(--commodity-price-lineHeight, 2.3rem); + &.is-download { + color: #979797; + } + } + } + } + .btn { + cursor: pointer; + } +} + diff --git a/src/views/wardrobe/Assets.vue b/src/views/wardrobe/Assets.vue index e6f6707..eb1467f 100644 --- a/src/views/wardrobe/Assets.vue +++ b/src/views/wardrobe/Assets.vue @@ -49,28 +49,52 @@ -
+
- {{ selectedCount }} Selected - - +
+ + {{ selectedCount }} Selected +
+ +
- + Download Selected
-
-
- +
+
+ +
+
@@ -90,7 +114,7 @@