mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
chore(): update demos and segments
This commit is contained in:
@ -58,6 +58,9 @@ Segments provide functionality similar to tabs, selecting one will unselect all
|
||||
|
||||
string
|
||||
|
||||
The color to use for the text color.
|
||||
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
|
||||
|
||||
|
||||
#### disabled
|
||||
|
||||
@ -68,11 +71,16 @@ boolean
|
||||
|
||||
any
|
||||
|
||||
The mode determines which platform styles to use.
|
||||
Possible values are: `"ios"` or `"md"`.
|
||||
|
||||
|
||||
#### value
|
||||
|
||||
string
|
||||
|
||||
the value of the segment.
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
@ -80,6 +88,9 @@ string
|
||||
|
||||
string
|
||||
|
||||
The color to use for the text color.
|
||||
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
|
||||
|
||||
|
||||
#### disabled
|
||||
|
||||
@ -90,16 +101,23 @@ boolean
|
||||
|
||||
any
|
||||
|
||||
The mode determines which platform styles to use.
|
||||
Possible values are: `"ios"` or `"md"`.
|
||||
|
||||
|
||||
#### value
|
||||
|
||||
string
|
||||
|
||||
the value of the segment.
|
||||
|
||||
|
||||
## Events
|
||||
|
||||
#### ionChange
|
||||
|
||||
Emitted when the value property has changed.
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
@ -18,31 +18,29 @@ export class Segment {
|
||||
@Element() private el: HTMLElement;
|
||||
|
||||
/**
|
||||
* @output {Event} Emitted when the value property has changed.
|
||||
* Emitted when the value property has changed.
|
||||
*/
|
||||
@Event() ionChange: EventEmitter<SegmentEventDetail>;
|
||||
|
||||
/**
|
||||
* @input {string} The color to use from your Sass `$colors` map.
|
||||
* The color to use for the text color.
|
||||
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
|
||||
* For more information, see [Theming your App](/docs/theming/theming-your-app).
|
||||
*/
|
||||
@Prop() color: string;
|
||||
|
||||
/**
|
||||
* @input {string} The mode determines which platform styles to use.
|
||||
* The mode determines which platform styles to use.
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
* For more information, see [Platform Styles](/docs/theming/platform-specific-styles).
|
||||
*/
|
||||
@Prop() mode: 'ios' | 'md';
|
||||
|
||||
/*
|
||||
* @input {boolean} If true, the user cannot interact with the segment. Default false.
|
||||
* If true, the user cannot interact with the segment. Default false.
|
||||
*/
|
||||
@Prop({ mutable: true }) disabled: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {string} the value of the segment.
|
||||
* the value of the segment.
|
||||
*/
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
@ -53,7 +51,6 @@ export class Segment {
|
||||
|
||||
componentDidLoad() {
|
||||
this.buttons = this.el.querySelectorAll('ion-segment-button');
|
||||
|
||||
for (var i = 0; i < this.buttons.length; i++) {
|
||||
const button = this.buttons[i];
|
||||
|
||||
|
@ -49,10 +49,10 @@
|
||||
<ion-icon name="book"></ion-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Reading List">
|
||||
<ion-icon ios="ios-glasses-outline" md="md-glasses"></ion-icon>
|
||||
<ion-icon name="glasses"></ion-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="Shared Links">
|
||||
<ion-icon ios="ios-at-outline" md="md-at"></ion-icon>
|
||||
<ion-icon name="at"></ion-icon>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
@ -119,6 +119,8 @@
|
||||
console.log('event.target: ', event.target.value);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
|
Reference in New Issue
Block a user