Skip to content

Commit

Permalink
调整标题样式
Browse files Browse the repository at this point in the history
  • Loading branch information
kscript committed Oct 26, 2023
1 parent 706a57c commit 7e1f086
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuetify-message-box",
"version": "1.0.4",
"version": "1.0.5",
"description": "基于 vue2 + vuetify 的消息弹框组件",
"main": "lib/vuetify-message-box.umd.min.js",
"author": "luren",
Expand Down
5 changes: 3 additions & 2 deletions src/components/message-box/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ export default {
return this.getVNode('cancelButton')
},
titleClass () {
return !['success', 'error', 'wraning', 'info'].includes(this.opts.type) && this.opts.center ? 'pl-9' : ''
const { titleClass, center, type } = this.opts
return (typeof titleClass === 'string' ? titleClass : '') + (!['success', 'error', 'warning', 'info'].includes(type) && center ? ' pl-9' : '')
},
contentClass () {
const { contentClass, center } = this.opts
const centerClass = center ? ' text-center' : ''
if (typeof contentClass === 'string' && contentClass) {
if (typeof contentClass === 'string') {
return contentClass + centerClass
}
return centerClass
Expand Down

0 comments on commit 7e1f086

Please sign in to comment.