This commit is contained in:
xuziqiang
2024-05-15 17:29:42 +08:00
commit d0155dbe3c
7296 changed files with 1832517 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import type { Component } from 'vue';
class FieldRegistry {
private static readonly _instance: FieldRegistry = new FieldRegistry();
private readonly _map: Map<string, Component>;
constructor() {
this._map = new Map<string, Component>();
}
push(compName: string, component: Component) {
this._map.set(compName, component);
}
static get instance() {
return this._instance;
}
get(compName: string) {
return this._map.get(compName);
}
get map() {
return this._map;
}
}
const fieldRegistry = FieldRegistry.instance;
export { fieldRegistry };