snapshot of https://github.com/dream-num/univer.git (dev, 2026-09-16; blobs > 131072B omitted)
Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
This commit is contained in:
44
common/debugger/src/controllers/components.controller.ts
Normal file
44
common/debugger/src/controllers/components.controller.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Disposable, Inject } from '@univerjs/core';
|
||||
import { ComponentManager } from '@univerjs/ui';
|
||||
import { AIButton, FloatButton } from '../components/FloatButton';
|
||||
import { ImageDemo } from '../components/Image';
|
||||
import { RangeLoading } from '../components/RangeLoading';
|
||||
// @ts-ignore
|
||||
// import VueComponent from '../components/VueComponent.vue';
|
||||
// import { CounterComponent } from '../components/WebComponent';
|
||||
import { WatermarkPanel } from '../views/watermark/WatermarkPanel';
|
||||
import { WatermarkPanelFooter } from '../views/watermark/WatermarkPanelFooter';
|
||||
|
||||
export const WATERMARK_PANEL = 'WATERMARK_PANEL';
|
||||
export const WATERMARK_PANEL_FOOTER = 'WATERMARK_PANEL_FOOTER';
|
||||
|
||||
export class ComponentsController extends Disposable {
|
||||
constructor(
|
||||
@Inject(ComponentManager) private readonly _componentManager: ComponentManager
|
||||
) {
|
||||
super();
|
||||
|
||||
this._registerComponents();
|
||||
}
|
||||
|
||||
private _registerComponents(): void {
|
||||
([
|
||||
['ImageDemo', ImageDemo],
|
||||
['RangeLoading', RangeLoading],
|
||||
['FloatButton', FloatButton],
|
||||
['AIButton', AIButton],
|
||||
[WATERMARK_PANEL, WatermarkPanel],
|
||||
[WATERMARK_PANEL_FOOTER, WatermarkPanelFooter],
|
||||
] as const).forEach(([key, component]) => {
|
||||
this.disposeWithMe(this._componentManager.register(key, component));
|
||||
});
|
||||
|
||||
// this.disposeWithMe(this._componentManager.register('VueComponent', VueComponent, {
|
||||
// framework: 'vue3',
|
||||
// }));
|
||||
|
||||
// this.disposeWithMe(this._componentManager.register('counter-component', CounterComponent, {
|
||||
// framework: 'web-component',
|
||||
// }));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user