File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,6 +213,25 @@ export default {
213213 })
214214 const childFiles = response?.data?.ocs?.data?.data || []
215215 this.document.files = Array.isArray(childFiles) ? childFiles : []
216+
217+ const allVisibleElements = this.aggregateVisibleElementsByFiles(this.document.files)
218+ if (allVisibleElements.length > 0) {
219+ this.document.visibleElements = allVisibleElements
220+ }
221+ },
222+ aggregateVisibleElementsByFiles(files) {
223+ if (!Array.isArray(files) || files.length === 0) {
224+ return []
225+ }
226+
227+ const allVisibleElements = []
228+ files.forEach(file => {
229+ if (Array.isArray(file?.visibleElements)) {
230+ allVisibleElements.push(...file.visibleElements)
231+ }
232+ })
233+
234+ return allVisibleElements
216235 },
217236 buildFilePagesMap() {
218237 this.filePagesMap = {}
You can’t perform that action at this time.
0 commit comments