File tree Expand file tree Collapse file tree 2 files changed +4
-36
lines changed Expand file tree Collapse file tree 2 files changed +4
-36
lines changed Original file line number Diff line number Diff line change @@ -119,26 +119,12 @@ const App = {
119119
120120v-model
121121
122- * 修饰符:使用 (`_`) 代替 (`.`) (`vModel_trim={this.test}`)
122+ > 注意:如果想要使用 `arg`, 第二个参数需要为字符串
123123
124124```jsx
125- export default {
126- data: () => ({
127- test: ' Hello World' ,
128- }),
129- render() {
130- return (
131- <>
132- <input type="text" vModel_trim={this.test} />
133- {this.test}
134- </>
135- )
136- },
137- }
125+ <input vModel={val} />
138126```
139127
140- * 或者使用这种实现
141-
142128```jsx
143129<input vModel={[val, [' trim' ]]} />
144130```
@@ -174,8 +160,6 @@ const App = {
174160}
175161```
176162
177- > 注意:如果想要使用 `arg`, 第二个参数需要为字符串
178-
179163### 插槽
180164
181165```jsx
Original file line number Diff line number Diff line change @@ -120,26 +120,12 @@ const App = {
120120
121121v-model
122122
123- * You can use underscore (`_`) instead of dot (`.`) for modifiers (`vModel_trim={this.test}`)
123+ > Note: You should pass the second param as string for using `arg`.
124124
125125```jsx
126- export default {
127- data: () => ({
128- test: ' Hello World' ,
129- }),
130- render() {
131- return (
132- <>
133- <input type="text" vModel_trim={this.test} />
134- {this.test}
135- </>
136- )
137- },
138- }
126+ <input vModel={val} />
139127```
140128
141- * Or you can use this proposal.
142-
143129```jsx
144130<input vModel={[val, [' trim' ]]} />
145131```
@@ -175,8 +161,6 @@ const App = {
175161}
176162```
177163
178- > Note: You should pass the second param as string for using `arg`.
179-
180164### Slot
181165
182166```jsx
You can’t perform that action at this time.
0 commit comments