ArtifactsPane 发布按钮文案摊平嵌套三元
- publishLabel 改为 if/else 三态赋值,去掉「正在发布/更新/首次发布」的嵌套三元 - 行为不变,仅满足项目禁止嵌套三元的约定
This commit is contained in:
+6
-5
@@ -121,11 +121,12 @@ export function ArtifactsPane({
|
||||
onlineState !== 'ready' ||
|
||||
online?.nextVersionNumber == null;
|
||||
|
||||
const publishLabel = publish.publishing
|
||||
? '正在发布…'
|
||||
: online?.state === 'update'
|
||||
? '更新游戏'
|
||||
: '打包并发布';
|
||||
let publishLabel = '打包并发布';
|
||||
if (publish.publishing) {
|
||||
publishLabel = '正在发布…';
|
||||
} else if (online?.state === 'update') {
|
||||
publishLabel = '更新游戏';
|
||||
}
|
||||
|
||||
/**
|
||||
* 左半顶部槽位:整张表单 / 一行读取中 / 读失败时一行自动重试兜底 + 「重试读取」。四种形状差得
|
||||
|
||||
Reference in New Issue
Block a user