|
|
|
@ -3,13 +3,15 @@
|
|
|
|
|
<a-form-model ref="commentOptionsForm" :model="options" :rules="rules" layout="vertical" :wrapperCol="wrapperCol"> |
|
|
|
|
<a-form-model-item label="评论者头像:"> |
|
|
|
|
<a-select v-model="options.comment_gravatar_default"> |
|
|
|
|
<a-select-option value="mm">默认</a-select-option> |
|
|
|
|
<a-select-option value="identicon">抽象几何图形</a-select-option> |
|
|
|
|
<a-select-option value="monsterid">小怪物</a-select-option> |
|
|
|
|
<a-select-option value="wavatar">Wavatar</a-select-option> |
|
|
|
|
<a-select-option value="retro">复古</a-select-option> |
|
|
|
|
<a-select-option value="robohash">机器人</a-select-option> |
|
|
|
|
<a-select-option value="blank">不显示头像</a-select-option> |
|
|
|
|
<a-select-option v-for="(avatarType, index) in avatarTypes" :key="index" :value="avatarType.value"> |
|
|
|
|
<a-avatar |
|
|
|
|
class="comment_select_gravatar" |
|
|
|
|
:size="18" |
|
|
|
|
:src="options.gravatar_source + '?s=256&d=' + avatarType.value" |
|
|
|
|
> |
|
|
|
|
</a-avatar |
|
|
|
|
>{{ avatarType.text }} |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-model-item> |
|
|
|
|
<a-form-model-item label="评论审核后才显示:"> |
|
|
|
@ -52,6 +54,41 @@
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
const avatarTypes = [ |
|
|
|
|
{ |
|
|
|
|
text: '默认', |
|
|
|
|
value: '' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '匿名者', |
|
|
|
|
value: 'mm' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '抽象几何图形', |
|
|
|
|
value: 'identicon' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '小怪物', |
|
|
|
|
value: 'monsterid' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: 'Wavatar', |
|
|
|
|
value: 'wavatar' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '复古', |
|
|
|
|
value: 'retro' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '机器人', |
|
|
|
|
value: 'robohash' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: '不显示头像', |
|
|
|
|
value: 'blank' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: 'CommentTab', |
|
|
|
|
props: { |
|
|
|
@ -76,7 +113,8 @@ export default {
|
|
|
|
|
sm: { span: 12 }, |
|
|
|
|
xs: { span: 24 } |
|
|
|
|
}, |
|
|
|
|
rules: {} |
|
|
|
|
rules: {}, |
|
|
|
|
avatarTypes |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -106,3 +144,10 @@ export default {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.comment_select_gravatar { |
|
|
|
|
border: 1px #c8c8ca solid; |
|
|
|
|
margin: 0 5px 3px 0; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|