Skip to content

Commit

Permalink
docs(props): update comment content (vuejs-translations#956)
Browse files Browse the repository at this point in the history
* docs(props): update comment content

* Update src/guide/components/props.md

Co-authored-by: wxsm <wxsms@foxmail.com>

* Update props.md

---------

Co-authored-by: wxsm <wxsms@foxmail.com>
  • Loading branch information
Aaron-zon and wxsms authored Jul 10, 2024
1 parent b5407ff commit 5eebfe6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/guide/components/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ defineProps({
type: String,
required: true
},
// 必传但可为空的字符串
// 必传但可为 null 的字符串
propD: {
type: [String, null],
required: true
Expand Down Expand Up @@ -567,9 +567,9 @@ export default {

Vue 会通过 `instanceof Person` 来校验 `author` prop 的值是否是 `Person` 类的一个实例。

### 可为空的类型 {#nullable-type}
### 可为 null 的类型 {#nullable-type}

如果该类型是必传的但可为空,你可以用一个包含 `null` 的数组语法:
如果该类型是必传但可为 null,你可以用一个包含 `null` 的数组语法:

<div class="composition-api">

Expand Down

0 comments on commit 5eebfe6

Please sign in to comment.