From ba3a85f2bf6dc706ba2f74e88e9d81197533f1b7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 24 十月 2024 18:30:12 +0800
Subject: [PATCH] 优化
---
h5/components/searchShopList.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/h5/components/searchShopList.vue b/h5/components/searchShopList.vue
index 25a7736..2bd9613 100644
--- a/h5/components/searchShopList.vue
+++ b/h5/components/searchShopList.vue
@@ -1,7 +1,7 @@
<template>
<view class="search" v-if="show" @click="close">
<view class="search_box" @click.stop="test">
- <view class="search_box_item" style="background: rgba(13, 30, 65, 0.70)">
+ <view class="search_box_item" :style="{background: !search ? 'rgba(13, 30, 65, 0.70)' : search.bgType === 1 ? percentage(search.bgColor, search.bgAlpha) : 'rgba(13, 30, 65, 0.70)'}">
<view class="icon">
<image src="@/static/ic_search@2x.png" mode="widthFix"></image>
</view>
@@ -23,6 +23,11 @@
title: ''
}
},
+ props: {
+ search: {
+ type: Object | null
+ }
+ },
methods: {
open() {
this.title = ''
@@ -34,6 +39,10 @@
test() {
return false
},
+ percentage(bgColor, alpha) {
+ let res = +(alpha * 2.55).toFixed(0)
+ return bgColor + res.toString(16)
+ },
submit() {
this.$emit('getTitle', this.title)
this.close()
--
Gitblit v1.9.3