Skip to content

Instantly share code, notes, and snippets.

@Kiruha01
Created November 10, 2020 12:04
Show Gist options
  • Save Kiruha01/3928c7970f3ee46f5e8203b048720485 to your computer and use it in GitHub Desktop.
Save Kiruha01/3928c7970f3ee46f5e8203b048720485 to your computer and use it in GitHub Desktop.
JSON: struct = [{"term": 1, "subjects": [
{"name": "...",
"lecturers": [
{"name": ..., id: ...} ...
]
]
...
}]
// main component:
<Term v-for="term in struct"
v-bind:name="term.term" v-bind:subjects=term.subjects />
// Term component
<COLLAPSE_ITEM name=name>
// your code for collapse item
<Subject v-for="subject in subjects"
v-bind:name="subject.name" v-bind:lecturers=subject.lecturers />
</COLLAPSE_ITEM>
.........
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment