0.0.8 • Published 5 years ago

fujing-plugin v0.0.8

Weekly downloads
21
License
-
Repository
-
Last release
5 years ago

fujing-plugin介绍

基于element-ui,封装的一些Vue组件

self-tree树形组件、self-tree-select下拉选择树形组件

step

#
需要先安装element-ui包

#
npm install fujing-plugin --save

# main.js

import Plugin from 'fujing-plugin'
import 'fujing-plugin/lib/theme/fujing-plugin.min.css'

Vue.use(Plugin)

self-tree

Props

属性描述默认值必填
data数据[]
treeProps树属性{children: 'children', label: 'name'}
title树组件标题树结构
showTitle是否展示标题true
placeholder输入框提示文字请输入关键字检索
needSearch是否需要显示搜素框true
defaultExpandAll是否默认展开所有节点false
showCheckbox是否显示复选框false
accordion是否每次只打开一个同级树节点展开true

Slot

名称描述返回值
btns自定义菜单插槽
content每个节点右边的插槽slot-scope="{ node,data }" node:当前节点,data:当前数据

Events

事件描述返回值必填
refresh刷新回调
nodeClick树节点点击回调当前节点的data
check当复选框被点击的时候触发参考el-tree

self-tree-select

Props

size:组件大小 | medium | 非必填
defaultExpandAll:是否默认展开所有节点 | false | 非必填
placeholder:输入框提示文字 | 请选择 | 非必填
treeData:树结构数据 | [] | 必填
treeProps:树props | 如下 | 
{
 value: 'value', // 选中以后的值
 label: 'name', // 展示的名称
 children: 'children' 子集合
}