feat(PublicPage): add schedule parts system for page with a lot of schedule (dense schedule)
This commit is contained in:
parent
61a9a703e9
commit
ebd725b0d3
3 changed files with 77 additions and 44 deletions
|
|
@ -237,6 +237,17 @@ export default class PublicController {
|
|||
})
|
||||
}
|
||||
|
||||
if (version.schedule.length > 8) {
|
||||
let isFirst = true;
|
||||
version.scheduleParts = [[], []]
|
||||
version.schedule.forEach((schedule: any) => {
|
||||
version.scheduleParts[isFirst ? 0 : 1].push(schedule)
|
||||
isFirst = !isFirst
|
||||
})
|
||||
} else {
|
||||
version.scheduleParts = [version.schedule]
|
||||
}
|
||||
|
||||
version.cutDescription = Utils.isStrUsable(version, 'descriptionLong') && version.descriptionLong.length > 800
|
||||
|
||||
// if (version.cutDescription) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue