Skip to content

Commit

Permalink
Merge 1e4a0be into 3c1e273
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshude committed Jul 24, 2017
2 parents 3c1e273 + 1e4a0be commit f8510ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions lib/Select/select.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ class SelectController {
$scope.$on('$destroy', () => {
this.destory();
});

// fix:当ngModel被重置为空时清除选择项
$scope.$watch(() => {
return this.ngModel
}, newVal => {
if (!newVal) {
this.clearSelected(null);
}
})
}


Expand Down Expand Up @@ -77,7 +86,7 @@ class SelectController {

/**
* 没有填充好数据的组件,也能设置好
* 设置好数据的组件,就要匹配内容
* 设置好数据的组件,就要匹配内容
*/
if (this.dataArray && this.dataArray.length > 0) {
this.dataArray.map((group) => {
Expand Down Expand Up @@ -442,7 +451,7 @@ class SelectController {
}).then((data) => {
/**
* fix https://github.com/ffan-fe/fancyui/issues/43
if (!data || data.length == 0) {
this.ngModel = {};
}*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Upload/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ng-transclude>
</span>
<div class="f-upload-list f-upload-list-{{vm.listType}}" ng-if="vm.fileList.length">
<div ng-repeat="file in vm.fileList" class="f-upload-list-item f-upload-list-item-done">
<div ng-repeat="file in vm.fileList track by $index" class="f-upload-list-item f-upload-list-item-done">
<div class="f-upload-list-item-info" ng-if="vm.listType == 'picture'">
<a class="f-upload-list-item-thumbnail"
ng-href="{{file.url}}"
Expand Down

0 comments on commit f8510ec

Please sign in to comment.