vue2-client 1.2.64 → 1.2.65

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 CHANGED
@@ -1,9 +1,11 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.2.64 -2022-05-25 @张振宇**
4
+ **1.2.64 - 1.2.65 -2022-05-25 @张振宇**
5
5
  - 功能修改:
6
6
  - 建档表单配置 bug修改
7
+ - 文件上传框 文件类型以及个数限制可以生效了
8
+ - 表单增加按钮插槽
7
9
 
8
10
  **1.2.3 -2022-05-26 @苗艳强**
9
11
  - 功能修改:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -325,6 +325,7 @@ export default {
325
325
  },
326
326
  formType: 'input',
327
327
  accept: undefined,
328
+ acceptCount: 3,
328
329
  pathKey: undefined,
329
330
  groupIndexView: undefined,
330
331
  selectType: undefined,
@@ -370,6 +371,7 @@ export default {
370
371
  required: 'false'
371
372
  },
372
373
  selectKey: undefined,
374
+ acceptCount: 3,
373
375
  formType: 'input',
374
376
  fileRootPath: undefined,
375
377
  pathKey: undefined,
@@ -4,6 +4,7 @@
4
4
  v-if="model.type === 'file'"
5
5
  name="file"
6
6
  :multiple="true"
7
+ :accept="model.accept.join('')"
7
8
  :remove="deleteFileItem"
8
9
  :customRequest="uploadFiles"
9
10
  :file-list="uploadedFileList">
@@ -20,6 +21,7 @@
20
21
  <a-upload
21
22
  v-if=" model.type === 'image'"
22
23
  list-type="picture-card"
24
+ :accept="model.accept.join('')"
23
25
  :customRequest="uploadFiles"
24
26
  :remove="deleteFileItem"
25
27
  :file-list="uploadedFileList">
@@ -72,6 +74,10 @@ export default {
72
74
  },
73
75
  methods: {
74
76
  uploadFiles (info) {
77
+ if (this.uploadedFileList.length >= this.model.acceptCount) {
78
+ this.$message.error(`当前表单限制仅可上传 ${this.model.acceptCount} 个文件`)
79
+ return
80
+ }
75
81
  // 初始化文件信息
76
82
  const fileInfo = {
77
83
  uid: info.file.uid,