Skip to content

Commit

Permalink
chore: add standalone components exports
Browse files Browse the repository at this point in the history
  • Loading branch information
dongliu committed Nov 14, 2024
1 parent 723c052 commit f5289f0
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/dialog/dialog.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ import { DialogService } from './dialog.service';
providers: [DialogService],
})
export class DialogModule {}

export const DIALOG_MODULE = [
DialogComponent,
DialogHeaderComponent,
DialogContentComponent,
DialogFooterComponent,
DialogCloseDirective,
] as const;
2 changes: 1 addition & 1 deletion src/drawer/component/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class DrawerComponent<
});
} else if (!visible.firstChange) {
// 不希望默认关闭时,drawer 渲染后就触发 close 事件
this.drawerRef.close();
this.drawerRef?.close();
}
}
this.drawerService.updateOptions(this);
Expand Down
7 changes: 7 additions & 0 deletions src/drawer/drawer.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ const COMMON = [
providers: [DrawerService],
})
export class DrawerModule {}

export const DRAWER_MODULE = [
DrawerComponent,
DrawerHeaderDirective,
DrawerContentDirective,
DrawerFooterDirective,
] as const;
11 changes: 11 additions & 0 deletions src/dropdown/dropdown.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ import { SubmenuComponent } from './submenu/submenu.component';
],
})
export class DropdownModule {}

export const DROPDOWN_MODULE = [
DropdownDirective,
DropdownActiveDirective,
DropdownButtonComponent,
MenuComponent,
MenuGroupComponent,
MenuGroupTitleDirective,
MenuItemComponent,
SubmenuComponent,
] as const;
6 changes: 6 additions & 0 deletions src/radio/radio.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ import { RadioComponent } from './radio.component';
exports: [RadioComponent, RadioGroupComponent, RadioButtonComponent],
})
export class RadioModule {}

export const RADIO_MODULE = [
RadioComponent,
RadioGroupComponent,
RadioButtonComponent,
] as const;
5 changes: 5 additions & 0 deletions src/time-picker/time-picker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ import { TimePickerPanelComponent } from './panel/panel.component';
exports: [TimePickerComponent, TimePickerPanelComponent],
})
export class TimePickerModule {}

export const TIME_PICKER_MODULE = [
TimePickerComponent,
TimePickerPanelComponent,
] as const;
6 changes: 6 additions & 0 deletions src/tooltip/tooltip.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ import { TooltipDirective } from './tooltip.directive';
exports: [TooltipDirective, TooltipActiveDirective, TooltipCopyDirective],
})
export class TooltipModule {}

export const TOOLTIP_MODULE = [
TooltipDirective,
TooltipActiveDirective,
TooltipCopyDirective,
] as const;

0 comments on commit f5289f0

Please sign in to comment.