-
Notifications
You must be signed in to change notification settings - Fork 21
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 tooltip template
close #85
- Loading branch information
1 parent
555ce07
commit a0e79c2
Showing
30 changed files
with
220 additions
and
48 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
lib/ng-nest/ui/slider-select/examples/en_US/default/custom-value/custom-value.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,12 @@ | ||
<x-row> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model1" [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model2" range [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
</x-row> | ||
|
||
<ng-template #customTpl let-value="$value"> | ||
<x-icon type="fto-user"></x-icon> {{ value }} % | ||
</ng-template> |
5 changes: 5 additions & 0 deletions
5
lib/ng-nest/ui/slider-select/examples/en_US/default/custom-value/custom-value.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-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
lib/ng-nest/ui/slider-select/examples/en_US/default/custom-value/custom-value.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,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-custom-value', | ||
templateUrl: './custom-value.component.html', | ||
styleUrls: ['./custom-value.component.scss'] | ||
}) | ||
export class ExCustomValueComponent { | ||
model1 = 60; | ||
model2: number[] = [20, 50]; | ||
} |
6 changes: 6 additions & 0 deletions
6
lib/ng-nest/ui/slider-select/examples/en_US/default/custom-value/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: 10 | ||
label: 'Value' | ||
--- | ||
|
||
- Use the `tooltipCustom` attribute to customize the tooltip display value. |
12 changes: 12 additions & 0 deletions
12
lib/ng-nest/ui/slider-select/examples/zh_CN/default/custom-value/custom-value.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,12 @@ | ||
<x-row> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model1" [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model2" range [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
</x-row> | ||
|
||
<ng-template #customTpl let-value="$value"> | ||
<x-icon type="fto-user"></x-icon> {{ value }} % | ||
</ng-template> |
5 changes: 5 additions & 0 deletions
5
lib/ng-nest/ui/slider-select/examples/zh_CN/default/custom-value/custom-value.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-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
lib/ng-nest/ui/slider-select/examples/zh_CN/default/custom-value/custom-value.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,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-custom-value', | ||
templateUrl: './custom-value.component.html', | ||
styleUrls: ['./custom-value.component.scss'] | ||
}) | ||
export class ExCustomValueComponent { | ||
model1 = 60; | ||
model2: number[] = [20, 50]; | ||
} |
6 changes: 6 additions & 0 deletions
6
lib/ng-nest/ui/slider-select/examples/zh_CN/default/custom-value/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: 10 | ||
label: '显示值' | ||
--- | ||
|
||
- 使用 `tooltipCustom` 属性自定义 tooltip 显示值。 |
3 changes: 0 additions & 3 deletions
3
lib/ng-nest/ui/slider-select/examples/zh_CN/default/vertical/vertical.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 |
---|---|---|
@@ -1,7 +1,4 @@ | ||
:host { | ||
x-row { | ||
margin-top: 10rem; | ||
} | ||
x-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
|
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
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
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
12 changes: 12 additions & 0 deletions
12
src/main/test/modules/slider-select/custom-value/custom-value.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,12 @@ | ||
<x-row> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model1" [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
<x-col span="12"> | ||
<x-slider-select [(ngModel)]="model2" range [tooltipCustom]="customTpl"></x-slider-select> | ||
</x-col> | ||
</x-row> | ||
|
||
<ng-template #customTpl let-value="$value"> | ||
<x-icon type="fto-user"></x-icon> {{ value }} % | ||
</ng-template> |
5 changes: 5 additions & 0 deletions
5
src/main/test/modules/slider-select/custom-value/custom-value.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-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/test/modules/slider-select/custom-value/custom-value.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,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-custom-value', | ||
templateUrl: './custom-value.component.html', | ||
styleUrls: ['./custom-value.component.scss'] | ||
}) | ||
export class ExCustomValueComponent { | ||
model1 = 60; | ||
model2: number[] = [20, 50]; | ||
} |
Oops, something went wrong.