File tree Expand file tree Collapse file tree 2 files changed +40
-4
lines changed
packages/babel-plugin-jsx Expand file tree Collapse file tree 2 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,24 @@ const App = defineComponent(() => {
71
71
});
72
72
```
73
73
74
+ ``` jsx
75
+ import { withModifiers } from ' vue' ;
76
+
77
+ const App = () => {
78
+ const count = ref (0 );
79
+
80
+ const inc = () => {
81
+ count .value ++ ;
82
+ };
83
+
84
+ return () => (
85
+ < div onClick= {withModifiers (inc, [' self' ])}>
86
+ {count .value }
87
+ < / div>
88
+ );
89
+ }
90
+ ```
91
+
74
92
Fragment
75
93
76
94
``` jsx
@@ -164,8 +182,8 @@ const App = {
164
182
const App = {
165
183
setup() {
166
184
const slots = {
167
- a : () => <div>A</div>,
168
- b : () => <span>B</span>
185
+ default : () => <div>A</div>,
186
+ foo : () => <span>B</span>
169
187
};
170
188
return () => <A v-slots={slots} />;
171
189
}
Original file line number Diff line number Diff line change @@ -70,6 +70,24 @@ const App = defineComponent(() => {
70
70
});
71
71
```
72
72
73
+ ``` jsx
74
+ import { withModifiers } from ' vue' ;
75
+
76
+ const App = () => {
77
+ const count = ref (0 );
78
+
79
+ const inc = () => {
80
+ count .value ++ ;
81
+ };
82
+
83
+ return () => (
84
+ < div onClick= {withModifiers (inc, [' self' ])}>
85
+ {count .value }
86
+ < / div>
87
+ );
88
+ }
89
+ ```
90
+
73
91
Fragment
74
92
75
93
``` jsx
@@ -163,8 +181,8 @@ const App = {
163
181
const App = {
164
182
setup() {
165
183
const slots = {
166
- a : () => <div>A</div>,
167
- b : () => <span>B</span>
184
+ default : () => <div>A</div>,
185
+ foo : () => <span>B</span>
168
186
};
169
187
return () => <A v-slots={slots} />;
170
188
}
You can’t perform that action at this time.
0 commit comments