0.0.5-c • Published 5 years ago

wh-search-group v0.0.5-c

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

my-search-group

ui component for vue base elementui

Preview

#  clone
git clone git@github.com:stack-wuh/my-search-group.git

cd example

npm install 

npm run dev

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

使用

import mySearch from 'wh-search-group'

Vue.use(mySearch)
<div class="b-wrap">
  <MySearchGroup></MySearchGroup>
</div>

SearchGroup

Props

参数说明类型默认值
v-model绑定一个表单对象Objectnone
list迭代SearchItem的数组Array[]

List

参数说明默认值
label展示Item的label文本none
type说渲染的Item的类型normal, input
field绑定表单的字段名none
list若type为select, 则是Select下拉框的列表; 若type为button, 则为button列表none

SearchItem

Props

参数说明类型默认值
type元素的类型值Stringinput, normal, default
label元素的标题Stringnone
props下级表单元素对应绑定的key值Stringnone
s-list如果下级子元素的type为select时所迭代的列表Array[]
s-key自定义列表的key值Stringlabel
s-value自定义列表的value值Stringvalue
v-model绑定一个表单对象Objectnone

type

name说明
input, nromal, defaulttype的默认值, 默认展示input输入框
select类型设置为select下拉框

event

nametype传递事件名
search确认搜索search
reset重置事件reset

slot

更新提示: button区域独立为slot插槽, 不再使用json配置文件生成

name说明
button自定义的button区域

type == select

Props

参数说明默认值
labeloption的label属性label, 可通过sKey属性自定义
valueoption的value属性value, 可通过sValueu属性自定义

SearchButtonGroup

可搭配使用, 也可以单独使用

Props

参数说明类型默认值
listbutton迭代的数组Array{text: 'search', ref: 'search' }, { text: 'reset', ref: 'reset' }
_id按钮的隐藏IdNumber, Stringnone
text按钮的Text文本Stringnone
color按钮的色彩Stringdefault
backgroundColor按钮的背景色default
align按钮在flex布局下主轴的对齐Stringleft
optionsElement中Button组件的属性Objectdefault

Options

高度定制的ButtonGroup组件可以在任何地方使用, 在表格中需要多条件使用的情景可以使用Options中的validator, 例如: { text: 'down', ref: 'down', validator: Function(b: Boolean), Boolean }

Event

参数说明类型事件名
search$emit传递的事件Functionsearch
any--Functionany

Slots

slot === button

插槽 自定义的ButtonArea

0.0.5-c

5 years ago

0.0.5-b

5 years ago

0.0.5-a

5 years ago

0.0.5

5 years ago

0.0.4-d

5 years ago

0.0.4-c

5 years ago

0.0.4-b

5 years ago

0.0.4-a

5 years ago

0.0.4

5 years ago

0.0.3-c

5 years ago

0.0.3-b

5 years ago

0.0.3-a

5 years ago

0.0.3

5 years ago

0.0.2-a

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago