zh-libaray
v1.0.2
Published
``` npm install ```
Downloads
7
Readme
wisdom-package
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
打包类库
npm run lib
Lints and fixes files
npm run lint
Customize configuration
组件文档
####1.搜索
<zh-search :search-config='searchConfig' @search-func="searchFunc"></zh-search>
searchConfig:[
{
label: '用户姓名',
placeholder: '请输入',
value: '',
type: 1, //type:1普通input ,2普通下拉,3可搜索下拉,4下拉多选,5地区,6机构,7时间选择,8起始时间选择
outName:'name',
isShow:true, //true:显示 false:隐藏;
},
{
label: '用户年龄',
placeholder: '请输入',
value: '',
type: 2,
outName:'age',
selectList:[
{label:'选项1',useValue:1}
],
optionLabel:'', //option的label
optionValue:'', //option的value;
isShow:true, //true:显示 false:隐藏;
}
]
searchFunc(obj){obj为点击搜素后的返回值}
slot:elseButton : 其他按钮;
####2.分页组件
<zh-switch-page></zh-switch-page>
props: {
pageNum: Number, //页数
pageSize: {//条数
type:Number,
default:10
},
totalAll: Number, //总数
pagerCount: { //一次性页面显示的条数
type: Number,
default: 7
},
layout: { //显示到的页码数量
type: String,
default: "total,sizes,prev, pager, next, jumper",
},
pageSizes:{ //一页显示数量下拉框数据;
type:Array,
default:()=>{
return [10, 20, 50, 100]
}
}
}
//事件
@switch-page='switchPage' : 切换页面,返回值:当前页码
@switch-size-page='switchSizePage':切换一页显示的数量: 返回值:当前选中的数量