el-plus-crud 0.0.96 → 0.0.98
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 +2319 -2177
- package/lib/components/el-plus-form/ElPlusForm.vue +118 -74
- package/lib/components/el-plus-form/ElPlusFormDialog.vue +5 -1
- package/lib/components/el-plus-form/ElPlusFormGroup.vue +49 -26
- package/lib/components/el-plus-form/components/ElPlusFormArea.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormAutocomplete.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +7 -7
- package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormColor.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormDate.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormDatetimerange.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormImage.vue +5 -6
- package/lib/components/el-plus-form/components/ElPlusFormInput.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormQuickInput.vue +3 -2
- package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormRate.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +27 -18
- package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +3 -2
- package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormTag.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormText.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormTime.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormTimerange.vue +2 -1
- package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormTree.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +3 -1
- package/lib/components/el-plus-form/components/ElPlusFormUpbtn.vue +1 -0
- package/lib/components/el-plus-form/components/ElPlusFormUpload.vue +174 -67
- package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +1 -2
- package/lib/components/el-plus-form/util/index.ts +33 -0
- package/lib/components/el-plus-form/util/validate.ts +2 -2
- package/lib/components/el-plus-table/ElPlusTable.vue +21 -12
- package/lib/components/el-plus-table/components/header.vue +1 -1
- package/lib/components/el-plus-table/util/index.ts +1 -1
- package/lib/config/index.ts +22 -11
- package/package-lock.json +2 -3
- package/package.json +1 -1
- package/types/index.d.ts +36 -12
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.98](https://github.com/KDJack/el-plus-crud/compare/v0.0.97...v0.0.98) (2023-11-10)
|
|
6
|
+
|
|
7
|
+
### [0.0.97](https://github.com/KDJack/el-plus-crud/compare/v0.0.96...v0.0.97) (2023-10-31)
|
|
8
|
+
|
|
5
9
|
### [0.0.96](https://github.com/KDJack/el-plus-crud/compare/v0.0.95...v0.0.96) (2023-10-17)
|
|
6
10
|
|
|
7
11
|
### [0.0.95](https://github.com/KDJack/el-plus-crud/compare/v0.0.94...v0.0.95) (2023-10-08)
|
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/)
|