mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #5785 - for OrderList PickList
This commit is contained in:
parent
61b1c592bf
commit
76fc9f54ec
4 changed files with 45 additions and 4 deletions
21
components/lib/picklist/PickList.d.ts
vendored
21
components/lib/picklist/PickList.d.ts
vendored
|
@ -438,6 +438,7 @@ export interface PickListSlots {
|
|||
*/
|
||||
header(): VNode[];
|
||||
/**
|
||||
* @deprecated since v4.0. Use option slot instead.
|
||||
* Custom item template.
|
||||
* @param {Object} scope - item slot's params.
|
||||
*/
|
||||
|
@ -451,7 +452,25 @@ export interface PickListSlots {
|
|||
*/
|
||||
selected: boolean;
|
||||
/**
|
||||
* Index of the item
|
||||
* Index of the item.
|
||||
*/
|
||||
index: number;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom option template.
|
||||
* @param {Object} scope - option slot's params.
|
||||
*/
|
||||
option(scope: {
|
||||
/**
|
||||
* Option of the component
|
||||
*/
|
||||
option: any;
|
||||
/**
|
||||
* Selection state
|
||||
*/
|
||||
selected: boolean;
|
||||
/**
|
||||
* Index of the option.
|
||||
*/
|
||||
index: number;
|
||||
}): VNode[];
|
||||
|
|
|
@ -60,8 +60,9 @@
|
|||
<slot name="sourceheader"></slot>
|
||||
</template>
|
||||
<template #option="{ option, selected, index }">
|
||||
<slot name="item" :item="option" :selected="selected" :index="index" />
|
||||
<slot :name="$slots.option ? 'option' : 'item'" :item="option" :option="option" :selected="selected" :index="index" />
|
||||
</template>
|
||||
<!-- //TODO: item slot deprecated since v4.0. Use option slot. -->
|
||||
</Listbox>
|
||||
</div>
|
||||
<div :class="cx('transferControls')" v-bind="ptm('transferControls')" data-pc-group-section="controls">
|
||||
|
@ -124,8 +125,9 @@
|
|||
<slot name="targetheader"></slot>
|
||||
</template>
|
||||
<template #option="{ option, selected, index }">
|
||||
<slot name="item" :item="option" :selected="selected" :index="index" />
|
||||
<slot :name="$slots.option ? 'option' : 'item'" :item="option" :option="option" :selected="selected" :index="index" />
|
||||
</template>
|
||||
<!-- //TODO: item slot deprecated since v4.0. Use option slot. -->
|
||||
</Listbox>
|
||||
</div>
|
||||
<div v-if="showTargetControls" :class="cx('targetControls')" v-bind="ptm('targetControls')" data-pc-group-section="controls">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue