mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
style: lint
This commit is contained in:
@ -38,17 +38,10 @@
|
|||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-segment-view id="myView">
|
<ion-segment-view id="myView">
|
||||||
<ion-segment-content>
|
<ion-segment-content> Paid </ion-segment-content>
|
||||||
Paid
|
<ion-segment-content> Free </ion-segment-content>
|
||||||
</ion-segment-content>
|
<ion-segment-content> Top </ion-segment-content>
|
||||||
<ion-segment-content>
|
|
||||||
Free
|
|
||||||
</ion-segment-content>
|
|
||||||
<ion-segment-content>
|
|
||||||
Top
|
|
||||||
</ion-segment-content>
|
|
||||||
</ion-segment-view>
|
</ion-segment-view>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-app>
|
</ion-app>
|
||||||
</body>
|
</body>
|
||||||
|
@ -81,15 +81,15 @@ export class Segment implements ComponentInterface {
|
|||||||
protected valueChanged(value: SegmentValue | undefined, oldValue?: SegmentValue | undefined) {
|
protected valueChanged(value: SegmentValue | undefined, oldValue?: SegmentValue | undefined) {
|
||||||
if (oldValue !== undefined && value !== undefined) {
|
if (oldValue !== undefined && value !== undefined) {
|
||||||
const buttons = this.getButtons();
|
const buttons = this.getButtons();
|
||||||
const previous = buttons.find(button => button.value === oldValue);
|
const previous = buttons.find((button) => button.value === oldValue);
|
||||||
const current = buttons.find(button => button.value === value);
|
const current = buttons.find((button) => button.value === value);
|
||||||
|
|
||||||
if (previous && current) {
|
if (previous && current) {
|
||||||
this.checkButton(previous, current);
|
this.checkButton(previous, current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `ionSelect` is emitted every time the value changes (internal or external changes).
|
* `ionSelect` is emitted every time the value changes (internal or external changes).
|
||||||
* Used by `ion-segment-button` to determine if the button should be checked.
|
* Used by `ion-segment-button` to determine if the button should be checked.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user