improve v-model example

This commit is contained in:
Philipp Kühn
2020-11-13 15:30:09 +01:00
parent 2cf8137def
commit 5bccbacf32
4 changed files with 50 additions and 22 deletions

View File

@@ -82,7 +82,7 @@ export default {
computed: {
mainFile() {
const file = this.files
.find(item => item.path.endsWith('.vue') || item.path.endsWith('.jsx'))
.find(item => item.path.endsWith('index.vue') || item.path.endsWith('.jsx'))
if (!file) {
return
@@ -122,7 +122,7 @@ export default {
.filter(item => {
return ['vue', 'jsx', 'scss'].includes(item.extension)
})
.sortBy(item => item.path.split('/').length)
.sortBy(item => item.path.split('/').length && !item.path.endsWith('index.vue'))
.toArray()
},
}