aw-component-lib

1,247
Install
npm install aw-component-lib
Latest Version:0.4.5
Vue:2
Older releases:3
Last Updated:Apr 1, 2024
Links: npm
Maintainer: nmf

aw-lib-componet

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

pcComponents

DictSelect

参数 说明 类型 是否必填 默认值
value / v-model 绑定值 Array / String / Number true --
selectData 数据源或字典类型值 Array / String true --
showContents 根据 showContents 过滤展示 Array false --

组件配置项

通过组件 use 时,配置 options 的 DictSelect 属性,设置字典的 label 和 value 属性,默认是: { label: 'name',value: 'code' }

实例

<DictSelect v-model="value" :selectData="options"></DictSelect>

SearchFilterForm

filterList 传值:

  1. type - 类型,input select 或者时间选择框 time
  2. label: label 名称
  3. placeholder: 提示文字,可传可不传。
  4. key: 搜索的时候,需要给后台传递的 key 值
  5. 如果是 select (1)selectOption: select 下拉框的选项值 (2)value: select 下拉框默认的值
  6. 示例: { type: 'select', label: '状态', placeholder: '状态', options: [{ value: '全部', label: '全部' }, { value: '开发中', label: '开发中' }], key: 'select', changeFun: 'changeCity' }, { type: 'time', label: '时间', key: 'time' }, { type: 'input', label: '名称', key: 'name' }

Attributes

参数 说明 类型 是否必填 默认值
filterList 查询项数组,传值参考上面 Array true --
displayExport 操作栏是否展示导出按钮 Boolean false false
gridNum 每行展示的栅格数 Array true --
hasMore 是否有展开 Boolean false true

Events

事件名称 说明 回调参数
exportExcel 点击导出按钮时触发 查询组的表单对象值
handleSelectChange 下拉框 change 时触发 触发 change 时的表单项
handleChangeFun 下拉框 change 时触发,多查询项之间存在级联关系时用 (触发 change 时的表单项的回调函数名称, 该项所选值)
searchData 点击查询清空时触发 查询组的表单对象值

Methods

事件名称 说明 回调参数
submitForm 调用查询 --
handleResetFields 调用清空 --

组件配置项及注意事项

通过组件 use 时,配置 options 的 SearchFilterForm 属性,设置 gridNum 属性,默认是{gridNum: 3}。
可以通过 ref 上的 formData 属性,去获取查询组的表单对象值。

实例

<SearchFilterForm ref="SearchFilterForm" :filterList="filterList" @searchData="submit"></SearchFilterForm>

uniVantComponents

AwInput

Version History

Version Released Vue License
0.4.5 ^2.6.14
0.4.4 ^2.6.14
0.4.3 ^3.2.39
0.4.2 ^2.6.14
0.4.1 ^2.6.14