mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
chore(action-sheet): clean up deprecated warning
This commit is contained in:
@ -194,22 +194,15 @@ class ActionSheetCmp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// deprecated warning
|
// deprecated warning
|
||||||
if (button.style === 'cancel') {
|
if (button.style) {
|
||||||
console.warn('Alert "style" property has been renamed to "role"');
|
console.warn('Alert "style" property has been renamed to "role"');
|
||||||
button.role = 'cancel';
|
button.role = button.style;
|
||||||
this.d.cancelButton = button;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button.role === 'cancel') {
|
if (button.role === 'cancel') {
|
||||||
this.d.cancelButton = button;
|
this.d.cancelButton = button;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// deprecated warning
|
|
||||||
if (button.style === 'destructive') {
|
|
||||||
button.role = 'destructive';
|
|
||||||
button.cssClass = (button.cssClass + ' ' || '') + 'action-sheet-destructive';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (button.role === 'destructive') {
|
if (button.role === 'destructive') {
|
||||||
button.cssClass = (button.cssClass + ' ' || '') + 'action-sheet-destructive';
|
button.cssClass = (button.cssClass + ' ' || '') + 'action-sheet-destructive';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user