forked from platypush/platypush
Snake case -> camel case for backend -> frontend entity types conversion
This commit is contained in:
parent
691d109fb7
commit
78dc8416fb
1 changed files with 7 additions and 2 deletions
|
@ -26,10 +26,15 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
if (this.type !== 'Entity')
|
||||
if (this.type !== 'Entity') {
|
||||
const type = this.type.split('_').map((t) =>
|
||||
t[0].toUpperCase() + t.slice(1)
|
||||
).join('')
|
||||
|
||||
this.component = defineAsyncComponent(
|
||||
() => import(`@/components/panels/Entities/${this.type}`)
|
||||
() => import(`@/components/panels/Entities/${type}`)
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue