一键导入
el-collapse
Collapse component for storing expandable content. Invoke when user needs to create accordion panels, FAQ sections, or collapsible content areas.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Collapse component for storing expandable content. Invoke when user needs to create accordion panels, FAQ sections, or collapsible content areas.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Element Plus Skills Library - A comprehensive skill library for AI agents to understand and utilize Element Plus UI components. Invoke when user needs to work with Element Plus components, theming, i18n, dark mode, or design specifications.
Affix component for fixing elements to a specific visible area. Invoke when user needs to create sticky navigation, fixed headers, or elements that remain visible while scrolling.
Alert component for displaying important alert messages. Invoke when user needs to show non-dismissible notifications, status messages, or important information that requires user attention.
Anchor component for anchor navigation. Invoke when user needs to create page anchor navigation, table of contents, or quick navigation to specific sections.
Autocomplete component for input suggestions. Invoke when user needs to provide input suggestions, autocomplete functionality, or search-as-you-type features.
Avatar component for representing people or objects with images, icons, or characters. Invoke when user needs to display user avatars, profile pictures, or entity representations.
| name | el-collapse |
| description | Collapse component for storing expandable content. Invoke when user needs to create accordion panels, FAQ sections, or collapsible content areas. |
| metadata | {"author":"jiaiyan","version":"1.0.0"} |
Collapse component stores content in expandable panels, supporting accordion mode and custom styling.
<template>
<el-collapse v-model="activeNames">
<el-collapse-item title="Consistency" name="1">
<div>Content of panel 1</div>
</el-collapse-item>
<el-collapse-item title="Feedback" name="2">
<div>Content of panel 2</div>
</el-collapse-item>
<el-collapse-item title="Efficiency" name="3">
<div>Content of panel 3</div>
</el-collapse-item>
</el-collapse>
</template>
<script setup>
import { ref } from 'vue'
const activeNames = ref(['1'])
</script>
<template>
<el-collapse v-model="activeName" accordion>
<el-collapse-item title="Panel 1" name="1">
<div>Content</div>
</el-collapse-item>
<el-collapse-item title="Panel 2" name="2">
<div>Content</div>
</el-collapse-item>
</el-collapse>
</template>
<script setup>
import { ref } from 'vue'
const activeName = ref('1')
</script>
<template>
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template #title>
<span>Custom Title</span>
<el-icon><InfoFilled /></el-icon>
</template>
<div>Content</div>
</el-collapse-item>
</el-collapse>
</template>
<template>
<el-collapse v-model="activeNames">
<el-collapse-item title="Panel" name="1" :icon="CaretRight">
<div>Content</div>
</el-collapse-item>
</el-collapse>
</template>
<script setup>
import { CaretRight } from '@element-plus/icons-vue'
</script>
<template>
<el-collapse v-model="activeNames" :before-collapse="beforeCollapse">
<el-collapse-item title="Panel" name="1">
<div>Content</div>
</el-collapse-item>
</el-collapse>
</template>
<script setup>
const beforeCollapse = () => {
return confirm('Are you sure you want to collapse?')
}
</script>
| Name | Description | Type | Default |
|---|---|---|---|
| model-value / v-model | Active panel(s) | string | array | [] |
| accordion | Enable accordion mode | boolean | false |
| expand-icon-position | Position of expand icon | 'left' | 'right' | 'right' |
| before-collapse | Hook before collapse | () => Promise<boolean> | boolean | — |
| Name | Description | Type |
|---|---|---|
| change | Triggers when active panels change | (activeNames: array | string) => void |
| Name | Description | Type |
|---|---|---|
| activeNames | Currently active panel names | ComputedRef<(string | number)[]> |
| setActiveNames | Set active panel names | (activeNames) => void |
| Name | Description | Type | Default |
|---|---|---|---|
| name | Unique identification | string | number | — |
| title | Title of the panel | string | '' |
| icon | Icon of the item | string | Component | ArrowRight |
| disabled | Disable the item | boolean | false |
| Name | Description | Type |
|---|---|---|
| default | Content of Collapse Item | — |
| title | Content of title | { isActive: boolean } |
| icon | Content of icon | { isActive: boolean } |
accordion mode for single-panel expansionbefore-collapse for confirmation dialogsexpand-icon-position