Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(projects): multi language buttons support hiding. #677

Closed
wants to merge 2 commits into from

Conversation

Azir-11
Copy link
Member

@Azir-11 Azir-11 commented Dec 1, 2024

支持隐藏多语言按钮

@honghuangdc
Copy link
Member

新增的属性multilingual配置成可选的,不然现有生产环境的配置读取themeStore.header.multilingual.visible 会报错的

@Azir-11
Copy link
Member Author

Azir-11 commented Dec 3, 2024

改成可选的感觉怪怪的,是不是在initThemeSettings这个方法里用themeSettings作为基底,再根据themeSettings和本地储存的配置去做合并和覆盖配置好一点?

@honghuangdc
Copy link
Member

改成可选的感觉怪怪的,是不是在initThemeSettings这个方法里用themeSettings作为基底,再根据themeSettings和本地储存的配置去做合并和覆盖配置好一点?

这样也可以

@Azir-11 Azir-11 requested a review from honghuangdc December 3, 2024 08:35
@Azir-11
Copy link
Member Author

Azir-11 commented Dec 5, 2024

@honghuangdc defu这个库好像不太满足合并需求,写这个合并主要是为了去除掉localSettings里面的过时内容,比如v1.0版本我在本地储存有个key叫darkMode的配置,后面换成了theme,那么如果单纯的合并就会导致这些过时的key一直存在,defu库默认和lodash的merge其实是一样的,都是纯合并,无法排除,包括使用createDefu或是defuFn都无法同时拿到两个对象去做比较再决定是否合并,所以综合来看好像这个commit就不用再修改了

@honghuangdc
Copy link
Member

@honghuangdc defu这个库好像不太满足合并需求,写这个合并主要是为了去除掉localSettings里面的过时内容,比如v1.0版本我在本地储存有个key叫darkMode的配置,后面换成了theme,那么如果单纯的合并就会导致这些过时的key一直存在,defu库默认和lodash的merge其实是一样的,都是纯合并,无法排除,包括使用createDefu或是defuFn都无法同时拿到两个对象去做比较再决定是否合并,所以综合来看好像这个commit就不用再修改了

不用考虑字段变更的问题,就是直接合并两个相同对象

@Azir-11 Azir-11 closed this Dec 16, 2024
@honghuangdc
Copy link
Member

101b6f9

@Azir-11
Copy link
Member Author

Azir-11 commented Dec 16, 2024

101b6f9

靠,想今晚写的

@Azir-11
Copy link
Member Author

Azir-11 commented Dec 16, 2024

隐藏多语言那个不许跟我抢!
31d8b0d68cea0256b7abb35526649dd0

@honghuangdc
Copy link
Member

我发个新版本,就把这个顺手搞了😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants