• vuetreeselect的使用


    需求

    选择组织,一次呈树形状铺开,仅支持单选,可以删除,支持搜索

    实现:

    一、首先安装包"@riophae/vue-treeselect":"^0.0.37",

    二、在要用的vue页面上

    import Treeselectfrom '@riophae/vue-treeselect'

    import '@riophae/vue-treeselect/dist/vue-treeselect.css'

    三、挂组件

    components: {Treeselect},

    四、在需要写的地方引

    <treeselect
    
      :multiple="false"
    
      :options="selectPlace"
    
      :flat="true"
    
      :sort-value-by="sortValueBy"
    
      :default-expand-level="1"
    
      placeholder="请输入城市名,如杭州市,厦门市"
    
      v-model="value"
    
    />
    

    :multiple="false" // 是否可以多选: false - 不支持多选, true - 支持多选

    :options="selectOrg" // 提供给用户选择的数据

    来源:https://www.jianshu.com/p/df42b3f374c1

  • 相关阅读:
    JQ 放大镜
    Jquery.tmpl
    Jquery Live方法
    Bootstrap之底层媒体查询
    Bootstrap 字体与图标
    工具提示
    模态框
    BootStrap格栅系统
    Tab选项卡
    弹出框
  • 原文地址:https://www.cnblogs.com/DeryKong/p/16033890.html
Copyright © 2020-2023  润新知