lw-cdp-ui 1.4.19 → 1.4.20
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/dist/components/lwFormMini/ViewItem.vue +123 -103
- package/dist/components/lwLayout/components/tags.vue +4 -3
- package/dist/components/lwTour/index.vue +16 -5
- package/dist/components/lwUpload/index.vue +143 -147
- package/dist/lw-cdp-ui.esm.js +6957 -6902
- package/dist/lw-cdp-ui.umd.js +21 -17
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="lw-upload"
|
|
3
|
-
:class="{ 'lw-upload-round': round }">
|
|
2
|
+
<div class="lw-upload" :class="{ 'lw-upload-round': round }">
|
|
4
3
|
<!-- 文件预览列表 -->
|
|
5
4
|
<div class="view-img-list">
|
|
6
|
-
<template v-for="(f, index) in fileList"
|
|
7
|
-
|
|
8
|
-
<div class="lw-upload__img"
|
|
9
|
-
:style="style">
|
|
5
|
+
<template v-for="(f, index) in fileList" :key="index">
|
|
6
|
+
<div class="lw-upload__img" :style="style">
|
|
10
7
|
<!-- 如果允许图片,显示图片预览 -->
|
|
11
|
-
<el-image
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
<el-image
|
|
9
|
+
v-if="isAcceptImage"
|
|
10
|
+
class="image"
|
|
11
|
+
:src="getShowValue(f)"
|
|
12
|
+
:preview-src-list="fileList"
|
|
13
|
+
fit="cover"
|
|
14
|
+
hide-on-click-modal
|
|
15
|
+
append-to-body
|
|
16
|
+
:z-index="9999">
|
|
20
17
|
<template #placeholder>
|
|
21
|
-
<div class="lw-upload__img-slot">
|
|
22
|
-
Loading...
|
|
23
|
-
</div>
|
|
18
|
+
<div class="lw-upload__img-slot">Loading...</div>
|
|
24
19
|
</template>
|
|
25
20
|
</el-image>
|
|
26
21
|
<!-- 如果允许视频,显示视频预览 -->
|
|
27
|
-
<video v-if="isAcceptVideo"
|
|
28
|
-
:src="getShowValue(f)"
|
|
29
|
-
controls></video>
|
|
22
|
+
<video v-if="isAcceptVideo" :src="getShowValue(f)" controls></video>
|
|
30
23
|
<!-- 删除按钮,仅在未禁用状态下显示 -->
|
|
31
|
-
<div class="lw-upload__img-actions"
|
|
32
|
-
|
|
33
|
-
<span class="del"
|
|
34
|
-
@click="handleRemove(index)">
|
|
24
|
+
<div class="lw-upload__img-actions" v-if="!disabled">
|
|
25
|
+
<span class="del" @click="handleRemove(index)">
|
|
35
26
|
<el-icon><el-icon-delete /></el-icon>
|
|
36
27
|
</span>
|
|
37
28
|
</div>
|
|
@@ -39,24 +30,25 @@
|
|
|
39
30
|
</template>
|
|
40
31
|
|
|
41
32
|
<!-- 上传按钮(当文件数量未达到限制时显示) -->
|
|
42
|
-
<el-upload
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
<el-upload
|
|
34
|
+
v-if="fileList.length < limit"
|
|
35
|
+
class="uploader"
|
|
36
|
+
:style="style"
|
|
37
|
+
ref="uploader"
|
|
38
|
+
:auto-upload="autoUpload"
|
|
39
|
+
:disabled="disabled"
|
|
40
|
+
:show-file-list="showFileList"
|
|
41
|
+
:action="action"
|
|
42
|
+
:name="name"
|
|
43
|
+
:data="data"
|
|
44
|
+
:accept="accept"
|
|
45
|
+
:limit="limit"
|
|
46
|
+
:http-request="request"
|
|
47
|
+
:on-change="change"
|
|
48
|
+
:before-upload="before"
|
|
49
|
+
:on-success="success"
|
|
50
|
+
:on-error="error"
|
|
51
|
+
:on-exceed="handleExceed">
|
|
60
52
|
<slot>
|
|
61
53
|
<div class="el-upload--picture-card">
|
|
62
54
|
<div class="file-empty">
|
|
@@ -66,12 +58,8 @@
|
|
|
66
58
|
<h4 v-if="title">{{ title }}</h4>
|
|
67
59
|
</div>
|
|
68
60
|
<!-- 上传过程中显示进度条 -->
|
|
69
|
-
<div v-if="file && file.percentage"
|
|
70
|
-
|
|
71
|
-
class="lw-upload__progress">
|
|
72
|
-
<el-progress :percentage="file.percentage"
|
|
73
|
-
:text-inside="true"
|
|
74
|
-
:stroke-width="16" />
|
|
61
|
+
<div v-if="file && file.percentage" :style="style" class="lw-upload__progress">
|
|
62
|
+
<el-progress :percentage="file.percentage" :text-inside="true" :stroke-width="16" />
|
|
75
63
|
<span v-if="file.percentage == 100">已上传,处理中···</span>
|
|
76
64
|
</div>
|
|
77
65
|
</div>
|
|
@@ -80,8 +68,7 @@
|
|
|
80
68
|
</div>
|
|
81
69
|
|
|
82
70
|
<!-- 上传提示信息 -->
|
|
83
|
-
<div v-if="tip"
|
|
84
|
-
class="el-upload__tip">
|
|
71
|
+
<div v-if="tip" class="el-upload__tip">
|
|
85
72
|
{{ tip }}
|
|
86
73
|
</div>
|
|
87
74
|
</div>
|
|
@@ -113,18 +100,18 @@ export default {
|
|
|
113
100
|
* @property {Function} parseData - 解析上传响应数据的函数,默认为解析状态码、文件名、图片远程地址和描述字段
|
|
114
101
|
*/
|
|
115
102
|
props: {
|
|
116
|
-
modelValue: { type: [String, Array, Boolean, Object], default:
|
|
103
|
+
modelValue: { type: [String, Array, Boolean, Object], default: '' },
|
|
117
104
|
height: { type: Number, default: 148 },
|
|
118
105
|
width: { type: Number, default: 148 },
|
|
119
106
|
iconSize: { type: Number, default: 36 },
|
|
120
|
-
title: { type: String, default:
|
|
121
|
-
tip: { type: String, default:
|
|
122
|
-
icon: { type: String, default:
|
|
123
|
-
action: { type: String, default: () => {
|
|
124
|
-
apiObj: { type: [Object, Function], default: () => {
|
|
125
|
-
name: { type: String, default:
|
|
126
|
-
data: { type: Object, default: () => {
|
|
127
|
-
accept: { type: String, default:
|
|
107
|
+
title: { type: String, default: '' },
|
|
108
|
+
tip: { type: String, default: '' },
|
|
109
|
+
icon: { type: String, default: 'el-icon-plus' },
|
|
110
|
+
action: { type: String, default: () => {} },
|
|
111
|
+
apiObj: { type: [Object, Function], default: () => {} },
|
|
112
|
+
name: { type: String, default: 'file' },
|
|
113
|
+
data: { type: Object, default: () => {} },
|
|
114
|
+
accept: { type: String, default: 'image/gif, image/jpeg, image/png' },
|
|
128
115
|
maxSize: { type: Number, default: 10 },
|
|
129
116
|
limit: { type: Number, default: 1 },
|
|
130
117
|
autoUpload: { type: Boolean, default: true },
|
|
@@ -132,8 +119,14 @@ export default {
|
|
|
132
119
|
multiple: { type: Boolean, default: false },
|
|
133
120
|
disabled: { type: Boolean, default: false },
|
|
134
121
|
round: { type: Boolean, default: false },
|
|
135
|
-
onSuccess: {
|
|
136
|
-
|
|
122
|
+
onSuccess: {
|
|
123
|
+
type: Function,
|
|
124
|
+
default: () => {
|
|
125
|
+
return true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
returnFile: {
|
|
129
|
+
// 单传'url' 就返回数组 传对象映射关系就返回数组对象
|
|
137
130
|
type: [Object, String],
|
|
138
131
|
default: {
|
|
139
132
|
url: 'url', // 第一个就是默认图片字段
|
|
@@ -143,23 +136,24 @@ export default {
|
|
|
143
136
|
type: 'type',
|
|
144
137
|
name: 'name',
|
|
145
138
|
size: 'size',
|
|
146
|
-
tempCropperFile: 'tempCropperFile'
|
|
139
|
+
tempCropperFile: 'tempCropperFile'
|
|
147
140
|
}
|
|
148
141
|
},
|
|
149
142
|
parseData: {
|
|
150
|
-
type: Function,
|
|
143
|
+
type: Function,
|
|
144
|
+
default: (res) => {
|
|
151
145
|
return {
|
|
152
|
-
code: 200
|
|
153
|
-
fileName: res.fileName
|
|
154
|
-
src: res?.previewInfo?.prefix ? `${res.previewInfo.prefix}${res.path}` : res.previewInfo.url,
|
|
155
|
-
msg: res.message
|
|
146
|
+
code: 200, //分析状态字段结构
|
|
147
|
+
fileName: res.fileName, //分析文件名称
|
|
148
|
+
src: res?.previewInfo?.prefix ? `${res.previewInfo.prefix}${res.path}` : res.previewInfo.url, //分析图片远程地址结构
|
|
149
|
+
msg: res.message //分析描述字段结构
|
|
156
150
|
}
|
|
157
151
|
}
|
|
158
152
|
}
|
|
159
153
|
},
|
|
160
154
|
data() {
|
|
161
155
|
return {
|
|
162
|
-
value:
|
|
156
|
+
value: '',
|
|
163
157
|
file: null,
|
|
164
158
|
fileList: []
|
|
165
159
|
}
|
|
@@ -168,21 +162,21 @@ export default {
|
|
|
168
162
|
// 计算上传组件的样式
|
|
169
163
|
style() {
|
|
170
164
|
return {
|
|
171
|
-
width: this.width +
|
|
172
|
-
height: this.height +
|
|
165
|
+
width: this.width + 'px',
|
|
166
|
+
height: this.height + 'px'
|
|
173
167
|
}
|
|
174
168
|
},
|
|
175
169
|
// 计算上传组件是否显示上传按钮
|
|
176
170
|
acceptedTypes() {
|
|
177
|
-
return this.accept.replace(/\s/g,
|
|
171
|
+
return this.accept.replace(/\s/g, '').split(',')
|
|
178
172
|
},
|
|
179
173
|
// 判断是否允许上传图片(判断字符串中是否包含 "image")
|
|
180
174
|
isAcceptImage() {
|
|
181
|
-
return this.accept.indexOf('image') > -1
|
|
175
|
+
return this.accept.indexOf('image') > -1
|
|
182
176
|
},
|
|
183
177
|
// 判断是否允许上传视频(判断字符串中是否包含 "video")
|
|
184
178
|
isAcceptVideo() {
|
|
185
|
-
return this.accept.indexOf('video') > -1
|
|
179
|
+
return this.accept.indexOf('video') > -1
|
|
186
180
|
}
|
|
187
181
|
},
|
|
188
182
|
watch: {
|
|
@@ -190,20 +184,20 @@ export default {
|
|
|
190
184
|
* 监听外部绑定值的变化,更新内部值和文件列表
|
|
191
185
|
*/
|
|
192
186
|
modelValue(val) {
|
|
193
|
-
this.value = val
|
|
194
|
-
this.newFile(val)
|
|
187
|
+
this.value = val
|
|
188
|
+
this.newFile(val)
|
|
195
189
|
},
|
|
196
190
|
/**
|
|
197
191
|
* 当内部值变化时,通过事件通知外部更新绑定值
|
|
198
192
|
*/
|
|
199
193
|
value(val) {
|
|
200
|
-
this.$emit('update:modelValue', val)
|
|
194
|
+
this.$emit('update:modelValue', val)
|
|
201
195
|
}
|
|
202
196
|
},
|
|
203
197
|
mounted() {
|
|
204
198
|
// 初始化组件内部值和文件列表
|
|
205
|
-
this.value = this.modelValue
|
|
206
|
-
this.newFile(this.modelValue)
|
|
199
|
+
this.value = this.modelValue
|
|
200
|
+
this.newFile(this.modelValue)
|
|
207
201
|
},
|
|
208
202
|
methods: {
|
|
209
203
|
/**
|
|
@@ -212,32 +206,32 @@ export default {
|
|
|
212
206
|
*/
|
|
213
207
|
newFile(url) {
|
|
214
208
|
if (this.multiple) {
|
|
215
|
-
this.fileList = url || []
|
|
209
|
+
this.fileList = url || []
|
|
216
210
|
} else {
|
|
217
|
-
this.fileList = url ? [url] : []
|
|
211
|
+
this.fileList = url ? [url] : []
|
|
218
212
|
}
|
|
219
|
-
this.file = url ? { status:
|
|
213
|
+
this.file = url ? { status: 'success', url: url } : null
|
|
220
214
|
},
|
|
221
215
|
/**
|
|
222
216
|
* 删除指定索引的文件,并清理相关数据
|
|
223
217
|
* @param {Number} index - 要删除的文件索引
|
|
224
218
|
*/
|
|
225
219
|
handleRemove(index) {
|
|
226
|
-
this.fileList.splice(index, 1)
|
|
227
|
-
this.clearFiles()
|
|
220
|
+
this.fileList.splice(index, 1)
|
|
221
|
+
this.clearFiles()
|
|
228
222
|
},
|
|
229
223
|
/**
|
|
230
224
|
* 清除当前文件及上传组件内部缓存的文件数据
|
|
231
225
|
*/
|
|
232
226
|
clearFiles() {
|
|
233
227
|
if (this.file && this.file.tempFile) {
|
|
234
|
-
URL.revokeObjectURL(this.file.tempFile)
|
|
228
|
+
URL.revokeObjectURL(this.file.tempFile)
|
|
235
229
|
}
|
|
236
|
-
this.value = this.multiple ? this.fileList :
|
|
237
|
-
this.file = null
|
|
230
|
+
this.value = this.multiple ? this.fileList : ''
|
|
231
|
+
this.file = null
|
|
238
232
|
this.$nextTick(() => {
|
|
239
|
-
this.$refs.uploader && this.$refs.uploader.clearFiles()
|
|
240
|
-
})
|
|
233
|
+
this.$refs.uploader && this.$refs.uploader.clearFiles()
|
|
234
|
+
})
|
|
241
235
|
},
|
|
242
236
|
/**
|
|
243
237
|
* 上传文件状态变化时的回调函数
|
|
@@ -247,20 +241,20 @@ export default {
|
|
|
247
241
|
*/
|
|
248
242
|
change(file, files) {
|
|
249
243
|
if (!this.multiple && files.length > 1) {
|
|
250
|
-
files.splice(1)
|
|
244
|
+
files.splice(1)
|
|
251
245
|
}
|
|
252
|
-
const fileType = file.raw && file.raw.type
|
|
246
|
+
const fileType = file.raw && file.raw.type
|
|
253
247
|
if (file.status === 'ready' && fileType && !this.acceptedTypes.includes(fileType)) {
|
|
254
248
|
this.$notify.warning({
|
|
255
249
|
title: '上传文件警告',
|
|
256
250
|
message: '选择的文件类型不符合要求'
|
|
257
|
-
})
|
|
258
|
-
return false
|
|
251
|
+
})
|
|
252
|
+
return false
|
|
259
253
|
}
|
|
260
254
|
if (file.status === 'ready' && file.raw) {
|
|
261
|
-
file.tempFile = URL.createObjectURL(file.raw)
|
|
255
|
+
file.tempFile = URL.createObjectURL(file.raw)
|
|
262
256
|
}
|
|
263
|
-
this.file = file
|
|
257
|
+
this.file = file
|
|
264
258
|
},
|
|
265
259
|
/**
|
|
266
260
|
* 上传前的校验函数
|
|
@@ -273,26 +267,26 @@ export default {
|
|
|
273
267
|
this.$notify.warning({
|
|
274
268
|
title: '上传文件错误',
|
|
275
269
|
message: '选择的文件类型不正确'
|
|
276
|
-
})
|
|
277
|
-
this.clearFiles()
|
|
278
|
-
return false
|
|
270
|
+
})
|
|
271
|
+
this.clearFiles()
|
|
272
|
+
return false
|
|
279
273
|
}
|
|
280
274
|
// 校验文件大小是否超出限制(单位:MB)
|
|
281
275
|
if (file.size / 1024 / 1024 > this.maxSize) {
|
|
282
|
-
this.$message.warning(`上传文件大小不能超过 ${this.maxSize}MB!`)
|
|
283
|
-
this.clearFiles()
|
|
284
|
-
return false
|
|
276
|
+
this.$message.warning(`上传文件大小不能超过 ${this.maxSize}MB!`)
|
|
277
|
+
this.clearFiles()
|
|
278
|
+
return false
|
|
285
279
|
}
|
|
286
|
-
return true
|
|
280
|
+
return true
|
|
287
281
|
},
|
|
288
282
|
/**
|
|
289
283
|
* 当上传文件数量超过限制时的处理函数
|
|
290
284
|
* @param {Array} files - 超出限制的文件列表
|
|
291
285
|
*/
|
|
292
286
|
handleExceed(files) {
|
|
293
|
-
const file = files[0]
|
|
294
|
-
file.uid = this.$tool ? this.$tool.getUUID('file', 16) : Date.now()
|
|
295
|
-
this.$refs.uploader.handleStart(file)
|
|
287
|
+
const file = files[0]
|
|
288
|
+
file.uid = this.$tool ? this.$tool.getUUID('file', 16) : Date.now()
|
|
289
|
+
this.$refs.uploader.handleStart(file)
|
|
296
290
|
},
|
|
297
291
|
/**
|
|
298
292
|
* 上传成功的回调函数
|
|
@@ -300,46 +294,46 @@ export default {
|
|
|
300
294
|
* @param {Object} file - 上传成功的文件对象
|
|
301
295
|
*/
|
|
302
296
|
success(res, file) {
|
|
303
|
-
file.type = file.raw.type
|
|
297
|
+
file.type = file.raw.type
|
|
304
298
|
if (file.tempFile) {
|
|
305
|
-
URL.revokeObjectURL(file.tempFile)
|
|
299
|
+
URL.revokeObjectURL(file.tempFile)
|
|
306
300
|
}
|
|
307
301
|
// 清理不必要的属性
|
|
308
|
-
delete file.tempFile
|
|
309
|
-
delete file.percentage
|
|
310
|
-
delete file.raw
|
|
311
|
-
delete file.response
|
|
312
|
-
delete file.uid
|
|
302
|
+
delete file.tempFile
|
|
303
|
+
delete file.percentage
|
|
304
|
+
delete file.raw
|
|
305
|
+
delete file.response
|
|
306
|
+
delete file.uid
|
|
313
307
|
|
|
314
|
-
const callbackResult = this.onSuccess(res, file)
|
|
308
|
+
const callbackResult = this.onSuccess(res, file)
|
|
315
309
|
if (callbackResult === false) {
|
|
316
310
|
this.$nextTick(() => {
|
|
317
|
-
this.file = null
|
|
318
|
-
this.value =
|
|
319
|
-
})
|
|
320
|
-
return false
|
|
311
|
+
this.file = null
|
|
312
|
+
this.value = ''
|
|
313
|
+
})
|
|
314
|
+
return false
|
|
321
315
|
}
|
|
322
316
|
|
|
323
317
|
// 解析上传接口返回的数据
|
|
324
|
-
const response = this.parseData(res)
|
|
325
|
-
file.url = response.src
|
|
318
|
+
const response = this.parseData(res)
|
|
319
|
+
file.url = response.src
|
|
326
320
|
|
|
327
|
-
const sourceObject = { ...response, ...file }
|
|
321
|
+
const sourceObject = { ...response, ...file }
|
|
328
322
|
if (typeof this.returnFile === 'object') {
|
|
329
323
|
const mappedObject = Object.entries(this.returnFile).reduce((acc, [key, value]) => {
|
|
330
324
|
if (sourceObject[key] !== undefined) {
|
|
331
|
-
acc[value] = sourceObject[key]
|
|
325
|
+
acc[value] = sourceObject[key]
|
|
332
326
|
}
|
|
333
|
-
return acc
|
|
334
|
-
}, {})
|
|
335
|
-
this.fileList.push(mappedObject)
|
|
327
|
+
return acc
|
|
328
|
+
}, {})
|
|
329
|
+
this.fileList.push(mappedObject)
|
|
336
330
|
} else {
|
|
337
331
|
// 若 returnFile 为字符串,则直接返回对应字段的值
|
|
338
|
-
this.fileList.push(sourceObject[this.returnFile])
|
|
332
|
+
this.fileList.push(sourceObject[this.returnFile])
|
|
339
333
|
}
|
|
340
334
|
|
|
341
335
|
// 更新绑定值:多文件上传返回数组,否则返回单个文件 URL
|
|
342
|
-
this.value = this.multiple ? this.fileList : file.url
|
|
336
|
+
this.value = this.multiple ? this.fileList : file.url
|
|
343
337
|
},
|
|
344
338
|
/**
|
|
345
339
|
* 上传失败的回调函数
|
|
@@ -347,12 +341,12 @@ export default {
|
|
|
347
341
|
*/
|
|
348
342
|
error(err) {
|
|
349
343
|
this.$nextTick(() => {
|
|
350
|
-
if (this.file) delete this.file.percentage
|
|
351
|
-
})
|
|
344
|
+
if (this.file) delete this.file.percentage
|
|
345
|
+
})
|
|
352
346
|
this.$notify.error({
|
|
353
347
|
title: '上传文件失败',
|
|
354
348
|
message: err
|
|
355
|
-
})
|
|
349
|
+
})
|
|
356
350
|
},
|
|
357
351
|
/**
|
|
358
352
|
* 自定义上传请求方法,支持上传进度更新
|
|
@@ -360,26 +354,28 @@ export default {
|
|
|
360
354
|
*/
|
|
361
355
|
request(param) {
|
|
362
356
|
let apiObj = this.apiObj || this.$api.auth.upload
|
|
363
|
-
const data = new FormData()
|
|
364
|
-
data.append(param.filename, param.file)
|
|
365
|
-
data.append('fileName', param.file.name)
|
|
357
|
+
const data = new FormData()
|
|
358
|
+
data.append(param.filename, param.file)
|
|
359
|
+
data.append('fileName', param.file.name)
|
|
366
360
|
for (const key in param.data) {
|
|
367
|
-
data.append(key, param.data[key])
|
|
361
|
+
data.append(key, param.data[key])
|
|
368
362
|
}
|
|
369
363
|
apiObj(data, {
|
|
370
|
-
onUploadProgress: e => {
|
|
364
|
+
onUploadProgress: (e) => {
|
|
371
365
|
this.file.percentage = parseInt(((e.loaded / e.total) * 100) | 0, 10)
|
|
372
366
|
}
|
|
373
|
-
}).then(res => {
|
|
374
|
-
var response = this.parseData(res);
|
|
375
|
-
if (response.code == 200) {
|
|
376
|
-
param.onSuccess(res)
|
|
377
|
-
} else {
|
|
378
|
-
param.onError(response.msg || "未知错误")
|
|
379
|
-
}
|
|
380
|
-
}).catch(err => {
|
|
381
|
-
param.onError(err)
|
|
382
367
|
})
|
|
368
|
+
.then((res) => {
|
|
369
|
+
var response = this.parseData(res)
|
|
370
|
+
if (response.code == 200) {
|
|
371
|
+
param.onSuccess(res)
|
|
372
|
+
} else {
|
|
373
|
+
param.onError(response.msg || '未知错误')
|
|
374
|
+
}
|
|
375
|
+
})
|
|
376
|
+
.catch((err) => {
|
|
377
|
+
param.onError(err)
|
|
378
|
+
})
|
|
383
379
|
},
|
|
384
380
|
/**
|
|
385
381
|
* 获取用于预览显示的文件 URL
|
|
@@ -389,13 +385,13 @@ export default {
|
|
|
389
385
|
getShowValue(item) {
|
|
390
386
|
if (this.multiple) {
|
|
391
387
|
if (typeof this.returnFile === 'object') {
|
|
392
|
-
const firstKey = Object.keys(this.returnFile)[0]
|
|
393
|
-
return item[this.returnFile[firstKey]]
|
|
388
|
+
const firstKey = Object.keys(this.returnFile)[0]
|
|
389
|
+
return item[this.returnFile[firstKey]]
|
|
394
390
|
} else {
|
|
395
|
-
return item
|
|
391
|
+
return item
|
|
396
392
|
}
|
|
397
393
|
} else {
|
|
398
|
-
return item
|
|
394
|
+
return item
|
|
399
395
|
}
|
|
400
396
|
}
|
|
401
397
|
}
|