dialog fix
This commit is contained in:
@@ -76,6 +76,8 @@ var DialogBox = options => {
|
||||
DialogBox.alert = function(options) {
|
||||
return DialogBox(merge({
|
||||
type: 'alert',
|
||||
title: '',
|
||||
message: '',
|
||||
closeOnClickOverlay: false,
|
||||
showCancelButton: false
|
||||
}, options));
|
||||
@@ -84,6 +86,8 @@ DialogBox.alert = function(options) {
|
||||
DialogBox.confirm = function(options) {
|
||||
return DialogBox(merge({
|
||||
type: 'confirm',
|
||||
title: '',
|
||||
message: '',
|
||||
closeOnClickOverlay: true,
|
||||
showCancelButton: true
|
||||
}, options));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="zan-dialog__title" v-text="title"></div>
|
||||
</div>
|
||||
<div class="zan-dialog__content" v-if="message">
|
||||
<div class="zan-dialog__message" v-html="message"></div>
|
||||
<div class="zan-dialog__message" :class="{ 'zan-dialog__message--notitle': !title }" v-html="message"></div>
|
||||
</div>
|
||||
<div class="zan-dialog__footer" :class="{ 'is-twobtn': showCancelButton && showConfirmButton }">
|
||||
<button class="zan-dialog__btn zan-dialog__cancel" v-show="showCancelButton" @click="handleAction('cancel')">{{ cancelButtonText }}</button>
|
||||
|
||||
@@ -56,12 +56,7 @@ export default {
|
||||
},
|
||||
message: {
|
||||
type: String,
|
||||
default: '',
|
||||
validator(value) {
|
||||
if (this.type === 'success' || this.type === 'fail') {
|
||||
return value.length <= 16;
|
||||
}
|
||||
}
|
||||
default: ''
|
||||
},
|
||||
forbidClick: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -46,6 +46,11 @@
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
|
||||
@m notitle {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@e footer {
|
||||
|
||||
Reference in New Issue
Block a user