Skip to content

Commit

Permalink
[components] 组件 AutoGrid 新增 columnCountisCollapsed 变量导出
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhang-Wei-666 committed Oct 23, 2024
1 parent 70b5f3c commit 07b3606
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]
- [@mixte/components] 组件 `AutoGrid` 新增 `fluid` 参数
- 🌟 [@mixte/components] 组件 `AutoGrid` 新增 `fluid` 参数
- 🌟 [@mixte/components] 组件 `AutoGrid` 新增 `columnCount` 变量导出, 标识每行可以渲染的子元素数量
- 🌟 [@mixte/components] 组件 `AutoGrid` 新增 `isCollapsed` 变量导出, 标识子元素是否折叠

## [v2.4.0], [v2.4.0-beta.3], [v2.4.0-beta.2], [v2.4.0-beta.1]
- 📅 2024-08-27
Expand Down
9 changes: 9 additions & 0 deletions packages/components/src/auto-grid/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,13 @@
</div>
);
}
defineExpose({
/** 每行可以渲染的子元素数量 */
columnCount: length,
/** 子元素是否折叠 */
isCollapsed: computed(() => {
return props.collapsed && children.value.length > collapsedRows.value * length.value;
}),
});
</script>

0 comments on commit 07b3606

Please sign in to comment.