feat: improve code

This commit is contained in:
gchust 2025-06-29 10:59:52 +08:00
parent 661f341a4e
commit 2a22cf4afc

View File

@ -96,7 +96,7 @@ export class DataSource {
} }
get displayName() { get displayName() {
return this.options.displayName ? this.flowEngine?.translate(this.options.displayName) : this.key; return this.options.displayName ? this.flowEngine.translate(this.options.displayName) : this.key;
} }
get key() { get key() {
@ -272,7 +272,7 @@ export class Collection {
} }
get title() { get title() {
return this.options.title ? this.flowEngine?.translate(this.options.title) : this.name; return this.options.title ? this.flowEngine.translate(this.options.title) : this.name;
} }
initInherits() { initInherits() {
@ -413,7 +413,7 @@ export class CollectionField {
get title() { get title() {
const titleValue = this.options?.title || this.options?.uiSchema?.title || this.options.name; const titleValue = this.options?.title || this.options?.uiSchema?.title || this.options.name;
return this.flowEngine?.translate(titleValue); return this.flowEngine.translate(titleValue);
} }
set title(value: string) { set title(value: string) {