mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
style: lint
This commit is contained in:
@ -38,17 +38,10 @@
|
||||
|
||||
<ion-content>
|
||||
<ion-segment-view id="myView">
|
||||
<ion-segment-content>
|
||||
Paid
|
||||
</ion-segment-content>
|
||||
<ion-segment-content>
|
||||
Free
|
||||
</ion-segment-content>
|
||||
<ion-segment-content>
|
||||
Top
|
||||
</ion-segment-content>
|
||||
<ion-segment-content> Paid </ion-segment-content>
|
||||
<ion-segment-content> Free </ion-segment-content>
|
||||
<ion-segment-content> Top </ion-segment-content>
|
||||
</ion-segment-view>
|
||||
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
|
@ -81,15 +81,15 @@ export class Segment implements ComponentInterface {
|
||||
protected valueChanged(value: SegmentValue | undefined, oldValue?: SegmentValue | undefined) {
|
||||
if (oldValue !== undefined && value !== undefined) {
|
||||
const buttons = this.getButtons();
|
||||
const previous = buttons.find(button => button.value === oldValue);
|
||||
const current = buttons.find(button => button.value === value);
|
||||
const previous = buttons.find((button) => button.value === oldValue);
|
||||
const current = buttons.find((button) => button.value === value);
|
||||
|
||||
if (previous && current) {
|
||||
this.checkButton(previous, current);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* `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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user