Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

iview-tree-select

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iview-tree-select

mutiple level tree selector

latest
npmnpm
Version
1.1.1
Version published
Weekly downloads
5
-37.5%
Maintainers
1
Weekly downloads
 
Created
Source

iview-tree-select

![npm version] (https://img.shields.io/badge/npm-1.1.1-brightgreen.svg)

基于iview进行二次开发的级联树状选择组件,支持无限级,多选,中英文搜索(注:使用前先引入iview,否则无法使用)

效果

Image text Image text Image text Image text

安装

npm install iview-tree-select --save

引入

CommonJs

const treeSelect = require('iview-tree-select');

es6

import treeSelect from 'iview-tree-select';

##调用方式

<treeSelect v-model="value" :data="data" size="small" :width="200" />

##参数说明 1 data 数据源,格式如下: [ { value: '001', label: '北京', children: [ { value: '0011', label: '故宫', disable: true }, { value: '0012', label: '天坛' } ] } ] 2 v-model 初始化选中的项,类型为数组,如果不想设置初始化选中的项,请传递一个空数组 3 size 即iview定义的size,用于设置组件尺寸,不传使用默认尺寸,可选large,small 4 multiple 是否多选 5 width 文本框宽度,类型为数字,不传默认100% 6 disabled 是否可以选择 7 maxHeight 选择面板的最大高度,类型为数字,默认400,超出时出现滚动条 8 maxWidth 选择面板的最大宽度,类型为数字,默认400,超出时出现滚动条 9 renderOptions 是否渲染下拉选项,默认true 10 parentNodeAllow 父节点是否可以选择,默认true

##方法说明 1 getSelectNodes 获取被选中的节点对象

##事件说明 1 click 点击事件,参数true或者false,代表显示或者隐藏下拉框

Keywords

mutiple

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts