File tree Expand file tree Collapse file tree
samples/vuejs/typescript/00 Custom Validator/src/common/components/form Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import Vue from 'vue' ;
1+ import Vue , { ComponentOptions } from 'vue' ;
2+
3+ interface Props extends Vue {
4+ className : string ;
5+ placeholder : string ;
6+ type : string ;
7+ value : any ;
8+ inputHandler : ( event ) => void ;
9+ label : string ;
10+ name : string ;
11+ }
212
313export const InputComponent = Vue . extend ( {
414 props : [
@@ -27,4 +37,4 @@ export const InputComponent = Vue.extend({
2737 </ div >
2838 ) ;
2939 } ,
30- } ) ;
40+ } as ComponentOptions < Props > ) ;
Original file line number Diff line number Diff line change 1- import Vue from 'vue' ;
1+ import Vue , { ComponentOptions } from 'vue' ;
2+
3+ interface Props extends Vue {
4+ className : string ;
5+ placeholder : string ;
6+ type : string ;
7+ value : any ;
8+ inputHandler : ( event ) => void ;
9+ label : string ;
10+ name : string ;
11+ buttonText : string ;
12+ buttonClickHandler : ( event ) => void ;
13+ buttonClassName : string ;
14+ }
215
316export const InputButtonComponent = Vue . extend ( {
417 props : [
@@ -40,4 +53,4 @@ export const InputButtonComponent = Vue.extend({
4053 </ div >
4154 ) ;
4255 } ,
43- } ) ;
56+ } as ComponentOptions < Props > ) ;
Original file line number Diff line number Diff line change 1- import Vue from 'vue' ;
1+ import Vue , { ComponentOptions } from 'vue' ;
2+
3+ interface Props extends Vue {
4+ hasError : boolean ;
5+ errorMessage : string ;
6+ className : string ;
7+ }
28
39export const ValidationComponent = Vue . extend ( {
410 props : [
@@ -22,4 +28,4 @@ export const ValidationComponent = Vue.extend({
2228 </ div >
2329 ) ;
2430 } ,
25- } ) ;
31+ } as ComponentOptions < Props > ) ;
You can’t perform that action at this time.
0 commit comments