一.搜索框
navigator导航
页面链接。
open-type
SearchInput.wxml
<!--components/SearchInput/SearchInput.wxml--> <!--搜索--> <view class="search_input"> <navigator url="/pages/search/search" open-type="navigate"> 搜索 </navigator> </view>
SearchInput.wxss
/* components/SearchInput/SearchInput.wxss */ .search_input { height: 90rpx; padding: 10rpx; background-color: var(--themeColor); } .search_input navigator { height: 100%; display: flex; justify-content: center; align-items: center; background-color: #fff; border-radius: 15rpx; color: #666666; }