mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
feat(alert): add attributes min & max to alert inputs of type number
This commit is contained in:
@ -19,6 +19,6 @@ export interface AlertInputOptions {
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
id?: string;
|
||||
min?: string;
|
||||
max?: string;
|
||||
min?: string | number;
|
||||
max?: string | number;
|
||||
}
|
||||
|
||||
@ -244,8 +244,12 @@ export class Alert extends ViewController {
|
||||
* | label | `string` | The input's label (only for radio/checkbox inputs) |
|
||||
* | checked | `boolean` | Whether or not the input is checked. |
|
||||
* | id | `string` | The input's id. |
|
||||
* | min | `string` | The input's minimum authorized value (only for date inputs) |
|
||||
* | max | `string` | The input's maximum authorized value (only for date inputs) |
|
||||
* | min | `string | number` | The input's minimum authorized value (string only for date inputs, number
|
||||
* only for number inputs)
|
||||
* |
|
||||
* | max | `string | number` | The input's maximum authorized value (string only for date inputs, number
|
||||
* only for number inputs)
|
||||
* |
|
||||
*
|
||||
* Button options
|
||||
*
|
||||
|
||||
@ -121,6 +121,16 @@ export class E2EPage {
|
||||
name: 'name5',
|
||||
type: 'date'
|
||||
});
|
||||
alert.addInput({
|
||||
name: 'name6',
|
||||
type: 'number',
|
||||
min: -5,
|
||||
max: 10
|
||||
});
|
||||
alert.addInput({
|
||||
name: 'name7',
|
||||
type: 'number'
|
||||
});
|
||||
alert.addButton({
|
||||
text: 'Cancel',
|
||||
handler: (data: any) => {
|
||||
|
||||
Reference in New Issue
Block a user