mirror of https://github.com/halo-dev/halo
Fixed something.
parent
0749ffa696
commit
ec5dccb7b8
|
@ -37,10 +37,10 @@
|
||||||
@click="handleShowDetailDrawer(item)"
|
@click="handleShowDetailDrawer(item)"
|
||||||
>
|
>
|
||||||
<span v-show="!handleJudgeMediaType(item)">当前格式不支持预览</span>
|
<span v-show="!handleJudgeMediaType(item)">当前格式不支持预览</span>
|
||||||
<img
|
<img
|
||||||
:src="item.thumbPath"
|
:src="item.thumbPath"
|
||||||
v-show="handleJudgeMediaType(item)"
|
v-show="handleJudgeMediaType(item)"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
|
|
|
@ -34,7 +34,11 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="handleSelectAttachment(item)"
|
@click="handleSelectAttachment(item)"
|
||||||
>
|
>
|
||||||
<img :src="item.thumbPath">
|
<span v-show="!handleJudgeMediaType(item)">当前格式不支持预览</span>
|
||||||
|
<img
|
||||||
|
:src="item.thumbPath"
|
||||||
|
v-show="handleJudgeMediaType(item)"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
|
@ -172,6 +176,23 @@ export default {
|
||||||
this.loadSkeleton()
|
this.loadSkeleton()
|
||||||
this.loadAttachments()
|
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() {
|
onClose() {
|
||||||
this.$emit('close', false)
|
this.$emit('close', false)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
slot="addonAfter"
|
slot="addonAfter"
|
||||||
@click="togglePasswordVisible"
|
@click="togglePasswordVisible"
|
||||||
>
|
>
|
||||||
<a-icon type="eye" />
|
<a-icon type="eye-invisible" />
|
||||||
</a>
|
</a>
|
||||||
</a-input>
|
</a-input>
|
||||||
<a-input
|
<a-input
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
slot="addonAfter"
|
slot="addonAfter"
|
||||||
@click="togglePasswordVisible"
|
@click="togglePasswordVisible"
|
||||||
>
|
>
|
||||||
<a-icon type="eye-invisible" />
|
<a-icon type="eye" />
|
||||||
</a>
|
</a>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
|
@ -203,7 +203,12 @@ export default {
|
||||||
this.$message.error('确认密码和新密码不匹配!')
|
this.$message.error('确认密码和新密码不匹配!')
|
||||||
return
|
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() {
|
handleUpdateProfile() {
|
||||||
if (!this.user.username) {
|
if (!this.user.username) {
|
||||||
|
|
Loading…
Reference in New Issue