docs(collapse): default expand demo

This commit is contained in:
07akioni 2021-08-17 00:39:36 +08:00
parent e9f5971526
commit 24b06a8aab
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
# Default Expanded
You can set which panels are expanded by default. For example, we can set `red light` and `amber light` to be expanded by default, and set `flashing` to be expanded when `green light` is expanded. It should be noted that even if only one panel you want to set to be expanded, `default-expanded-names` should also be passed in an array, unless `accordion` is set to `true`.
You can set which panels are expanded by default. For example, we can set 'red light' and 'amber light' to be expanded by default.
It should be noted that even if only one panel you want to set to be expanded, `default-expanded-names` should also be passed in an array, unless `accordion` is set to `true`.
```html
<n-collapse :default-expanded-names="['2', '3']">

View File

@ -1,6 +1,8 @@
# 默认展开
可以设置哪些面板默认展开。如我们可以设置`红灯`和`黄灯`默认展开,当`绿灯`展开时`闪烁`展开。应当注意的是,即使只打算展开一个面板,`default-expanded-names`也应当传入数组,除非使用了`accordion`。
可以设置哪些面板默认展开。如我们可以设置“红灯”和“黄灯”默认展开。
应当注意的是,即使只打算展开一个面板,`default-expanded-names`也应当传入数组,除非使用了`accordion`。
```html
<n-collapse :default-expanded-names="['2', '3']">