File tree 2 files changed +19
-14
lines changed
2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -14,43 +14,47 @@ import { InputType } from 'zlib';
14
14
/** filters */
15
15
filters: {
16
16
convertUpperCase(value : string ): string | null {
17
- if (! value ) return null ;
17
+ if (! value ) {
18
+ return null ;
19
+ }
18
20
return value .toUpperCase ();
19
21
},
20
22
},
21
23
})
22
24
export default class HelloVue extends Vue {
23
25
/** props */
24
26
@Prop ()
25
- private val! : string ;
27
+ val! : string ;
28
+
29
+ /** data */
30
+ value: string = this .val ;
31
+ inputValue: string = ' ' ;
26
32
27
33
/** emit */
28
34
@Emit (' handle-click' )
29
- clickButton(val : string ): void {}
35
+ clickButton(val : string ): void {
36
+ //
37
+ }
30
38
31
39
/** watch */
32
40
@Watch (' value' )
33
41
onValueChange(newValue : string , oldValue : string ): void {
34
42
console .log (` watch: ${newValue }, ${oldValue } ` );
35
43
}
36
44
37
- /** data */
38
- value: string = this .val ;
39
- inputValue: string = ' ' ;
40
-
41
- /** lifecylce hook */
42
- mounted(): void {
43
- console .log (' mounted' );
44
- }
45
-
46
45
/** computed */
47
46
get isDisabled(): boolean {
48
47
return this .inputValue === ' ' ;
49
48
}
50
49
50
+ /** lifecycle hook */
51
+ mounted(): void {
52
+ console .log (' mounted' );
53
+ }
54
+
51
55
/** methods */
52
56
handleInput($event : Event ): void {
53
- this .inputValue = ($event .target as HTMLInputElement ).value ;
57
+ this .inputValue = (( $event .target as any ) as HTMLInputElement ).value ;
54
58
}
55
59
handleClick(): void {
56
60
if (this .inputValue === ' ' ) {
Original file line number Diff line number Diff line change 10
10
"interface-name" : false ,
11
11
"ordered-imports" : false ,
12
12
"object-literal-sort-keys" : false ,
13
- "no-consecutive-blank-lines" : false
13
+ "no-consecutive-blank-lines" : false ,
14
+ "no-console" : false
14
15
}
15
16
}
You can’t perform that action at this time.
0 commit comments