el-plus-crud 0.0.12 → 0.0.13

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +115 -3
  3. package/dist/el-plus-crud.mjs +6968 -6968
  4. package/dist/el-plus-crud.umd.js +27 -27
  5. package/dist/style.css +1 -1
  6. package/lib/components/el-plus-form/ElPlusFormDialog.vue +107 -107
  7. package/lib/components/el-plus-form/components/ElPlusFormAutocomplete.vue +49 -49
  8. package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +133 -133
  9. package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +51 -51
  10. package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +42 -42
  11. package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +42 -42
  12. package/lib/components/el-plus-form/components/ElPlusFormColor.vue +38 -38
  13. package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +44 -44
  14. package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +38 -38
  15. package/lib/components/el-plus-form/components/ElPlusFormImage.vue +113 -113
  16. package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +51 -51
  17. package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +42 -42
  18. package/lib/components/el-plus-form/components/ElPlusFormRate.vue +38 -38
  19. package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +38 -38
  20. package/lib/components/el-plus-form/components/ElPlusFormStatus.vue +67 -67
  21. package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +38 -38
  22. package/lib/components/el-plus-form/components/ElPlusFormTag.vue +78 -78
  23. package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +44 -44
  24. package/lib/components/el-plus-form/components/ElPlusFormTree.vue +53 -53
  25. package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +36 -36
  26. package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +2 -0
  27. package/lib/components/el-plus-form/components/index.ts +17 -17
  28. package/lib/components/el-plus-form/data/file.ts +74 -74
  29. package/lib/components/el-plus-form/mixins/index.ts +113 -113
  30. package/lib/components/el-plus-form/util/validate.ts +310 -310
  31. package/lib/components-list.ts +66 -66
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### 0.0.13 (2023-07-11)
6
+
5
7
  ### [0.0.12](https://github.com/KDJack/el-plus-crud/compare/v0.0.11...v0.0.12) (2023-07-10)
6
8
 
7
9
  ### [0.0.11](https://github.com/KDJack/el-plus-crud/compare/v0.0.10...v0.0.11) (2023-07-10)
package/README.md CHANGED
@@ -2,14 +2,126 @@
2
2
 
3
3
  # By K.D.Jack
4
4
 
5
- # 2023.07.10
6
-
7
5
  # 项目环境要求
8
6
 
9
7
  -NodeJs 版本:16.18.1
10
8
 
11
9
  -代码格式化插件:prettier
12
10
 
13
- # 运行
11
+ # demo运行
14
12
 
13
+ ```
15
14
  yarn && yarn start
15
+ ```
16
+
17
+ # 使用
18
+
19
+ ## 1.安装依赖
20
+
21
+ ```
22
+ npm i el-plus-crud -S
23
+ (or)
24
+ yarn add el-plus-crud -S
25
+ ```
26
+
27
+ ## 2.全局引入 (main.js)
28
+
29
+ ```
30
+ ...
31
+ import ElPlusCrud from 'el-plus-crud'
32
+ ...
33
+
34
+ const crudConfig = {
35
+ // 全局配置...
36
+ }
37
+
38
+ // 全局Data数据
39
+ const globalData = reactive({
40
+
41
+ })
42
+
43
+ const formatData = reactive({
44
+ // 全局format
45
+ })
46
+
47
+ ...
48
+ app.use(ElPlusCrud, crudConfig, readonly(formatData), readonly(globalData))
49
+ ...
50
+ ```
51
+
52
+ ## 3.vue引用
53
+
54
+ ```
55
+ ...
56
+ <ElPlusTable ref="listTableRef" :tableConfig="tableConfig"></ElPlusTable>
57
+ ...
58
+
59
+ ...
60
+ const listTableRef = ref()
61
+ const tableConfig = ref({
62
+ // 远程列表查询
63
+ fetch: () => {},
64
+ // 列表-列配置
65
+ column: [
66
+ { prop: 'username', label: '账号' },
67
+ { prop: 'nickname', label: '名称' },
68
+ { prop: 'phone', label: '联系电话' },
69
+ { prop: 'deptName', label: '所属部门' },
70
+ { prop: 'remark', label: '备注' },
71
+ { prop: 'createTime', label: '创建时间' },
72
+ { prop: 'createBy', label: '创建人' },
73
+ {
74
+ label: '操作',
75
+ fixed: 'right',
76
+ type: 'btns',
77
+ btns: [
78
+ { label: '查看详情', on: {} },
79
+ { label: '编辑', on: {} },
80
+ {
81
+ label: '删除',
82
+ confirm: '确定要删除?',
83
+ btnType: 'danger',
84
+ on: {}
85
+ }
86
+ ]
87
+ }
88
+ ],
89
+ // 固定查询条件
90
+ queryMap: {},
91
+ // 顶部工具栏
92
+ toolbar: {
93
+ // 功能按钮列表
94
+ btns: [
95
+ {
96
+ label: '新增人员',
97
+ type: 'add',
98
+ on: {}
99
+ }
100
+ ],
101
+ // 顶部查询表单
102
+ formConfig: {
103
+ beforeRequest: (data: any) => {
104
+ if (data.deptId) {
105
+ data.deptId = data.deptId[data.deptId.length - 1]
106
+ }
107
+ return data
108
+ },
109
+ formDesc: {
110
+ nickname: { type: 'input', label: '输入查询', placeholder: '人员名称' },
111
+ deptId: { type: 'cascader', label: '所属部门', options: deptOptions, attrs: { props: { value: 'id', label: 'name', children: 'children', checkStrictly: true } } },
112
+ enabled: {
113
+ type: 'select',
114
+ label: '状态',
115
+ options: [
116
+ { label: '已禁用', value: 0 },
117
+ { label: '已启用', value: 1 }
118
+ ]
119
+ }
120
+ }
121
+ }
122
+ }
123
+ })
124
+ ...
125
+ ```
126
+
127
+ # TODO 接口文档