本文整理汇总了TypeScript中ng-zorro-antd.NzMessageService.success方法的典型用法代码示例。如果您正苦于以下问题:TypeScript NzMessageService.success方法的具体用法?TypeScript NzMessageService.success怎么用?TypeScript NzMessageService.success使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ng-zorro-antd.NzMessageService
的用法示例。
在下文中一共展示了NzMessageService.success方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: handleChange
// tslint:disable-next-line:typedef
handleChange({ file, fileList }): void {
const status = file.status;
if (status !== 'uploading') {
console.log(file, fileList);
}
if (status === 'done') {
this.msg.success(`${file.name} file uploaded successfully.`);
} else if (status === 'error') {
this.msg.error(`${file.name} file upload failed.`);
}
}
示例2: setTimeout
this.identity.logout().then(res => {
if (res.Type == AjaxResultType.Success) {
this.msgSrv.success("用户退出成功");
let url = this.router.url;
if (url.startsWith("/admin/")) {
url = "/home";
}
setTimeout(() => {
this.router.navigateByUrl(url);
}, 100);
return;
}
this.msgSrv.error(`用户登出失败:${res.Content}`);
});
示例3:
onOk: () => {
localStorage.clear();
this.messageServ.success('Clear Finished!');
}
示例4: copy
copy(value).then(() => this.msg.success(this.i18n.fanyi('app.demo.copied')));
示例5: _clear
_clear() {
localStorage.clear();
this.messageServ.success('清空完成!');
}
示例6: success
public success(message: string) {
this.service.success(message);
}