Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 2017 uplaod #74

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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