-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:slider-select): add marks
close #86
- Loading branch information
1 parent
b6912db
commit 78b9eed
Showing
17 changed files
with
383 additions
and
33 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
lib/ng-nest/ui/slider-select/examples/en_US/default/marks/marks.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<x-row> | ||
<x-col span="24"> | ||
<x-slider-select [style.width.rem]="20" [(ngModel)]="model1" [marks]="marks"></x-slider-select> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-slider-select | ||
[style.width.rem]="20" | ||
[(ngModel)]="model2" | ||
[marks]="marks" | ||
reverse | ||
></x-slider-select> | ||
</x-col> | ||
<x-col span="6"> | ||
<x-slider-select | ||
[style.height.rem]="20" | ||
[(ngModel)]="model3" | ||
[marks]="marks" | ||
vertical | ||
></x-slider-select> | ||
</x-col> | ||
<x-col span="6"> | ||
<x-slider-select | ||
[style.height.rem]="20" | ||
[(ngModel)]="model4" | ||
[marks]="marks" | ||
reverse | ||
vertical | ||
></x-slider-select> | ||
</x-col> | ||
</x-row> |
5 changes: 5 additions & 0 deletions
5
lib/ng-nest/ui/slider-select/examples/en_US/default/marks/marks.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:host { | ||
x-col { | ||
margin-top: 1rem; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
lib/ng-nest/ui/slider-select/examples/en_US/default/marks/marks.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Component } from '@angular/core'; | ||
import { XSliderSelectMark } from '@ng-nest/ui/slider-select'; | ||
|
||
@Component({ | ||
selector: 'ex-marks', | ||
templateUrl: './marks.component.html', | ||
styleUrls: ['./marks.component.scss'] | ||
}) | ||
export class ExMarksComponent { | ||
model1 = 60; | ||
|
||
model2 = 70; | ||
|
||
model3 = 10; | ||
|
||
model4 = 20; | ||
|
||
marks: XSliderSelectMark[] = [ | ||
{ | ||
value: 0, | ||
label: '0°C' | ||
}, | ||
{ | ||
value: 37, | ||
label: '37°C' | ||
}, | ||
{ | ||
value: 60, | ||
label: '60°C' | ||
}, | ||
{ | ||
value: 100, | ||
label: '100°C', | ||
style: { | ||
color: '#f56c6c' | ||
} | ||
} | ||
]; | ||
} |
6 changes: 6 additions & 0 deletions
6
lib/ng-nest/ui/slider-select/examples/en_US/default/marks/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
order: 9 | ||
label: 'Marks' | ||
--- | ||
|
||
- Use the `marks` attribute to set labels. |
30 changes: 30 additions & 0 deletions
30
lib/ng-nest/ui/slider-select/examples/zh_CN/default/marks/marks.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<x-row> | ||
<x-col span="24"> | ||
<x-slider-select [style.width.rem]="20" [(ngModel)]="model1" [marks]="marks"></x-slider-select> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-slider-select | ||
[style.width.rem]="20" | ||
[(ngModel)]="model2" | ||
[marks]="marks" | ||
reverse | ||
></x-slider-select> | ||
</x-col> | ||
<x-col span="6"> | ||
<x-slider-select | ||
[style.height.rem]="20" | ||
[(ngModel)]="model3" | ||
[marks]="marks" | ||
vertical | ||
></x-slider-select> | ||
</x-col> | ||
<x-col span="6"> | ||
<x-slider-select | ||
[style.height.rem]="20" | ||
[(ngModel)]="model4" | ||
[marks]="marks" | ||
reverse | ||
vertical | ||
></x-slider-select> | ||
</x-col> | ||
</x-row> |
5 changes: 5 additions & 0 deletions
5
lib/ng-nest/ui/slider-select/examples/zh_CN/default/marks/marks.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:host { | ||
x-col { | ||
margin-top: 1rem; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
lib/ng-nest/ui/slider-select/examples/zh_CN/default/marks/marks.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Component } from '@angular/core'; | ||
import { XSliderSelectMark } from '@ng-nest/ui/slider-select'; | ||
|
||
@Component({ | ||
selector: 'ex-marks', | ||
templateUrl: './marks.component.html', | ||
styleUrls: ['./marks.component.scss'] | ||
}) | ||
export class ExMarksComponent { | ||
model1 = 60; | ||
|
||
model2 = 70; | ||
|
||
model3 = 10; | ||
|
||
model4 = 20; | ||
|
||
marks: XSliderSelectMark[] = [ | ||
{ | ||
value: 0, | ||
label: '0°C' | ||
}, | ||
{ | ||
value: 37, | ||
label: '37°C' | ||
}, | ||
{ | ||
value: 60, | ||
label: '60°C' | ||
}, | ||
{ | ||
value: 100, | ||
label: '100°C', | ||
style: { | ||
color: '#f56c6c' | ||
} | ||
} | ||
]; | ||
} |
6 changes: 6 additions & 0 deletions
6
lib/ng-nest/ui/slider-select/examples/zh_CN/default/marks/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
order: 9 | ||
label: '定义标签' | ||
--- | ||
|
||
- 使用 `marks` 属性设置标签。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.