chore: prettier source code
This commit is contained in:
@@ -63,7 +63,7 @@ export default createComponent({
|
||||
|
||||
if (this.beforeClose) {
|
||||
this.loading[action] = true;
|
||||
this.beforeClose(action, state => {
|
||||
this.beforeClose(action, (state) => {
|
||||
if (state !== false && this.loading[action]) {
|
||||
this.onClose(action);
|
||||
}
|
||||
|
||||
+4
-4
@@ -21,7 +21,7 @@ function initInstance() {
|
||||
},
|
||||
});
|
||||
|
||||
instance.$on('input', value => {
|
||||
instance.$on('input', (value) => {
|
||||
instance.value = value;
|
||||
});
|
||||
}
|
||||
@@ -66,14 +66,14 @@ Dialog.defaultOptions = {
|
||||
showCancelButton: false,
|
||||
closeOnPopstate: false,
|
||||
closeOnClickOverlay: false,
|
||||
callback: action => {
|
||||
callback: (action) => {
|
||||
instance[action === 'confirm' ? 'resolve' : 'reject'](action);
|
||||
},
|
||||
};
|
||||
|
||||
Dialog.alert = Dialog;
|
||||
|
||||
Dialog.confirm = options =>
|
||||
Dialog.confirm = (options) =>
|
||||
Dialog({
|
||||
showCancelButton: true,
|
||||
...options,
|
||||
@@ -85,7 +85,7 @@ Dialog.close = () => {
|
||||
}
|
||||
};
|
||||
|
||||
Dialog.setDefaultOptions = options => {
|
||||
Dialog.setDefaultOptions = (options) => {
|
||||
Object.assign(Dialog.currentOptions, options);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user