diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e64dfa6581e4babd6135c3e059c4f70309331fb..4ec1da81f3afb838b24e821aee6693e21b868e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Added + +- 新增部件参数batchtoolbarmode、全局参数batchToolbarMode,用于设置批操作工具栏显示模式(default 选数据即显示,multiple 需选 2 条以上),仅限卡片、列表、表格、树表格使用 + ## [0.7.41-alpha.24] - 2025-09-04 ### Added diff --git a/src/control/data-view/data-view.scss b/src/control/data-view/data-view.scss index 243c33ae88f1608717d003ffa5582d514ac62ff8..8ffa0722fb6ea361117363304932577f563d06f8 100644 --- a/src/control/data-view/data-view.scss +++ b/src/control/data-view/data-view.scss @@ -107,8 +107,12 @@ $control-dataview-group-item-content: ( } @include e(batchtoolbar) { + display: none; padding: 0 getCssVar(spacing, base); margin: getCssVar(spacing, tight) getCssVar(spacing, super, tight); + @include when('show') { + display: block; + } } @include e(quicktoolbar) { diff --git a/src/control/data-view/data-view.tsx b/src/control/data-view/data-view.tsx index 71a1664541b5963b60a71ff75c27ffbcf66f1fb2..c73a2a9a5362df580ead9b623be4232d8a5b5735 100644 --- a/src/control/data-view/data-view.tsx +++ b/src/control/data-view/data-view.tsx @@ -631,7 +631,7 @@ export const DataViewControl = defineComponent({ }); if (!ctrlModel) return; return ( -
+
0), - ]} - > +
{ibiz.i18n.t('control.common.itemsSelected', { diff --git a/src/control/list/list.scss b/src/control/list/list.scss index 72dea665315ba67d8c000c2711260fbab4da638b..9324d85fbc8ab9833e6f85f5cc8824f19132a635 100644 --- a/src/control/list/list.scss +++ b/src/control/list/list.scss @@ -116,13 +116,19 @@ $control-list-group-style2: ( justify-content: center; width: 100%; } - - @include b(control-list-content) { - flex-grow: 1; - } + @include e(batchtoolbar) { + display: none; margin: getCssVar(spacing, tight) 0; + + @include when('show') { + display: block; + } + } + + @include b(control-list-content) { + flex-grow: 1; } } diff --git a/src/control/list/list.tsx b/src/control/list/list.tsx index be5b6ffd1c33234d4ace91dc37795fd9a2fd981e..bb163293ab741a8867c33d866356fbb5a0638de9 100644 --- a/src/control/list/list.tsx +++ b/src/control/list/list.tsx @@ -624,7 +624,7 @@ export const ListControl = defineComponent({ }); if (!ctrlModel) return; return ( -
+
0), - ]} - > +
{ibiz.i18n.t('control.common.itemsSelected', {