Skip to content

Commit cfa18e4

Browse files
committed
コード修正
1 parent c5d8393 commit cfa18e4

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/components/HelloVue.vue

+17-13
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,47 @@ import { InputType } from 'zlib';
1414
/** filters */
1515
filters: {
1616
convertUpperCase(value: string): string | null {
17-
if (!value) return null;
17+
if (!value) {
18+
return null;
19+
}
1820
return value.toUpperCase();
1921
},
2022
},
2123
})
2224
export default class HelloVue extends Vue {
2325
/** props */
2426
@Prop()
25-
private val!: string;
27+
val!: string;
28+
29+
/** data */
30+
value: string = this.val;
31+
inputValue: string = '';
2632
2733
/** emit */
2834
@Emit('handle-click')
29-
clickButton(val: string): void {}
35+
clickButton(val: string): void {
36+
//
37+
}
3038
3139
/** watch */
3240
@Watch('value')
3341
onValueChange(newValue: string, oldValue: string): void {
3442
console.log(`watch: ${newValue}, ${oldValue}`);
3543
}
3644
37-
/** data */
38-
value: string = this.val;
39-
inputValue: string = '';
40-
41-
/** lifecylce hook */
42-
mounted(): void {
43-
console.log('mounted');
44-
}
45-
4645
/** computed */
4746
get isDisabled(): boolean {
4847
return this.inputValue === '';
4948
}
5049
50+
/** lifecycle hook */
51+
mounted(): void {
52+
console.log('mounted');
53+
}
54+
5155
/** methods */
5256
handleInput($event: Event): void {
53-
this.inputValue = ($event.target as HTMLInputElement).value;
57+
this.inputValue = (($event.target as any) as HTMLInputElement).value;
5458
}
5559
handleClick(): void {
5660
if (this.inputValue === '') {

tslint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"interface-name": false,
1111
"ordered-imports": false,
1212
"object-literal-sort-keys": false,
13-
"no-consecutive-blank-lines": false
13+
"no-consecutive-blank-lines": false,
14+
"no-console": false
1415
}
1516
}

0 commit comments

Comments
 (0)