Commit 0137e5b8 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

MessageBox: reject all cancel actions

parent fa861c5d
...@@ -179,7 +179,7 @@ You can use the `close` event to add and remove tag dynamically. ...@@ -179,7 +179,7 @@ You can use the `close` event to add and remove tag dynamically.
|---------- |-------------- |---------- |-------------------------------- |-------- | |---------- |-------------- |---------- |-------------------------------- |-------- |
| type | theme | string | primary/gray/success/warning/danger | — | | type | theme | string | primary/gray/success/warning/danger | — |
| closable | whether Tab can be removed | boolean | — | false | | closable | whether Tab can be removed | boolean | — | false |
| close-transition | whether the removal animation is disabled | boolean | — | false | | close-transition | whether to disable animations | boolean | — | false |
| hit | whether Tag has a highlighted border | boolean | — | false | | hit | whether Tag has a highlighted border | boolean | — | false |
| color | background color of the tag | string | — | — | | color | background color of the tag | string | — | — |
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
|---------- |-------------- |---------- |-------------------------------- |-------- | |---------- |-------------- |---------- |-------------------------------- |-------- |
| type | 主题 | string | primary/gray/success/warning/danger | — | | type | 主题 | string | primary/gray/success/warning/danger | — |
| closable | 是否可关闭 | boolean | — | false | | closable | 是否可关闭 | boolean | — | false |
| close-transition | 是否禁用关闭时的渐变动画 | boolean | — | false | | close-transition | 是否禁用渐变动画 | boolean | — | false |
| hit | 是否有边框描边 | boolean | — | false | | hit | 是否有边框描边 | boolean | — | false |
| color | 背景色 | string | — | — | | color | 背景色 | string | — | — |
......
...@@ -47,8 +47,6 @@ const defaultCallback = action => { ...@@ -47,8 +47,6 @@ const defaultCallback = action => {
} }
} }
if (currentMsg.resolve) { if (currentMsg.resolve) {
let $type = currentMsg.options.$type;
if ($type === 'confirm' || $type === 'prompt') {
if (action === 'confirm') { if (action === 'confirm') {
if (instance.showInput) { if (instance.showInput) {
currentMsg.resolve({ value: instance.inputValue, action }); currentMsg.resolve({ value: instance.inputValue, action });
...@@ -58,9 +56,6 @@ const defaultCallback = action => { ...@@ -58,9 +56,6 @@ const defaultCallback = action => {
} else if (action === 'cancel' && currentMsg.reject) { } else if (action === 'cancel' && currentMsg.reject) {
currentMsg.reject(action); currentMsg.reject(action);
} }
} else {
currentMsg.resolve(action);
}
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment