mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
Merge branch '2.0' into sass-color-map
This commit is contained in:
@ -24,4 +24,4 @@
|
|||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -31,4 +31,4 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -31,4 +31,4 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -67,7 +67,7 @@ ion-action-sheet {
|
|||||||
|
|
||||||
.action-sheet-button {
|
.action-sheet-button {
|
||||||
padding: $action-sheet-ios-button-padding;
|
padding: $action-sheet-ios-button-padding;
|
||||||
|
margin: 0;
|
||||||
min-height: $action-sheet-ios-button-min-height;
|
min-height: $action-sheet-ios-button-min-height;
|
||||||
|
|
||||||
border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
|
border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color;
|
||||||
|
@ -140,7 +140,7 @@ export class ActionSheet extends ViewController {
|
|||||||
* |----------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
* |----------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
* | text | `string` | The buttons text |
|
* | text | `string` | The buttons text |
|
||||||
* | icon | `icon` | The buttons icons |
|
* | icon | `icon` | The buttons icons |
|
||||||
* | handler | `any` | An express the button shoule evaluate |
|
* | handler | `any` | An express the button should evaluate |
|
||||||
* | cssClass | `string` | An additional class for custom styles |
|
* | cssClass | `string` | An additional class for custom styles |
|
||||||
* | role | `string` | How the button should be displayed, `destructive` or `cancel`. If not role is provided, it will display the button without any additional styles |
|
* | role | `string` | How the button should be displayed, `destructive` or `cancel`. If not role is provided, it will display the button without any additional styles |
|
||||||
*
|
*
|
||||||
|
@ -138,6 +138,6 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
|
||||||
<div [hidden]="isChangeDetecting()"></div>
|
<div [hidden]="isChangeDetecting()"></div>
|
@ -33,4 +33,4 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -76,4 +76,4 @@
|
|||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -33,4 +33,4 @@
|
|||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
<ion-nav [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -37,4 +37,4 @@
|
|||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -37,4 +37,4 @@
|
|||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
||||||
|
@ -36,4 +36,4 @@
|
|||||||
|
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
@ -108,9 +108,9 @@ export class NavController extends Ion {
|
|||||||
private _init = false;
|
private _init = false;
|
||||||
private _trans: Transition;
|
private _trans: Transition;
|
||||||
private _sbGesture: SwipeBackGesture;
|
private _sbGesture: SwipeBackGesture;
|
||||||
private _sbEnabled: boolean;
|
|
||||||
private _sbThreshold: number;
|
private _sbThreshold: number;
|
||||||
|
|
||||||
|
protected _sbEnabled: boolean;
|
||||||
protected _ids: number = -1;
|
protected _ids: number = -1;
|
||||||
protected _trnsDelay: any;
|
protected _trnsDelay: any;
|
||||||
protected _trnsTime: number = 0;
|
protected _trnsTime: number = 0;
|
||||||
@ -1465,18 +1465,6 @@ export class NavController extends Ion {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @input {boolean} Whether it's possible to swipe-to-go-back on this nav controller or not.
|
|
||||||
*/
|
|
||||||
@Input()
|
|
||||||
get swipeBackEnabled(): boolean {
|
|
||||||
return this._sbEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
set swipeBackEnabled(val: boolean) {
|
|
||||||
this._sbEnabled = isTrueProperty(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If it's possible to use swipe back or not. If it's not possible
|
* If it's possible to use swipe back or not. If it's not possible
|
||||||
* to go back, or swipe back is not enable then this will return false.
|
* to go back, or swipe back is not enable then this will return false.
|
||||||
|
@ -3,6 +3,7 @@ import {Component, ElementRef, Input, Optional, NgZone, Compiler, AppViewManager
|
|||||||
import {IonicApp} from '../app/app';
|
import {IonicApp} from '../app/app';
|
||||||
import {Config} from '../../config/config';
|
import {Config} from '../../config/config';
|
||||||
import {Keyboard} from '../../util/keyboard';
|
import {Keyboard} from '../../util/keyboard';
|
||||||
|
import {isTrueProperty} from '../../util/util';
|
||||||
import {NavController} from './nav-controller';
|
import {NavController} from './nav-controller';
|
||||||
import {ViewController} from './view-controller';
|
import {ViewController} from './view-controller';
|
||||||
|
|
||||||
@ -42,10 +43,10 @@ import {ViewController} from './view-controller';
|
|||||||
* Nav will automatically add a back button to it if there is a page
|
* Nav will automatically add a back button to it if there is a page
|
||||||
* before the one you are navigating to in the navigation stack.
|
* before the one you are navigating to in the navigation stack.
|
||||||
*
|
*
|
||||||
* Additionally, specifying the `swipe-back-enabled` property will allow you to
|
* Additionally, specifying the `swipeBackEnabled` property will allow you to
|
||||||
* swipe to go back:
|
* swipe to go back:
|
||||||
* ```html
|
* ```html
|
||||||
* <ion-nav swipe-back-enabled="false" [root]="rootPage"></ion-nav>
|
* <ion-nav swipeBackEnabled="false" [root]="rootPage"></ion-nav>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Here is a diagram of how Nav animates smoothly between pages:
|
* Here is a diagram of how Nav animates smoothly between pages:
|
||||||
@ -146,6 +147,18 @@ export class Nav extends NavController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @input {boolean} Whether it's possible to swipe-to-go-back on this nav controller or not.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
get swipeBackEnabled(): boolean {
|
||||||
|
return this._sbEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
set swipeBackEnabled(val: boolean) {
|
||||||
|
this._sbEnabled = isTrueProperty(val);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
@ -44,7 +44,7 @@ export class Login {
|
|||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-menu>
|
</ion-menu>
|
||||||
|
|
||||||
<ion-nav id="account-nav" [root]="rootPage" #content swipe-back-enabled="false"></ion-nav>
|
<ion-nav id="account-nav" [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class Account {
|
export class Account {
|
||||||
@ -135,7 +135,7 @@ export class Profile {
|
|||||||
|
|
||||||
|
|
||||||
@App({
|
@App({
|
||||||
template: `<ion-nav id="root-nav" [root]="rootPage" swipe-back-enabled="false"></ion-nav>`
|
template: `<ion-nav id="root-nav" [root]="rootPage" swipeBackEnabled="false"></ion-nav>`
|
||||||
})
|
})
|
||||||
class E2EApp {
|
class E2EApp {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
Reference in New Issue
Block a user