Skip to content

Commit 14fc054

Browse files
committed
修复 aside 默认关闭模式逻辑
1 parent 8b46431 commit 14fc054

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

packages/pure/components/user/Aside.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface Props {
3939
const { type = 'note', icon, open: openProp, style = 'solid', showTypeBadge = true } = Astro.props
4040
let { title } = Astro.props
4141
42-
const isCollapsible = openProp !== undefined && openProp !== false
42+
const isCollapsible = openProp !== undefined
4343
4444
if (!asideVariants.includes(type)) {
4545
throw new AstroError(

src/content/blog/test/test_aside.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,36 +200,38 @@ import { MdxRepl } from 'astro-pure/user'
200200
</Fragment>
201201
</MdxRepl>
202202

203-
#### 2.3.2. 仅图标
203+
#### 2.3.2. 无标题仅徽章
204204
<MdxRepl>
205-
<Aside type='tip' showTypeBadge={false} title='仅图标' style='card'>
205+
<Aside type='tip' showTypeBadge={true} style='card'>
206206
这也是可能的。
207207
</Aside>
208208

209209
<Fragment slot='desc'>
210210
````mdx
211-
<Aside type='tip' showTypeBadge={false} title='仅图标' style='card'>
211+
<Aside type='tip' showTypeBadge={true} style='card'>
212212
这也是可能的。
213213
</Aside>
214214
````
215215
</Fragment>
216216
</MdxRepl>
217217

218-
#### 2.3.3. 无徽章卡片
218+
219+
#### 2.3.2. 无标题无徽章
219220
<MdxRepl>
220-
<Aside type='note' style='card' title='无徽章卡片'>
221-
此卡片没有默认类型徽章,只有一个自定义标题
221+
<Aside type='tip' showTypeBadge={false} style='card'>
222+
这也是可能的
222223
</Aside>
223224

224225
<Fragment slot='desc'>
225226
````mdx
226-
<Aside type='note' style='card' title='无徽章卡片'>
227-
此卡片没有默认类型徽章,只有一个自定义标题
227+
<Aside type='tip' showTypeBadge={false} style='card'>
228+
这也是可能的
228229
</Aside>
229230
````
230231
</Fragment>
231232
</MdxRepl>
232233

234+
233235
### 2.4. 嵌套 Aside (Nested Asides)
234236
<MdxRepl>
235237
<Aside type='important' title='外部 Aside' style='card'>

0 commit comments

Comments
 (0)