docs: update readme [ci skip]

This commit is contained in:
Amour1688
2021-09-30 07:18:36 +08:00
parent c3b7da5e92
commit cf7898bca7
2 changed files with 40 additions and 10 deletions

View File

@@ -134,7 +134,7 @@ const App = () => <input type="email" placeholder={placeholderText} />;
### 指令
v-show
#### v-show
```jsx
const App = {
@@ -147,7 +147,7 @@ const App = {
};
```
v-model
#### v-model
> 注意:如果想要使用 `arg`, 第二个参数需要为字符串
@@ -155,6 +155,10 @@ v-model
<input v-model={val} />
```
```jsx
<input v-model:argument={val} />
```
```jsx
<input v-model={[val, ["modifier"]]} />
```
@@ -175,7 +179,7 @@ h(A, {
});
```
v-models
#### v-models (从 1.1.0 开始不推荐使用)
> 注意: 你应该传递一个二维数组给 v-models。
@@ -220,6 +224,17 @@ h(A, {
自定义指令
只有 argument 的时候推荐使用
```jsx
const App = {
directives: { custom: customDirective },
setup() {
return () => <a v-custom:arg={val} />;
},
};
```
```jsx
const App = {
directives: { custom: customDirective },
@@ -284,7 +299,7 @@ const App = {
};
```
### 在 TypeSript 中使用
### 在 TypeScript 中使用
`tsconfig.json`: