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

fix mod configuration title show wrong selector #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/pages/Mod/component/modConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ const OptionSelect = ({mod, root, setRoot, defaultValues, defaultValuesMap, setD
.map((item) =>
// eslint-disable-next-line react/jsx-key
{
// 例如2928810007,2334209327都是这样的,options只有一个,而且就只是默认值,并且该项的description没有内容
if (item.options.length === 1 && item.options[0].data === item.default && !item.options[0].description) {
/* 在DST中,如果label为空字符串,就直接是显示空白行,这里用||会导致label为空也显示name,为了跟DST保持一样使用了??
↓ */
return <Divider key={item.label}><span style={{fontSize: "14px", fontWeight: "600"}}>{item.label ?? item.name}</span></Divider>
}
// TODO 还不知道哪些mod是这样的作为标题的,我目前没有发现
if (item.name === 'Title' || item.name === '') {
if (item.label === '') {
return ""
Expand Down