NpCellGroup

A cell group that batch-renders NpCell via the options config, with optional group title.

Basic Usage

options supports a subset of np-cell props, see NpCellGroupOption below.

浏览器不支持,请手动复制 group.en.vue

Props

PropDescriptionTypeDefault
titleGroup titlestring-
optionsCell config listNpCellGroupOption[][]
typeControl type on the left'checkbox' | 'radio' | 'switch'-
sizeSize'small' | 'medium' | 'large'medium
borderedWhether to show dividersbooleanfalse

NpCellGroupOption

PropDescriptionTypeDefault
keyOption identifierstring | numbercurrent index
iconLeft iconVNode | () => VNode-
labelCell labelstring | VNode | () => VNode-
valueCell valuestring | VNode | () => VNode-
descriptionCell descriptionstring | VNode | () => VNode-
footerBottom contentVNode | () => VNode-
hoverWhether to enable hover state, falls back to the Cell config of NpConfigProvider when omittedboolean-
arrowWhether to show the right arrow, falls back to the Cell config of NpConfigProvider when omittedbooleanfalse (when no Cell config)
onClickClick callback() => void-

Events

EventDescriptionCallback
changeTriggered when the selection changes(keys: NpCellGroupKeys, item: NpCellGroupOption) => void
update:keysTriggered when the control state changes(keys: NpCellGroupKeys) => void

Global Defaults

Use NpConfigProvider to change the default size / bordered. Props passed to the component itself always win; when hover / arrow are not set on an option, they fall back to the Cell config of NpConfigProvider.

<np-config-provider
  :component-options="{ CellGroup: { size: 'small', bordered: true } }"
>
  <np-cell-group :options="options" />
</np-config-provider>