七牛云存储加入文件类型字段
This commit is contained in:
@@ -59,11 +59,7 @@
|
||||
<a href="JavaScript:;" class="el-link el-link--primary" target="_blank" type="primary" @click="download(scope.row.id)">{{ scope.row.key }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" label="文件类型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getExtensionName(scope.row.key) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="suffix" label="文件类型"/>
|
||||
<el-table-column prop="bucket" label="空间名称"/>
|
||||
<el-table-column prop="size" label="文件大小"/>
|
||||
<el-table-column prop="type" label="空间类型"/>
|
||||
@@ -179,13 +175,6 @@ export default {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
getExtensionName(name) {
|
||||
const dot = name.lastIndexOf('.')
|
||||
if ((dot > -1) && (dot < (name.length - 1))) {
|
||||
return name.substring(dot + 1)
|
||||
}
|
||||
return name
|
||||
},
|
||||
handleSuccess(response, file, fileList) {
|
||||
const uid = file.uid
|
||||
const id = response.id
|
||||
|
||||
Reference in New Issue
Block a user