-
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.
fix(module:input-number): input add boundary assertion
close #72
- Loading branch information
1 parent
49f8bcc
commit 33ebeb9
Showing
25 changed files
with
323 additions
and
18 deletions.
There are no files selected for viewing
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
17 changes: 17 additions & 0 deletions
17
src/main/test/modules/input-number/bordered/bordered.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,17 @@ | ||
<x-row> | ||
<x-col span="24"> | ||
<x-input-number placeholder="请输入" bordered="false"></x-input-number> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-input-number placeholder="请输入" bordered="false" label="数量:" direction="row"></x-input-number> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-input-number placeholder="请输入" bordered="false"></x-input-number> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-input-number placeholder="请输入" bordered="false" required></x-input-number> | ||
</x-col> | ||
<x-col span="24"> | ||
<x-input-number placeholder="没有边框" bordered="false" disabled></x-input-number> | ||
</x-col> | ||
</x-row> |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/bordered/bordered.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,8 @@ | ||
:host { | ||
x-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
x-row > x-col > x-input-number { | ||
width: 10rem; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/bordered/bordered.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,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-bordered', | ||
templateUrl: './bordered.component.html', | ||
styleUrls: ['./bordered.component.scss'] | ||
}) | ||
export class ExBorderedComponent {} |
10 changes: 10 additions & 0 deletions
10
src/main/test/modules/input-number/disabled/disabled.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,10 @@ | ||
<x-row> | ||
<x-col> | ||
<x-input-number disabled></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number disabled [(ngModel)]="model"></x-input-number> | ||
</x-col> | ||
</x-row> |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/disabled/disabled.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,8 @@ | ||
:host { | ||
x-row > x-col { | ||
width: 10rem; | ||
} | ||
x-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/test/modules/input-number/disabled/disabled.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,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-disabled', | ||
templateUrl: './disabled.component.html', | ||
styleUrls: ['./disabled.component.scss'] | ||
}) | ||
export class ExDisabledComponent { | ||
model = 10; | ||
} |
3 changes: 2 additions & 1 deletion
3
src/main/test/modules/input-number/input-number.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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<ex-default></ex-default> | ||
<!-- <ex-default></ex-default> --> | ||
<ex-format></ex-format> | ||
<!-- <ex-limit></ex-limit> --> |
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
20 changes: 20 additions & 0 deletions
20
src/main/test/modules/input-number/label/label.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,20 @@ | ||
<x-row> | ||
<x-col> | ||
<x-input-number label="数量"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number label="数量" direction="column-reverse"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number label="数量" direction="row"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number label="数量" direction="row-reverse"></x-input-number> | ||
</x-col> | ||
</x-row> |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/label/label.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,8 @@ | ||
:host { | ||
x-row > x-col { | ||
width: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-label', | ||
templateUrl: './label.component.html', | ||
styleUrls: ['./label.component.scss'] | ||
}) | ||
export class ExLabelComponent {} |
15 changes: 15 additions & 0 deletions
15
src/main/test/modules/input-number/limit/limit.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,15 @@ | ||
<x-row> | ||
<x-col> | ||
<x-input-number max="10"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number min="1"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number min="1" max="10" [ngModel]="value" (ngModelChange)="change($event)"></x-input-number> | ||
</x-col> | ||
</x-row> |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/limit/limit.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,8 @@ | ||
:host { | ||
x-row > x-col { | ||
width: 10rem; | ||
} | ||
x-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/test/modules/input-number/limit/limit.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,13 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-limit', | ||
templateUrl: './limit.component.html', | ||
styleUrls: ['./limit.component.scss'] | ||
}) | ||
export class ExLimitComponent { | ||
value = 3; | ||
change(num: any) { | ||
console.log(num); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/test/modules/input-number/precision/precision.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,5 @@ | ||
<x-row> | ||
<x-col> | ||
<x-input-number precision="2" step="0.1"></x-input-number> | ||
</x-col> | ||
</x-row> |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/precision/precision.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,8 @@ | ||
:host { | ||
x-row > x-col { | ||
width: 10rem; | ||
} | ||
x-row:not(:first-child) { | ||
margin-top: 1rem; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/test/modules/input-number/precision/precision.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,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ex-precision', | ||
templateUrl: './precision.component.html', | ||
styleUrls: ['./precision.component.scss'] | ||
}) | ||
export class ExPrecisionComponent {} |
15 changes: 15 additions & 0 deletions
15
src/main/test/modules/input-number/required/required.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,15 @@ | ||
<x-row> | ||
<x-col> | ||
<x-input-number required [(ngModel)]="value"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number label="用户名" required [(ngModel)]="value"></x-input-number> | ||
</x-col> | ||
</x-row> | ||
<x-row> | ||
<x-col> | ||
<x-input-number icon="ado-user" required [(ngModel)]="value"></x-input-number> | ||
</x-col> | ||
</x-row> |
Oops, something went wrong.