| | |
| | | <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> |
| | |
| | | title: '' |
| | | } |
| | | }, |
| | | props: { |
| | | search: { |
| | | type: Object | null |
| | | } |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.title = '' |
| | |
| | | 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() |