mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
chore: v1.0.0-beta.4 changelog
This commit is contained in:
parent
f481fef240
commit
b817fa38af
@ -1,3 +1,9 @@
|
||||
## 1.0.0-beta.4
|
||||
|
||||
`2020-07-22`
|
||||
|
||||
- 🐞Properly force update on forwarded slots [#33](https://github.com/vueComponent/jsx/pull/33)
|
||||
|
||||
## 1.0.0-beta.3
|
||||
|
||||
`2020-07-15`
|
||||
|
@ -102,8 +102,6 @@ const App = () => (
|
||||
|
||||
### 指令
|
||||
|
||||
> 建议在 JSX 中使用驼峰 (`vModel`),但是 `v-model` 也能用
|
||||
|
||||
v-show
|
||||
|
||||
```jsx
|
||||
@ -112,7 +110,7 @@ const App = {
|
||||
return { visible: true };
|
||||
},
|
||||
render() {
|
||||
return <input vShow={this.visible} />;
|
||||
return <input v-show={this.visible} />;
|
||||
},
|
||||
};
|
||||
```
|
||||
@ -122,15 +120,15 @@ v-model
|
||||
> 注意:如果想要使用 `arg`, 第二个参数需要为字符串
|
||||
|
||||
```jsx
|
||||
<input vModel={val} />
|
||||
<input v-model={val} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<input vModel={[val, ['trim']]} />
|
||||
<input v-model={[val, ['trim']]} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<A vModel={[val, 'foo', ['bar']]} />
|
||||
<A v-model={[val, 'foo', ['bar']]} />
|
||||
```
|
||||
|
||||
会变编译成:
|
||||
@ -153,7 +151,7 @@ const App = {
|
||||
setup() {
|
||||
return () => (
|
||||
<a
|
||||
vCustom={[val, 'arg', ['a', 'b']]}
|
||||
v-custom={[val, 'arg', ['a', 'b']]}
|
||||
/>
|
||||
);
|
||||
},
|
||||
@ -169,7 +167,7 @@ const App = {
|
||||
a: () => <div>A</div>,
|
||||
b: () => <span>B</span>
|
||||
};
|
||||
return () => <A vSlots={slots} />;
|
||||
return () => <A v-slots={slots} />;
|
||||
}
|
||||
};
|
||||
```
|
||||
|
@ -101,8 +101,6 @@ const App = () => (
|
||||
|
||||
### Directives
|
||||
|
||||
> It is recommended to use camelCase version of it (`vModel`) in JSX, but you can use kebab-case too (`v-model`).
|
||||
|
||||
v-show
|
||||
|
||||
```jsx
|
||||
@ -111,7 +109,7 @@ const App = {
|
||||
return { visible: true };
|
||||
},
|
||||
render() {
|
||||
return <input vShow={this.visible} />;
|
||||
return <input v-show={this.visible} />;
|
||||
},
|
||||
};
|
||||
```
|
||||
@ -121,15 +119,15 @@ v-model
|
||||
> Note: You should pass the second param as string for using `arg`.
|
||||
|
||||
```jsx
|
||||
<input vModel={val} />
|
||||
<input v-model={val} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<input vModel={[val, ['trim']]} />
|
||||
<input v-model={[val, ['trim']]} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<A vModel={[val, 'foo', ['bar']]} />
|
||||
<A v-model={[val, 'foo', ['bar']]} />
|
||||
```
|
||||
|
||||
Will compile to:
|
||||
@ -152,7 +150,7 @@ const App = {
|
||||
setup() {
|
||||
return () => (
|
||||
<a
|
||||
vCustom={[val, 'arg', ['a', 'b']]}
|
||||
v-custom={[val, 'arg', ['a', 'b']]}
|
||||
/>
|
||||
);
|
||||
},
|
||||
@ -168,7 +166,7 @@ const App = {
|
||||
a: () => <div>A</div>,
|
||||
b: () => <span>B</span>
|
||||
};
|
||||
return () => <A vSlots={slots} />;
|
||||
return () => <A v-slots={slots} />;
|
||||
}
|
||||
};
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user