Picker default settings

the following code:

<picker bindchange="bindPickerChange" range="["","",""]" value="0">

this shows the three options in range.

my requirement is to implement

Please select is displayed by default. These three options pop up when you click picker. How can this be realized?

at present, I am thinking of adding the first item "Please select" in range, but there will be a lot of residual data, because there are several picker,. How can this requirement be realized? picker in Mini Program"s document has been checked, but no answer has been found!

Apr.11,2021

<picker bindchange="bindReasonChange" range="{{refundReasons}}" value="{{index}}"  class='item-right'>
    <view class="picker">{{refundReason?refundReason:""}}</view>
</picker>

data: {    
    refundReason: '',
    refundReasons: ['', '', '']
  }

can be realized through a trinomial operation


is similar to the answer of the ternary operator above
.wxml file:

<picker bindchange="typeChange" value="{{typeIndex}}" range="{{types}}">
<view class="picker">{{typeIndex==null ? "" : types[typeIndex]}}</view>
</picker>

in the .js file

Page({
   data: {
      types:["","",""],
      typeIndex:null
   },
    typeChange(event){
      this.setData({
            typeIndex:event.detail.value
      })
   }
})
Menu