MrShi
2024-10-24 ba3a85f2bf6dc706ba2f74e88e9d81197533f1b7
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()