el-plus-crud 0.0.97 → 0.0.99
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.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -110
- package/dist/el-plus-crud.mjs +2115 -2097
- package/lib/components/el-plus-form/ElPlusForm.vue +32 -4
- package/lib/components/el-plus-form/components/ElPlusFormImage.vue +6 -7
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +1 -0
- package/lib/components/el-plus-form/components/ElPlusFormStatus.vue +2 -2
- package/lib/components/el-plus-form/components/ElPlusFormTag.vue +2 -2
- package/lib/components/el-plus-form/components/ElPlusFormText.vue +2 -2
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +22 -17
- package/lib/components/el-plus-table/ElPlusTable.vue +13 -10
- package/lib/components/el-plus-table/components/header.vue +10 -4
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.99](https://github.com/KDJack/el-plus-crud/compare/v0.0.98...v0.0.99) (2023-11-13)
|
|
6
|
+
|
|
7
|
+
### [0.0.98](https://github.com/KDJack/el-plus-crud/compare/v0.0.97...v0.0.98) (2023-11-10)
|
|
8
|
+
|
|
5
9
|
### [0.0.97](https://github.com/KDJack/el-plus-crud/compare/v0.0.96...v0.0.97) (2023-10-31)
|
|
6
10
|
|
|
7
11
|
### [0.0.96](https://github.com/KDJack/el-plus-crud/compare/v0.0.95...v0.0.96) (2023-10-17)
|
package/README.md
CHANGED
|
@@ -14,114 +14,6 @@
|
|
|
14
14
|
yarn && yarn start
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# 说明文档
|
|
18
18
|
|
|
19
|
-
##
|
|
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 接口文档
|
|
19
|
+
## [El-Plus-Crud](https://kdjack.github.io/)
|