mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
fix: 修复上传下载组件展示问题
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</el-button>
|
||||
<span>{{ fileName }}</span>
|
||||
<div v-if="tip !== ''">{{ tip }}</div>
|
||||
<el-input v-model="value" type="text" hidden v-on="$listeners" />
|
||||
<input v-model="value" type="text" hidden v-on="$listeners">
|
||||
<div>
|
||||
<img :src="preview" v-bind="$attrs">
|
||||
</div>
|
||||
@@ -47,11 +47,11 @@ export default {
|
||||
},
|
||||
Onchange(e) {
|
||||
const upLoadFile = e.target.files[0]
|
||||
this.fileName = upLoadFile?.name || ''
|
||||
if (upLoadFile === undefined) {
|
||||
this.$emit('input', this.initial)
|
||||
return
|
||||
}
|
||||
this.fileName = upLoadFile?.name || ''
|
||||
this.$emit('fileChange', upLoadFile)
|
||||
this.$emit('input', this.getObjectURL(upLoadFile))
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user