mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
docs(slides, slide): update doc
This commit is contained in:
@ -61,10 +61,14 @@ import {Scroll} from '../scroll/scroll';
|
|||||||
*```
|
*```
|
||||||
* @property {Boolean} [autoplay] - whether or not the slides should automatically change
|
* @property {Boolean} [autoplay] - whether or not the slides should automatically change
|
||||||
* @property {Boolean} [loop] - whether the slides should loop from the last slide back to the first
|
* @property {Boolean} [loop] - whether the slides should loop from the last slide back to the first
|
||||||
* @property {Boolean} [bounce] - whether the slides should bounce
|
|
||||||
* @property {Number} [index] - The slide index to start on
|
* @property {Number} [index] - The slide index to start on
|
||||||
* @property [pager] - add this property to enable the slide pager
|
* @property {Boolean} [bounce] - whether the slides should bounce
|
||||||
* @property {Any} [change] - expression to evaluate when a slide has been changed
|
* @property {Boolean} [pager] - Whether the slide should show the page or not
|
||||||
|
* @property {Any} [options] - Any additional slider options you want to pass
|
||||||
|
* @property {Number} [zoom] - Whether or not the slider can zoom in or out
|
||||||
|
* @property {Number} [zoomDuration] - how long it should take to zoom a slide
|
||||||
|
* @property {Number} [zoomMax] - the max scale an slide can be zoomed
|
||||||
|
* @property {Any} (change) - expression to evaluate when a slide has been changed
|
||||||
* @demo /docs/v2/demos/slides/
|
* @demo /docs/v2/demos/slides/
|
||||||
* @see {@link /docs/v2/components#slides Slides Component Docs}
|
* @see {@link /docs/v2/components#slides Slides Component Docs}
|
||||||
*/
|
*/
|
||||||
@ -81,18 +85,69 @@ import {Scroll} from '../scroll/scroll';
|
|||||||
})
|
})
|
||||||
export class Slides extends Ion {
|
export class Slides extends Ion {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
public rapidUpdate: Function;
|
public rapidUpdate: Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private showPager: boolean;
|
private showPager: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private slider: Swiper;
|
private slider: Swiper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private maxScale: number;
|
private maxScale: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private zoomElement: HTMLElement;
|
private zoomElement: HTMLElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private zoomGesture: Gesture;
|
private zoomGesture: Gesture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private scale: number;
|
private scale: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private zoomLastPosX: number;
|
private zoomLastPosX: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private zoomLastPosY: number;
|
private zoomLastPosY: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private viewportWidth: number;
|
private viewportWidth: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private viewportHeight: number;
|
private viewportHeight: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private enableZoom: boolean;
|
private enableZoom: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private touch: {
|
private touch: {
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
@ -108,16 +163,55 @@ export class Slides extends Ion {
|
|||||||
zoomableHeight: number
|
zoomableHeight: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() autoplay: any;
|
@Input() autoplay: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() loop: any;
|
@Input() loop: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() index: any;
|
@Input() index: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() bounce: any;
|
@Input() bounce: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() pager: any;
|
@Input() pager: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() options: any;
|
@Input() options: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() zoom: any;
|
@Input() zoom: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() zoomDuration: any;
|
@Input() zoomDuration: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() zoomMax: any;
|
@Input() zoomMax: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Output() change: EventEmitter<any> = new EventEmitter();
|
@Output() change: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -595,15 +689,27 @@ export class Slides extends Ion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @name Slide
|
||||||
|
* @description
|
||||||
|
* `ion-slide` is a child component of `ion-slides` and is where all your individule slide content will be rendered too.
|
||||||
|
*
|
||||||
|
* @see {@link /docs/v2/api/components/slides/Slides/ Slides API Docs}
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-slide',
|
selector: 'ion-slide',
|
||||||
template: '<div class="slide-zoom"><ng-content></ng-content></div>'
|
template: '<div class="slide-zoom"><ng-content></ng-content></div>'
|
||||||
})
|
})
|
||||||
export class Slide {
|
export class Slide {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
private ele: HTMLElement;
|
private ele: HTMLElement;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
@Input() zoom;
|
@Input() zoom;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
Reference in New Issue
Block a user