vue2-client 1.2.98 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.2.98",
3
+ "version": "1.2.99",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -79,15 +79,6 @@ export default {
79
79
  type: Array,
80
80
  default: () => []
81
81
  },
82
- // 默认选中key
83
- defaultCheckedNames: {
84
- type: Array,
85
- default: () => []
86
- },
87
- defaultCheckedIds: {
88
- type: Array,
89
- default: () => []
90
- },
91
82
  // // 返回数据类型 String,Array 发现返回类型只能有一个
92
83
  // type: {
93
84
  // type: String,
@@ -115,10 +106,8 @@ export default {
115
106
  this.visible = true
116
107
  this.searchValue = ''
117
108
  this.treeData = this.sourceTreeData
118
- if (this.defaultCheckedIds.length > 0) {
119
- this.checkedKeys = this.getCheckedKeys(this.defaultCheckedIds)
120
- } else if (this.defaultCheckedNames.length > 0) {
121
- this.checkedKeys = this.getCheckedKeys(this.defaultCheckedNames)
109
+ if (this.value.length > 0) {
110
+ this.checkedKeys = this.getCheckedKeys(this.value)
122
111
  }
123
112
  this.expandedKeys = []
124
113
  },
@@ -70,7 +70,12 @@ export default {
70
70
  ...mapState('account', { currUser: 'user' })
71
71
  },
72
72
  created () {
73
- this.uploadedFileList = this.model.type === 'file' ? [...this.files] : [...this.images]
73
+ const list = this.model.type === 'file' ? [...this.files] : [...this.images]
74
+ if (this.model.useType) {
75
+ this.uploadedFileList = list.filter(item => item.f_use_type === this.model.useType)
76
+ } else {
77
+ this.uploadedFileList = list
78
+ }
74
79
  },
75
80
  methods: {
76
81
  uploadFiles (info) {
@@ -323,7 +323,11 @@ export default {
323
323
  }
324
324
  const item = this.realJsonData[i]
325
325
  if (this.modifyModelData.data[item.model] || this.modifyModelData.data[item.model] === 0) {
326
- this.form[item.model] = this.modifyModelData.data[item.model] + ''
326
+ if (this.modifyModelData.data[item.model] instanceof Array) {
327
+ this.form[item.model] = this.modifyModelData.data[item.model]
328
+ } else {
329
+ this.form[item.model] = this.modifyModelData.data[item.model] + ''
330
+ }
327
331
  } else {
328
332
  this.form[item.model] = undefined
329
333
  }
@@ -42,7 +42,6 @@
42
42
 
43
43
  <script>
44
44
  import { post } from '@vue2-client/services/api'
45
- import { mapState } from 'vuex'
46
45
 
47
46
  export default {
48
47
  name: 'HeaderNotice',