mirror of https://github.com/halo-dev/halo-admin
Fixed something.
parent
429a3f1640
commit
58b9b03d74
|
@ -278,4 +278,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
@click="handleShowDetailDrawer(item)"
|
||||
>
|
||||
<span v-show="!handleJudgeMediaType(item)">当前格式不支持预览</span>
|
||||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
>
|
||||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-skeleton>
|
||||
|
|
|
@ -34,7 +34,11 @@
|
|||
:key="index"
|
||||
@click="handleSelectAttachment(item)"
|
||||
>
|
||||
<img :src="item.thumbPath">
|
||||
<span v-show="!handleJudgeMediaType(item)">当前格式不支持预览</span>
|
||||
<img
|
||||
:src="item.thumbPath"
|
||||
v-show="handleJudgeMediaType(item)"
|
||||
>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-skeleton>
|
||||
|
@ -172,6 +176,23 @@ export default {
|
|||
this.loadSkeleton()
|
||||
this.loadAttachments()
|
||||
},
|
||||
handleJudgeMediaType(attachment) {
|
||||
var mediaType = attachment.mediaType
|
||||
// 判断文件类型
|
||||
if (mediaType) {
|
||||
var prefix = mediaType.split('/')[0]
|
||||
|
||||
if (prefix === 'image') {
|
||||
// 是图片
|
||||
return true
|
||||
} else {
|
||||
// 非图片
|
||||
return false
|
||||
}
|
||||
}
|
||||
// 没有获取到文件返回false
|
||||
return false
|
||||
},
|
||||
onClose() {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
slot="addonAfter"
|
||||
@click="togglePasswordVisible"
|
||||
>
|
||||
<a-icon type="eye" />
|
||||
<a-icon type="eye-invisible" />
|
||||
</a>
|
||||
</a-input>
|
||||
<a-input
|
||||
|
@ -53,7 +53,7 @@
|
|||
slot="addonAfter"
|
||||
@click="togglePasswordVisible"
|
||||
>
|
||||
<a-icon type="eye-invisible" />
|
||||
<a-icon type="eye" />
|
||||
</a>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
|
|
|
@ -203,7 +203,12 @@ export default {
|
|||
this.$message.error('确认密码和新密码不匹配!')
|
||||
return
|
||||
}
|
||||
userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {})
|
||||
userApi.updatePassword(this.passwordParam.oldPassword, this.passwordParam.newPassword).then(response => {
|
||||
this.$message.success('密码修改成功!')
|
||||
this.passwordParam.oldPassword = null
|
||||
this.passwordParam.newPassword = null
|
||||
this.passwordParam.confirmPassword = null
|
||||
})
|
||||
},
|
||||
handleUpdateProfile() {
|
||||
if (!this.user.username) {
|
||||
|
|
Loading…
Reference in New Issue