diff --git a/components/lib/orderlist/OrderList.d.ts b/components/lib/orderlist/OrderList.d.ts index 8a04b0660..8d1fe5645 100755 --- a/components/lib/orderlist/OrderList.d.ts +++ b/components/lib/orderlist/OrderList.d.ts @@ -291,6 +291,7 @@ export interface OrderListSlots { */ header(): VNode[]; /** + * @deprecated since v4.0. Use option slot instead. * Custom item template. * @param {Object} scope - item slot's params. */ @@ -308,6 +309,24 @@ export interface OrderListSlots { */ 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[]; /** * Custom controls start template. */ diff --git a/components/lib/orderlist/OrderList.vue b/components/lib/orderlist/OrderList.vue index 9da0c5870..e93b9a351 100755 --- a/components/lib/orderlist/OrderList.vue +++ b/components/lib/orderlist/OrderList.vue @@ -59,8 +59,9 @@ + diff --git a/components/lib/picklist/PickList.d.ts b/components/lib/picklist/PickList.d.ts index 9090669e9..a9128532f 100755 --- a/components/lib/picklist/PickList.d.ts +++ b/components/lib/picklist/PickList.d.ts @@ -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[]; diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index 55146f75f..c4ad044f4 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -60,8 +60,9 @@ +
@@ -124,8 +125,9 @@ +