File tree Expand file tree Collapse file tree 4 files changed +811
-406
lines changed
examples/simple-form/src/pages Expand file tree Collapse file tree 4 files changed +811
-406
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import Layout from '../layouts/Layout.astro';
4
4
5
5
const bind1 = Bind ({ bind: 1 , num: 1 });
6
6
const bind2 = Bind ({ bind: 2 , num: 2 });
7
+ const bind3 = Bind ({ bind: 3 , num: 3 });
8
+ const bind4 = Bind ({ bind: 4 , num: 0 });
7
9
8
10
function submit() {
9
11
this .extra .num ++ ;
@@ -20,9 +22,24 @@ function submit() {
20
22
21
23
<BindForm bind ={ bind2 } >
22
24
<BInput type =' int' name =' num' />
23
- <BButton onClick ={ submit } extra ={ bind2 } >
24
- Increase
25
- </BButton >
25
+ <BButton onClick ={ submit } extra ={ bind2 } > Increase </BButton >
26
26
</BindForm >
27
27
</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 >
28
45
</Layout >
You can’t perform that action at this time.
0 commit comments