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 = {
119
119
120
120
v-model
121
121
122
- * 修饰符:使用 (`_`) 代替 (`.`) (`vModel_trim={this.test}`)
122
+ > 注意:如果想要使用 `arg`, 第二个参数需要为字符串
123
123
124
124
```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} />
138
126
```
139
127
140
- * 或者使用这种实现
141
-
142
128
```jsx
143
129
<input vModel={[val, [' trim' ]]} />
144
130
```
@@ -174,8 +160,6 @@ const App = {
174
160
}
175
161
```
176
162
177
- > 注意:如果想要使用 `arg`, 第二个参数需要为字符串
178
-
179
163
### 插槽
180
164
181
165
```jsx
Original file line number Diff line number Diff line change @@ -120,26 +120,12 @@ const App = {
120
120
121
121
v-model
122
122
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`.
124
124
125
125
```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} />
139
127
```
140
128
141
- * Or you can use this proposal.
142
-
143
129
```jsx
144
130
<input vModel={[val, [' trim' ]]} />
145
131
```
@@ -175,8 +161,6 @@ const App = {
175
161
}
176
162
```
177
163
178
- > Note: You should pass the second param as string for using `arg`.
179
-
180
164
### Slot
181
165
182
166
```jsx
You can’t perform that action at this time.
0 commit comments