Skip to content

Commit 8741184

Browse files
committed
fix(astro): first render bug
1 parent 919abff commit 8741184

File tree

4 files changed

+811
-406
lines changed

4 files changed

+811
-406
lines changed

examples/simple-form/src/pages/multi-forms.astro

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Layout from '../layouts/Layout.astro';
44
55
const bind1 = Bind({ bind: 1, num: 1 });
66
const bind2 = Bind({ bind: 2, num: 2 });
7+
const bind3 = Bind({ bind: 3, num: 3 });
8+
const bind4 = Bind({ bind: 4, num: 0 });
79
810
function submit() {
911
this.extra.num++;
@@ -20,9 +22,24 @@ function submit() {
2022

2123
<BindForm bind={bind2}>
2224
<BInput type='int' name='num' />
23-
<BButton onClick={submit} extra={bind2}>
24-
Increase
25-
</BButton>
25+
<BButton onClick={submit} extra={bind2}> Increase </BButton>
2626
</BindForm>
2727
</BindForm>
28+
29+
<BindForm bind={bind3}>
30+
<BInput type='int' name='num' />
31+
<BButton onClick={submit} extra={bind3}> Increase </BButton>
32+
</BindForm>
33+
34+
<BindForm bind={bind4}>
35+
<BInput type='int' name='num' />
36+
37+
{
38+
bind4.num > 3 ? null : (
39+
<BButton onClick={submit} extra={bind4}>
40+
Increase
41+
</BButton>
42+
)
43+
}
44+
</BindForm>
2845
</Layout>

0 commit comments

Comments
 (0)