From 8a0342763ab30c3f99f71ee4806f79b14914c858 Mon Sep 17 00:00:00 2001 From: xiaoshude Date: Fri, 2 Jun 2017 15:25:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=EF=BC=9A=E5=BD=93ngModel=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Select/select.controller.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/Select/select.controller.js b/lib/Select/select.controller.js index 8e1edfa..8e36f8f 100644 --- a/lib/Select/select.controller.js +++ b/lib/Select/select.controller.js @@ -34,6 +34,15 @@ class SelectController { $scope.$on('$destroy', () => { this.destory(); }); + + // fix:当ngModel被重置为空时清除选择项 + $scope.$watch(() => { + return this.ngModel + }, newVal => { + if (!newVal) { + this.clearSelected(null); + } + }) } @@ -77,7 +86,7 @@ class SelectController { /** * 没有填充好数据的组件,也能设置好 - * 设置好数据的组件,就要匹配内容 + * 设置好数据的组件,就要匹配内容 */ if (this.dataArray && this.dataArray.length > 0) { this.dataArray.map((group) => { @@ -442,7 +451,7 @@ class SelectController { }).then((data) => { /** * fix https://github.com/ffan-fe/fancyui/issues/43 - + if (!data || data.length == 0) { this.ngModel = {}; }*/ From adefb032b688ab136f6f9e4deeebc5ab2b191149 Mon Sep 17 00:00:00 2001 From: xiaoshude Date: Tue, 11 Jul 2017 16:24:02 +0800 Subject: [PATCH 2/3] fix popconfirm bug & example error --- .../popconfirm/popconfirm.controller.js | 52 ++++++++++--------- lib/Popconfirm/popconfirm.less | 4 +- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/example/app/components/popconfirm/popconfirm.controller.js b/example/app/components/popconfirm/popconfirm.controller.js index 6c98a4e..e1fe90e 100755 --- a/example/app/components/popconfirm/popconfirm.controller.js +++ b/example/app/components/popconfirm/popconfirm.controller.js @@ -14,12 +14,13 @@ export default class PopconfirmController { } topPop(e) { - this.Popconfirm.pop({ - title: '确定要删除top吗?', - placement: 'top', - okText: '确定', - cancelText: '取消' - }, e).then(() => { + let promise = this.Popconfirm.pop({ + title: '确定要删除top吗?', + placement: 'top', + okText: '确定', + cancelText: '取消' + }, e); + promise && promise.then(() => { this.Message.info("点了确定"); }, () => { this.Message.info("点了取消"); @@ -27,12 +28,13 @@ export default class PopconfirmController { } leftPop(e) { - this.Popconfirm.pop({ - title: '确定要删除left吗?', - placement: 'left', - okText: '确定', - cancelText: '取消' - }, e).then(() => { + let promise = this.Popconfirm.pop({ + title: '确定要删除left吗?', + placement: 'left', + okText: '确定', + cancelText: '取消' + }, e); + promise && promise.then(() => { this.Message.info("点了确定"); }, () => { this.Message.info("点了取消"); @@ -40,12 +42,13 @@ export default class PopconfirmController { } bottomPop(e) { - this.Popconfirm.pop({ - title: '确定要删除bottom吗?', - placement: 'bottom', - okText: '确定', - cancelText: '取消' - }, e).then(() => { + let promise = this.Popconfirm.pop({ + title: '确定要删除bottom吗?', + placement: 'bottom', + okText: '确定', + cancelText: '取消' + }, e); + promise && promise.then(() => { this.Message.info("点了确定"); }, () => { this.Message.info("点了取消"); @@ -53,12 +56,13 @@ export default class PopconfirmController { } rightPop(e) { - this.Popconfirm.pop({ - title: '确定要删除right吗?', - placement: 'right', - okText: '确定', - cancelText: '取消' - }, e).then(() => { + let promise = this.Popconfirm.pop({ + title: '确定要删除right吗?', + placement: 'right', + okText: '确定', + cancelText: '取消' + }, e); + promise && promise.then(() => { this.Message.info("点了确定"); }, () => { this.Message.info("点了取消"); diff --git a/lib/Popconfirm/popconfirm.less b/lib/Popconfirm/popconfirm.less index 0b287b2..f06853f 100644 --- a/lib/Popconfirm/popconfirm.less +++ b/lib/Popconfirm/popconfirm.less @@ -287,8 +287,8 @@ animation-timing-function: cubic-bezier(.08, .82, .17, 1); -webkit-animation-name: bpZoomBigIn; animation-name: bpZoomBigIn; - -webkit-animation-play-state: running; - animation-play-state: running + -webkit-animation-play-state: running!important; + animation-play-state: running!important; } .bp-popover-hidden { From 1e4a0be6d5be3a6c161944d8c2fc516c84c4765d Mon Sep 17 00:00:00 2001 From: xiaoshude Date: Mon, 24 Jul 2017 16:50:48 +0800 Subject: [PATCH 3/3] bug fix upload --- lib/Upload/upload.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Upload/upload.html b/lib/Upload/upload.html index bb11c36..e0ade08 100644 --- a/lib/Upload/upload.html +++ b/lib/Upload/upload.html @@ -7,7 +7,7 @@ ng-transclude>
-
+