實現elementUI的el-date-picker自動彈開

在這裏插入圖片描述
點擊左邊時間控件選擇後自動彈出右邊時間控件

      <el-date-picker
        size="mini"
        v-model="monthBg"
        type="month"
        :picker-options="pickerOptions0"
        placeholder="選擇開始月份"
        @change = 'chooseBg'>
      </el-date-picker> 
      <span style="margin:0 10px;line-height:28px">至</span>     
      <el-date-picker
        ref="dataEnd"
        size="mini"
        v-model="monthEnd"
        type="month"
        :picker-options="pickerOptions0"
        placeholder="選擇結束月份">
      </el-date-picker> 
    chooseBg(){
      
      this.$refs.dataEnd.focus()


    },
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章