【fix ESLint】src/views/modules/oss/OSSFileList.vue

This commit is contained in:
danshihao
2023-03-06 14:56:13 +08:00
parent 4285228c4c
commit cab0c3971b
@@ -129,7 +129,7 @@ export default {
},
methods: {
beforeUpload (file) {
var fileType = file.type
const fileType = file.type
if (fileType === 'image') {
if (fileType.indexOf('image') < 0) {
this.$message.warning('请上传图片')
@@ -157,7 +157,7 @@ export default {
}
},
ossDelete (id) {
var that = this
const that = this
that.$confirm({
title: '确认删除',
content: '是否删除选中文件?',
@@ -168,7 +168,7 @@ export default {
},
handlePreview (record) {
if (record && record.url) {
var fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileName}`
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${record.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileName}`
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
window.open(url)
}