Skip to content

Commit d86f8b2

Browse files
committed
更新 README.md
1 parent 5a76e8b commit d86f8b2

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

README.en.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ Automatic Rendering: Automatically reloads when data changes are detected.
459459
const app = new QUI({
460460
id: "app",
461461
data: {
462-
now: $Math.floor(Date.now() / 1000)
462+
now: Math.floor(Date.now() / 1000)
463463
}
464464
});
465465
</script>
@@ -500,6 +500,42 @@ Automatic Rendering: Automatically reloads when data changes are detected.
500500
501501
</details>
502502
503+
<details>
504+
<summary>Model Render</summary>
505+
506+
- index.html
507+
```HTML
508+
<body id="app"></body>
509+
<script>
510+
const test = new QUI({
511+
id: "app",
512+
data: {
513+
hint: "hint 123",
514+
title: "test 123"
515+
},
516+
render: () => {
517+
return `
518+
"{{ hint }}",
519+
h1 {
520+
style: "background: red;",
521+
children: [
522+
"{{ title }}"
523+
]
524+
}`
525+
}
526+
})
527+
</script>
528+
```
529+
- Result
530+
```HTML
531+
<body id="app">
532+
hint 123
533+
<h1 style="background: red;">test 123</h1>
534+
</body>
535+
```
536+
537+
</details>
538+
503539
<details>
504540
<summary>Lifecycle Hooks</summary>
505541

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533
hint 123
534534
<h1 style="background: red;">test 123</h1>
535535
</body>
536-
```
536+
```
537537
538538
</details>
539539

0 commit comments

Comments
 (0)