You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

44 lines
985 B

<template>
<view class="wanlpage-search" :style="[pageData.style]">
<view @tap="onSearch()" :style="{'border-radius':pageData.params.searchRadius,'background':pageData.params.searchBackground,'padding':pageData.params.searchPadding}" >
<text class="wlIcon-sousuo1 margin-right-xs"></text><text>{{pageData.data[0].content}}</text>
</view>
</view>
</template>
<script>
export default {
name: "WanlPageSearch",
props: {
pageData: {
type: Object,
default: function() {
return {
name: '搜索组件',
type: 'search',
params: [],
style: [],
data: []
}
}
},
shopData: {
type: Object,
default () {}
}
},
methods: {
onSearch() {
if(this.shopData){
this.$wanlshop.to(`/pages/shop/product/list?shop_id=${this.shopData.id}`);
}else{
this.$wanlshop.to('/pages/page/search?type=goods','fade-in',100);
}
}
}
}
</script>
<style>
.wanlpage-search{
overflow: hidden;
}
</style>