zoukankan      html  css  js  c++  java
  • v-distpicker 一个好用的三级联动的插件

    // 引入插件
    npm install v-distpicker --save import VDistpicker from 'v-distpicker' Vue.component('v-distpicker', VDistpicker)
    <template>
    <v-distpicker @selected="onSelected"></v-distpicker>
    <template>

    // 配置 placeholders
    :placeholders="placeholders"
    
    data() {
          return {
              placeholders: {
                  province: '------- 省 --------',
                  city: '--- 市 ---',
                  area: '--- 区 ---',
              }
          }
      }

    // 配置mo默认值
    :province="select.province" :city="select.city" :area="select.area"
    data() {
        return {
          select: { province: '广东省', city: '广州市', area: '海珠区' },
        }
      },


    // 开启手机模式
    type="mobile"

    // 隐藏区
    <v-distpicker hide-area></v-distpicker>

    // 触发事件
    @selected="onSelected"

    // 只有省,或者县

    <v-distpicker only-province></v-distpicker>
     
    官网: https://distpicker.pigjian.com/ 
     
     

     

  • 相关阅读:
    H
    饭卡(0 1背包)
    J
    H
    E
    3991: [SDOI2015]寻宝游戏
    CF 1051 F. The Shortest Statement
    CF 643 E. Bear and Destroying Subtrees
    4567: [Scoi2016]背单词
    4946: [Noi2017]蔬菜
  • 原文地址:https://www.cnblogs.com/panax/p/10966376.html
Copyright © 2011-2022 走看看