weifuwu 0.27.13 → 0.27.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs/ssr/ui.md
CHANGED
|
@@ -44,7 +44,7 @@ html`
|
|
|
44
44
|
### 1. State & Binding (`wu-data`)
|
|
45
45
|
|
|
46
46
|
```html
|
|
47
|
-
<div wu-data="
|
|
47
|
+
<div wu-data='{"count":0,"open":false,"name":"World"}'>
|
|
48
48
|
<button class="wu-btn" wu-on="click: count++">+1</button>
|
|
49
49
|
<span wu-text="count">0</span>
|
|
50
50
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'weifuwu'
|
|
1
|
+
import { html, raw } from 'weifuwu'
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
4
|
export default function (ctx: any) {
|
|
@@ -6,7 +6,7 @@ export default function (ctx: any) {
|
|
|
6
6
|
const theme = ctx.theme?.value || 'system'
|
|
7
7
|
const locale = ctx.i18n?.locale || 'en'
|
|
8
8
|
|
|
9
|
-
return html`<div wu-data="{ open: false }">
|
|
9
|
+
return html`<div wu-data="${raw(JSON.stringify({ open: false }))}">
|
|
10
10
|
<!-- Navbar -->
|
|
11
11
|
<nav class="wu-flex wu-items-center wu-justify-between wu-p-4 wu-border-bottom">
|
|
12
12
|
<strong class="wu-text-lg">weifuwu</strong>
|