<van-cell-group>
            <!--cell+popup+area省市区的坑-->
            <van-cell v-model="carmodel"  value @click="shows = true"></van-cell>
            <van-popup v-model="shows" position="bottom">
              <van-area
                ref="area"
                value="110000"
                :area-list="areaList"
                @change="onChange"
                @confirm="shows = false"
                @cancel="shows = false"
              />
            </van-popup>
          </van-cell-group>
 
import { Cell, CellGroup, Popup, Field,  Area, Picker } from 'vant'
 data() {
    return {
shows: false,
      areaList,
      carmodel: "省/市/区",
    };
  },
 
 
 
 methods: {
    onChange(picker, value, index) {
      console.log("当前值:" + value + "当前索引:" + index);

      let areaName = "";
      for (var i = 0; i < value.length; i++) {
        areaName = areaName + value[i].name + " ";
      }
      this.carmodel = areaName;
    },

  },

相关文章:

  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-02-26
  • 2021-06-25
  • 2021-12-22
猜你喜欢
  • 2021-08-21
  • 2022-12-23
  • 2021-07-10
  • 2021-05-18
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案