
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@daflow-ui/ui-collapse
Advanced tools
基于 Ark UI Collapsible 封装的折叠面板组件,支持 v-model、手风琴模式、禁用状态与自定义标题。
pnpm add @daflow-ui/ui-collapse
全局引入样式(在 main.ts 中):
import '@daflow-ui/ui-collapse/style.css';
在组件中使用:
<script setup lang="ts">
import { ref } from 'vue';
import { DfCollapse, DfCollapseItem } from '@daflow-ui/ui-collapse';
const activeNames = ref(['1']);
</script>
<template>
<DfCollapse v-model="activeNames">
<DfCollapseItem name="1" title="一致性 Consistency">
与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念
</DfCollapseItem>
<DfCollapseItem name="2" title="反馈 Feedback">
控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作
</DfCollapseItem>
</DfCollapse>
</template>
<template>
<DfCollapse v-model="activeNames">
<DfCollapseItem name="1">
<template #title>
<span style="color: #409eff">自定义标题</span>
</template>
内容
</DfCollapseItem>
</DfCollapse>
</template>
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| modelValue | string | number | Array<string | number> | [] | 当前激活的面板,手风琴模式下为单个值 |
| accordion | boolean | false | 是否为手风琴模式(每次只能展开一个面板) |
| 事件 | 参数 | 说明 |
|---|---|---|
| update:modelValue | (value: CollapseModelValue) | v-model 更新事件 |
| change | (value: CollapseModelValue) | 当前激活面板改变时触发 |
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| name | string | number | - | 唯一标识符 |
| title | string | - | 面板标题 |
| disabled | boolean | false | 是否禁用该面板 |
| 插槽名 | 说明 |
|---|---|
| default | 面板内容 |
| title | 自定义标题 |
pnpm install
cd ../.. # 回到 monorepo 根目录
pnpm dev # 启动统一 playground,自动发现组件
组件会自动出现在 playground 导航中(通过 dev/index.vue)。
pnpm build
pnpm typecheck
pnpm lint
pnpm lint:fix
MIT
FAQs
Collapse component for DaFlow UI
The npm package @daflow-ui/ui-collapse receives a total of 7 weekly downloads. As such, @daflow-ui/ui-collapse popularity was classified as not popular.
We found that @daflow-ui/ui-collapse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.