Async component

This commit is contained in:
2022-01-29 20:05:39 +03:00
parent d00d113c1e
commit d14551b213
2 changed files with 23 additions and 7 deletions

View File

@@ -17,9 +17,23 @@ $ npm install github:anatolykopyl/vue-three-d-mockup
/>
```
#### Use as an async component (the 3d model is quite large so this provides a significant performance boost):
```js
<script>
import Mockup from 'vue-tree-d-mockup'
import { defineAsyncComponent } from 'vue';
export default {
components: {
Mockup: defineAsyncComponent(() => import('vue-three-d-mockup')),
}
}
</script>
```
#### Or normally:
```js
<script>
import Mockup from 'vue-three-d-mockup';
export default {
components: {