@weitutech/by-components 1.0.27 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ ### 如需要扩展
2
+
3
+ 1. 应从 vex-table 第三方组件库查看是否有相应的功能
4
+
5
+ 2. 如需要加入通用实用的表单元素、应该先考虑在组件form中加入、其次是以custom插槽的形式插入
6
+
7
+ ### 第三方插件
8
+
9
+ [element-ui](https://element.eleme.cn/#/zh-CN)
10
+
11
+ [vuedraggable](https://www.npmjs.com/package/vuedraggable)
12
+
13
+ [vxe-table](https://vxetable.cn/pluginDocs/table3/#/demo/list)
14
+
15
+ [moment](https://momentjs.cn/)
package/docs/form.md ADDED
@@ -0,0 +1,26 @@
1
+ ### 类型(没有注册看Element的组件使用方法)
2
+ ```
3
+ | 'input'
4
+ | 'inputNumber'
5
+ | 'select'
6
+ | 'treeSelect'
7
+ | 'datepicker'
8
+ | 'cascader'
9
+ | 'switch'
10
+ | 'checkbox'
11
+ | 'radio'
12
+ | 'upload'
13
+ | 'customDatePicker' // 自定义的时间选择器
14
+ | 'search' // 搜索按钮区域
15
+ | 'custom' // 自定义
16
+ ```
17
+
18
+ #### Event
19
+
20
+ | 事件 | 参数 |
21
+ | ---- | ---- |
22
+ | change | context: IFormItems |
23
+ | queryBtnClick | 无 |
24
+
25
+ 完整案列见 [表单 by-form](../README.md)
26
+
package/docs/table.md ADDED
@@ -0,0 +1,26 @@
1
+ ### table
2
+ #### 自定义列宽
3
+ 注意📢: 一个项目中的name属性千万不能重名、一个项目中的name属性千万不能重名、一个项目中的name属性千万不能重名
4
+ 给table组件设置name值属性、类型为String格式、表格会自动缓存用户拖拽之后的结果
5
+ #### 自定义列
6
+ 给table组件设置以下对象
7
+ customColumnConfig: { // 自定义列
8
+ showCustomColumn: true, // 是否显示自定义列
9
+ infoMethod: getCustomTableList, // 回显用的接口
10
+ infoMethodParams: {}, // 回显用的接口参数
11
+ submitMethod: setCustomTableList, // 保存用的接口
12
+ submitMethodParams: {}, // 保存用的接口参数
13
+ slots: ["source_material_count"] // 需要使用插槽的字段集合
14
+ }
15
+ 并通过事件Event @setColumn="handleSetColumn" 实现对列的设置
16
+ const handleSetColumn = (columns) => {
17
+ this.gridOptions.columns = [
18
+ { type: "checkbox", width: 50, fixed: "left" },
19
+ { type: "seq", width: 50, fixed: "left", title: "序号" },
20
+ ...columns,
21
+ { title: "操作", width: 80, fixed: "right", slots: { default: "operate" }}
22
+ ]
23
+ }
24
+ #### Event
25
+ 见[第三方插件vxe-table](./extension.md)
26
+ 完整案列见 [表格 by-table](../README.md)