From a9e144dfb991cb9d34aec1a2a86d68efa963e496 Mon Sep 17 00:00:00 2001 From: Guoyuanqiang Date: Fri, 12 Oct 2018 11:02:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(module:=20codebox):=20fix=20show=20code?= =?UTF-8?q?=20window=20back=20title=20always=20show=20'=E8=BF=94=E5=9B=9E'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(showcase: codebox): fix show code window back title always show '返回' feat(showcase: codebox): tooltip always show --- .../nz-codebox/nz-codebox.component.html | 43 ++++++++----------- .../share/nz-codebox/nz-codebox.component.ts | 8 ++++ scripts/site/_site/src/style/demo.less | 2 +- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html index 1ade4c22..60d84466 100644 --- a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html +++ b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html @@ -9,34 +9,29 @@ - - - - - + + + + + +
+ + + + + + + + + +
-
- - - - - - - - - -
diff --git a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts index bb7cfaa3..6bec897a 100644 --- a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts +++ b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts @@ -69,6 +69,14 @@ export class NzCodeBoxComponent implements OnInit { this.nzExpanded = false; } + nzOkText() { + if (window.location.href.split('/').splice(-1)[0] === 'zh') { + return '返回'; + } else { + return 'Back'; + } + } + copyGenerateCommand(command) { this.copy(command).then(() => { this._commandCopied = true; diff --git a/scripts/site/_site/src/style/demo.less b/scripts/site/_site/src/style/demo.less index dbde650e..c4177727 100644 --- a/scripts/site/_site/src/style/demo.less +++ b/scripts/site/_site/src/style/demo.less @@ -138,7 +138,7 @@ text-align: center; font-size: 14px; font-weight: bold; - border: 1px solid #ededed; + border: 1px solid #ccc; padding: 8px; border-radius: 16px; background-color: rgba(256, 256, 256, 0.6); From 2694a1a3fdc2ff24c0e280323fce82b6e9d07265 Mon Sep 17 00:00:00 2001 From: Guoyuanqiang Date: Fri, 12 Oct 2018 11:40:55 +0800 Subject: [PATCH 2/2] fix(module:codebox): format code --- .../nz-codebox/nz-codebox.component.html | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html index 60d84466..5bfeb87a 100644 --- a/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html +++ b/scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.html @@ -9,12 +9,19 @@ - - - - - + + + + +
@@ -22,12 +29,10 @@ - + - +