select.wxml
<view class="select-box">
<view class="select-current" catchtap="openClose">
<text class="current-name">{
{current.name}}</text>
</view>
<view class="option-list" wx:if="{
{isShow}}" catchtap="optionTap">
<!-- <text class="option"
data-id="{
{defaultOption.id}}"
data-name="{
{defaultOption.name}}">{
{defaultOption.name}}
</text> -->
<text class="option"
wx:for="{
{result}}"
wx:key="{
{item.id}}"
data-id="{
{item.id}}"
data-name="{
{item.name}}">{
{item.name}}
</text>
</view>
</view>
select.wxss
.