This is an automated email from the ASF dual-hosted git repository. songjian pushed a commit to branch add_canvas_job_define in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel-web.git
The following commit(s) were added to refs/heads/add_canvas_job_define by this push: new dc4704fb [Fix][UI] Fix the problem that the fillet is reset after refreshing. dc4704fb is described below commit dc4704fb455080213f16b1022b100769c4c049f8 Author: songjianet <1778651...@qq.com> AuthorDate: Tue May 9 15:20:18 2023 +0800 [Fix][UI] Fix the problem that the fillet is reset after refreshing. --- seatunnel-ui/src/App.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/seatunnel-ui/src/App.tsx b/seatunnel-ui/src/App.tsx index 6ec016b3..0a006934 100644 --- a/seatunnel-ui/src/App.tsx +++ b/seatunnel-ui/src/App.tsx @@ -31,6 +31,7 @@ import { useI18n } from 'vue-i18n' import themeList from '@/themes' import type { GlobalThemeOverrides } from 'naive-ui' import type { Ref } from 'vue' +import type { CustomThemeCommonVars, ThemeCommonVars } from 'naive-ui/es/config-provider/src/interface' const App = defineComponent({ setup() { @@ -42,6 +43,12 @@ const App = defineComponent({ const themeOverrides: Ref<GlobalThemeOverrides> = ref( themeList[currentTheme.value ? 'dark' : 'light'] ) + const setBorderRadius = (v: number) => { + (themeOverrides.value.common as Partial<ThemeCommonVars & CustomThemeCommonVars>).borderRadius = + v + 'px' + } + + settingStore.getFilletValue && setBorderRadius(settingStore.getFilletValue) if (settingStore.getLocales) { const { locale } = useI18n() @@ -51,8 +58,7 @@ const App = defineComponent({ watch( () => settingStore.getFilletValue, () => { - ;(themeOverrides.value.common as any).borderRadius = - settingStore.getFilletValue + 'px' + setBorderRadius(settingStore.getFilletValue) } )