Skip to content

Commit

Permalink
升级angular到5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
laixiangran committed Apr 24, 2018
1 parent 2f098d9 commit cad9c25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"typings": "dist/index.d.ts",
"dependencies": {
"@types/bootstrap": "^3.3.33",
"@types/bootstrap-fileinput": "0.0.5",
"@types/jquery": "^2.0.45",
"bootstrap": "^3.3.7",
"bootstrap-fileinput": "^4.4.1",
Expand Down
18 changes: 9 additions & 9 deletions src/e-ngx-fileupload.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ENgxFileUploadDirective implements OnInit, OnDestroy {
}

ngOnInit() {
this.$el.fileinput($.extend(true, {}, this.defaultOpts, this.fileInputOpts));
this.$el['fileinput']($.extend(true, {}, this.defaultOpts, this.fileInputOpts));

this.ready.emit(this);

Expand Down Expand Up @@ -171,55 +171,55 @@ export class ENgxFileUploadDirective implements OnInit, OnDestroy {
* 禁用
*/
disable() {
this.$el.fileinput('disable');
this.$el['fileinput']('disable');
}

/**
* 启用
*/
enable() {
this.$el.fileinput('enable');
this.$el['fileinput']('enable');
}

/**
* 重置
*/
reset() {
this.$el.fileinput('reset');
this.$el['fileinput']('reset');
}

/**
* 刷新
*/
refresh() {
this.$el.fileinput('refresh');
this.$el['fileinput']('refresh');
}

/**
* 清空
*/
clear() {
this.$el.fileinput('clear');
this.$el['fileinput']('clear');
}

/**
* 销毁
*/
destroy() {
this.$el.fileinput('destroy');
this.$el['fileinput']('destroy');
}

/**
* 上传
*/
upload() {
this.$el.fileinput('upload');
this.$el['fileinput']('upload');
}

/**
* 取消上传
*/
cancel() {
this.$el.fileinput('cancel');
this.$el['fileinput']('cancel');
}
}

0 comments on commit cad9c25

Please sign in to comment.