提交 89db04ce 编写于 作者: J Jason

改用Drawer,更美观

上级 9a4b2605
import {Component, OnInit, ViewContainerRef} from '@angular/core';
import {ApiService} from '../../api.service';
import {ChannelEditComponent} from '../channel-edit/channel-edit.component';
import {NzModalService} from 'ng-zorro-antd';
import {NzDrawerService, NzModalService} from 'ng-zorro-antd';
@Component({
selector: 'app-channel',
......@@ -12,7 +12,7 @@ export class ChannelComponent implements OnInit {
channels: [];
constructor(private as: ApiService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) {
constructor(private as: ApiService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private drawerService: NzDrawerService) {
}
ngOnInit(): void {
......@@ -28,12 +28,12 @@ export class ChannelComponent implements OnInit {
}
create(): void {
this.modal.create({
this.drawerService.create({
nzTitle: '创建',
nzMaskClosable: false,
nzWidth: 720,
nzContent: ChannelEditComponent,
nzViewContainerRef: this.viewContainerRef,
nzGetContainer: () => document.body,
nzComponentParams: {
nzContentParams: {
channel: {}
}
});
......
......@@ -11,7 +11,7 @@ import {MainRoutingModule} from './main-routing.module';
import {MainComponent} from './main.component';
import {
NzButtonModule,
NzCheckboxModule, NzDividerModule,
NzCheckboxModule, NzDividerModule, NzDrawerModule,
NzFormModule,
NzIconModule,
NzInputModule,
......@@ -55,6 +55,7 @@ import {ChannelEditComponent} from './channel-edit/channel-edit.component';
NzPopconfirmModule,
IconsProviderModule,
NzDividerModule,
NzDrawerModule,
],
bootstrap: [MainComponent]
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册