From 87da2d5f0b26982dbf86fdde2e73997d24f22c70 Mon Sep 17 00:00:00 2001 From: "YLHEALTH\\jackson.li" Date: Thu, 10 Jan 2019 17:40:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A1=8C=E4=B8=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/p3/p3.component.html | 12 ++++++------ src/app/p3/p3.component.ts | 12 +++++++----- src/app/p4/p4.component.ts | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/app/p3/p3.component.html b/src/app/p3/p3.component.html index cfb6327..a4ccb75 100644 --- a/src/app/p3/p3.component.html +++ b/src/app/p3/p3.component.html @@ -1,10 +1,10 @@

題三

- - 寬度 :
- 高度 :
- - - + + WidthLength :
+ HeightLength :
+ + + diff --git a/src/app/p3/p3.component.ts b/src/app/p3/p3.component.ts index aada6a6..91dda1c 100644 --- a/src/app/p3/p3.component.ts +++ b/src/app/p3/p3.component.ts @@ -9,19 +9,21 @@ export class P3Component implements OnInit { widthLength = '1024'; heightLength = '768'; - imageUrl = 'http://lorempixel.com/{{widthLength}}/{{heightLength}}/'; + imageUrl = null; + + ngOnInit() { + this.showPic(); + } showPic() { if (this.widthLength !== null && this.heightLength !== null && this.widthLength !== undefined && this.heightLength !== undefined) { - this.imageUrl = 'http://lorempixel.com/' + this.widthLength + '/' + this.heightLength + '/'; + this.imageUrl = 'https://lorempixel.com/' + this.widthLength + '/' + this.heightLength + '/'; } else { - alert('長度或高度不得為空!'); + alert('null'); } } constructor() { } - ngOnInit() { } - } diff --git a/src/app/p4/p4.component.ts b/src/app/p4/p4.component.ts index 4b006c3..a1ff63b 100644 --- a/src/app/p4/p4.component.ts +++ b/src/app/p4/p4.component.ts @@ -49,7 +49,7 @@ export class P4Component implements OnInit { if ( this.value2 !== Number ) { - alert('只能輸入數字'); + alert('欄位只能輸入英文兩碼 + 數字三碼'); } else { alert('輸入正確'); } -- 2.26.2