|
@@ -72,10 +72,6 @@ const columns = reactive<TableColumn[]>([
|
72
|
72
|
type: 'index'
|
73
|
73
|
},
|
74
|
74
|
{
|
75
|
|
- field: 'materialName',
|
76
|
|
- label: '材质名称'
|
77
|
|
- },
|
78
|
|
- {
|
79
|
75
|
field: 'icon',
|
80
|
76
|
label: '图标'
|
81
|
77
|
},
|
|
@@ -132,23 +128,6 @@ const { getElFormExpose, getFormData } = formMethods
|
132
|
128
|
|
133
|
129
|
const schema = reactive<FormSchema[]>([
|
134
|
130
|
{
|
135
|
|
- field: 'materialName',
|
136
|
|
- label: '材质名称',
|
137
|
|
- component: 'Input',
|
138
|
|
- colProps: {
|
139
|
|
- span: 24
|
140
|
|
- },
|
141
|
|
- componentProps: {
|
142
|
|
- style: {
|
143
|
|
- width: '100%'
|
144
|
|
- },
|
145
|
|
- placeholder: '请输入材质名称'
|
146
|
|
- },
|
147
|
|
- formItemProps: {
|
148
|
|
- rules: [required()]
|
149
|
|
- }
|
150
|
|
- },
|
151
|
|
- {
|
152
|
131
|
field: 'materialIcon',
|
153
|
132
|
component: 'Upload',
|
154
|
133
|
colProps: {
|
|
@@ -232,7 +211,7 @@ const schema = reactive<FormSchema[]>([
|
232
|
211
|
},
|
233
|
212
|
slots: {
|
234
|
213
|
default: () => <BaseButton type="primary">点击上传</BaseButton>,
|
235
|
|
- tip: () => <div class="el-upload__tip">文件类型:RAR\ZIP</div>
|
|
214
|
+ tip: () => <div class="el-upload__tip">文件类型:JSON</div>
|
236
|
215
|
}
|
237
|
216
|
}
|
238
|
217
|
}
|
|
@@ -291,14 +270,13 @@ const edittab = async (data: TableSlotDefault) => {
|
291
|
270
|
dialogVisible.value = true
|
292
|
271
|
const formRef = await getElFormExpose()
|
293
|
272
|
const formData = await getFormData()
|
294
|
|
- formData.materialName = data.row.materialName
|
295
|
273
|
formData.compressFileName = data.row.compressFileName
|
296
|
274
|
formData.jsonPath = data.row.jsonPath
|
297
|
275
|
|
298
|
276
|
formData.materialIcon = data.row.materialIcon.replace(PATH_URL, '')
|
299
|
277
|
imageUrl.value = data.row.materialIcon
|
300
|
278
|
formData.materialId = data.row.materialId
|
301
|
|
- schema[2].componentProps.fileList = [
|
|
279
|
+ schema[1].componentProps.fileList = [
|
302
|
280
|
{
|
303
|
281
|
name: data.row.compressFileName,
|
304
|
282
|
url: data.row.jsonPath
|
|
@@ -374,7 +352,7 @@ const getSelections = async () => {
|
374
|
352
|
const tianjia = async () => {
|
375
|
353
|
imageUrl.value = ''
|
376
|
354
|
isedit.value = '添加'
|
377
|
|
- schema[2].componentProps.fileList = []
|
|
355
|
+ schema[1].componentProps.fileList = []
|
378
|
356
|
dialogVisible.value = true
|
379
|
357
|
}
|
380
|
358
|
const batchtianjia = async () => {
|