From cf6a196cc72b80759aedefd6386d4ed099920882 Mon Sep 17 00:00:00 2001 From: hisoka0728 <1399952343@qq.com> Date: Tue, 2 Jul 2024 21:10:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E8=AF=86=E5=88=AB=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8FenableTitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/action-toolbar/action-toolbar.tsx | 2 +- src/common/custom-theme/custom-theme.tsx | 10 +++++++--- src/common/data-import2/data-import2.tsx | 13 ++++++++----- src/control/context-menu/context-menu.tsx | 6 ++++-- .../custom-dashboard-container.tsx | 10 +++++++--- .../form/form-detail/form-button/form-button.tsx | 2 +- src/control/search-bar/search-bar.tsx | 12 ++++++++++-- src/control/toolbar/export-excel/export-excel.tsx | 4 ++-- .../toolbar/short-cut-button/short-cut-button.tsx | 9 ++++++--- src/control/toolbar/toolbar.tsx | 4 ++-- .../ibiz-searchcond-edit/ibiz-searchcond-edit.tsx | 2 +- src/panel-component/panel-button/panel-button.tsx | 2 +- 12 files changed, 50 insertions(+), 26 deletions(-) diff --git a/src/common/action-toolbar/action-toolbar.tsx b/src/common/action-toolbar/action-toolbar.tsx index 7c748e88..2804925b 100644 --- a/src/common/action-toolbar/action-toolbar.tsx +++ b/src/common/action-toolbar/action-toolbar.tsx @@ -142,7 +142,7 @@ export const IBizActionToolbar = defineComponent({ onClick={(e: MouseEvent): Promise => this.handleClick(detail, e) } - title={detail.tooltip} + title={!ibiz.env.enableTitle ? detail.tooltip : undefined} disabled={this.actionsState[detail.id!].disabled} class={this.calcActionItemClass(detail)} > diff --git a/src/common/custom-theme/custom-theme.tsx b/src/common/custom-theme/custom-theme.tsx index 6fb07e25..f08cdc06 100644 --- a/src/common/custom-theme/custom-theme.tsx +++ b/src/common/custom-theme/custom-theme.tsx @@ -163,9 +163,13 @@ export const CustomTheme = defineComponent({ return ( { handleThemeChange(item.codeName); }} diff --git a/src/common/data-import2/data-import2.tsx b/src/common/data-import2/data-import2.tsx index b87babb0..dbe61964 100644 --- a/src/common/data-import2/data-import2.tsx +++ b/src/common/data-import2/data-import2.tsx @@ -572,11 +572,14 @@ export const DataImport2 = defineComponent({ onClick={this.onButtonImportClick} disabled={!this.selectValues.join('')} title={ - !this.selectValues.join('') - ? ibiz.i18n.t( - 'component.dataImport2.selectProperties', - ) - : '' + // eslint-disable-next-line no-nested-ternary + !ibiz.env.enableTitle + ? !this.selectValues.join('') + ? ibiz.i18n.t( + 'component.dataImport2.selectProperties', + ) + : '' + : undefined } > {ibiz.i18n.t('component.dataImport2.import')} diff --git a/src/control/context-menu/context-menu.tsx b/src/control/context-menu/context-menu.tsx index 4b95397e..5fb8147c 100644 --- a/src/control/context-menu/context-menu.tsx +++ b/src/control/context-menu/context-menu.tsx @@ -194,7 +194,7 @@ export const ContextMenuControl = defineComponent({ onClick={(e: MouseEvent): Promise => this.handleClick(detail, e) } - title={detail.tooltip} + title={!ibiz.env.enableTitle ? detail.tooltip : undefined} disabled={this.c.state.buttonsState[detail.id!].disabled} class={this.calcActionItemClass(detail)} > @@ -234,7 +234,9 @@ export const ContextMenuControl = defineComponent({ onClick={(e: MouseEvent): Promise => this.handleClick(detail, e) } - title={detail.tooltip} + title={ + !ibiz.env.forbiddenTitle ? detail.tooltip : undefined + } disabled={this.c.state.buttonsState[detail.id!].disabled} class={this.calcActionItemClass(detail)} > diff --git a/src/control/dashboard/custom-dashboard-container/custom-dashboard-container.tsx b/src/control/dashboard/custom-dashboard-container/custom-dashboard-container.tsx index d425a498..1538514e 100644 --- a/src/control/dashboard/custom-dashboard-container/custom-dashboard-container.tsx +++ b/src/control/dashboard/custom-dashboard-container/custom-dashboard-container.tsx @@ -172,9 +172,13 @@ export const CustomDashboardContainer = defineComponent({
diff --git a/src/control/form/form-detail/form-button/form-button.tsx b/src/control/form/form-detail/form-button/form-button.tsx index 1cc788e7..f6ef99b6 100644 --- a/src/control/form/form-detail/form-button/form-button.tsx +++ b/src/control/form/form-detail/form-button/form-button.tsx @@ -49,7 +49,7 @@ export const FormButton = defineComponent({ onClick={this.controller.onClick.bind(this.controller)} loading={this.controller.state.loading} disabled={this.controller.state.disabled} - title={this.modelData.tooltip} + title={!ibiz.env.enableTitle ? this.modelData.tooltip : undefined} >
@@ -211,7 +215,11 @@ export const SearchBarControl = defineComponent({ this.triggerFilter()} > diff --git a/src/control/toolbar/export-excel/export-excel.tsx b/src/control/toolbar/export-excel/export-excel.tsx index 95814c90..277f78e6 100644 --- a/src/control/toolbar/export-excel/export-excel.tsx +++ b/src/control/toolbar/export-excel/export-excel.tsx @@ -55,7 +55,7 @@ export const IBizExportExcel = defineComponent({ title: () => { return ( @@ -153,7 +153,7 @@ export const IBizExportExcel = defineComponent({ default: (): VNode => { return ( diff --git a/src/control/toolbar/short-cut-button/short-cut-button.tsx b/src/control/toolbar/short-cut-button/short-cut-button.tsx index eb280fb9..0ee0fa4d 100644 --- a/src/control/toolbar/short-cut-button/short-cut-button.tsx +++ b/src/control/toolbar/short-cut-button/short-cut-button.tsx @@ -48,9 +48,12 @@ export const IBizShortCutButton = defineComponent({
=> handleClick(button, e)} > @@ -315,7 +315,7 @@ export const ToolbarControl = defineComponent({ ]} > this.triggerFilter()} > diff --git a/src/panel-component/panel-button/panel-button.tsx b/src/panel-component/panel-button/panel-button.tsx index be8930b0..ab42e414 100644 --- a/src/panel-component/panel-button/panel-button.tsx +++ b/src/panel-component/panel-button/panel-button.tsx @@ -115,7 +115,7 @@ export const PanelButton = defineComponent({ Date: Tue, 2 Jul 2024 22:33:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E8=AF=86=E5=88=AB=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8FenableTitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web-app/attach-environment-config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/web-app/attach-environment-config.ts b/src/web-app/attach-environment-config.ts index c5a4d28b..ade62138 100644 --- a/src/web-app/attach-environment-config.ts +++ b/src/web-app/attach-environment-config.ts @@ -6,6 +6,7 @@ const envMap = new Map([ ['remoteModelUrl', 'remoteDynaPath'], ['dcSystem', 'mockDcSystemId'], ['enablePermission', 'enablePermissionValid'], + ['enableTitle', 'enableTitle'], ]); export async function attachEnvironmentConfig(): Promise { -- Gitee