Skip to content

Commit

Permalink
fix: Better styling of auto rendering example
Browse files Browse the repository at this point in the history
  • Loading branch information
KadirBalku committed Mar 25, 2024
1 parent c6fc05f commit 34f8b0a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/utils/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ destroyStore(userList)
coming soon...

## Bone rendering
```js
::: code-group

```js:line-numbers [main.js]
// Global Configuration in main.js of your Vue.js application
import { createApp } from "vue";
Expand All @@ -61,8 +63,9 @@ app.component("Bone", bone);
app.component("Wrapper_nested", Wrapper_nested);
app.mount("#app");
```


```vue:line-numbers [MyComponent.vue]
// Example component for auto rendering
<template>
<div v-for="boneName in state.structure" :key="boneName">
Expand All @@ -80,7 +83,7 @@ app.mount("#app");
// implement a button for example if u want to edit data after rendering
<button @click="saveData">
...
Save
</button>
</template>
Expand All @@ -106,13 +109,15 @@ export default {
function saveData() {
// use formData to update data on ViUR server with 'Request.securePost()'.
...
// use your code here
}
onBeforeMount() {
// use Request to update state.skellist and state.structure
// Note: u can use component props instead and use the Request class in parent components
...
// use your code here
}
return{
Expand All @@ -125,4 +130,5 @@ export default {
}
</script>
```
```
:::

0 comments on commit 34f8b0a

Please sign in to comment.