mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix method
This commit is contained in:
1 parent
84cf74cdfc
commit
66adfec365
2 files changed
+8
-17
No files matched your search
@@ -77,22 +77,13 @@ const genOption = (nodes, edges) => ({
|
||||
const {
|
||||
data: { completed, unlocked },
|
||||
} = params
|
||||
switch (completed !== unlocked) {
|
||||
case false: {
|
||||
// completed==unlocked, when completed or not yet unlocked
|
||||
if (completed) {
|
||||
return '#00ff00'
|
||||
}
|
||||
return '#454552'
|
||||
}
|
||||
case true: {
|
||||
// completed!=unlocked, only when unlocked but not completed
|
||||
return '#ADADB5'
|
||||
}
|
||||
default: {
|
||||
return '#454552'
|
||||
}
|
||||
if (completed) {
|
||||
return '#00ff00'
|
||||
}
|
||||
if (unlocked) {
|
||||
return '#ADADB5'
|
||||
}
|
||||
return '454552'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user