diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index 8bddba89..e31f2079 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -47,8 +47,14 @@ @change="handlePaginationChange" > - +
+ 使用 Gravatar
@@ -149,6 +151,7 @@ import userApi from '@/api/user' import adminApi from '@/api/admin' import optionApi from '@/api/option' import { mapMutations } from 'vuex' +import MD5 from 'md5.js' export default { components: { @@ -217,6 +220,10 @@ export default { handleSelectAvatar(data) { this.user.avatar = data.path this.attachmentDrawerVisible = false + }, + handleSelectGravatar() { + this.user.avatar = '//cn.gravatar.com/avatar/' + new MD5().update(this.user.email).digest('hex') + '&d=mm' + this.attachmentDrawerVisible = false } } }