diff --git a/packages/select-transfer-modal/index.vue b/packages/select-transfer-modal/index.vue index 493d965..e9e180c 100644 --- a/packages/select-transfer-modal/index.vue +++ b/packages/select-transfer-modal/index.vue @@ -2,7 +2,7 @@ * @Author: zhaojinfeng 121016171@qq.com * @Date: 2023-08-14 11:07:15 * @LastEditors: zhaojinfeng 121016171@qq.com - * @LastEditTime: 2023-08-14 17:26:33 + * @LastEditTime: 2023-08-14 18:54:43 * @FilePath: \vue3\packages\select-transfer-modal\index.vue * @Description: * @@ -44,15 +44,8 @@ }" :data="data" :filter-method="filterMethod" :props="props" > - - - - {{ option.name }} - - - {{ option[optionRight] }} - - + + {{ option[props.label] }} @@ -90,7 +83,6 @@ const properties = withDefaults( defaultParams?: Record formItems?: FormItem[] request: (args: any) => Promise - layout?: string optionRight?: string pageSizes?: number[] pagerCount?: number @@ -105,7 +97,7 @@ const properties = withDefaults( props: () => ({ key: 'id', label: 'name', disabled: 'disabled' }), show: false, defaultParams: () => ({}), - pageSizes: () => [10, 20, 30, 50], + pageSizes: () => [20, 50, 100, 200], pagerCount: document.body.clientWidth < 992 ? 5 : 7, hidePagination: false, title: '选择', @@ -133,7 +125,7 @@ function filterMethod(_query: string, item: TransferDataItem) { const queryParams = reactive({ pageNum: 1, - pageSize: 10, + pageSize: properties.pageSizes[0] || 10, }) const data = computed(() => { diff --git a/stories/SelectTransferModal.stories.ts b/stories/SelectTransferModal.stories.ts index 4173292..dcb2e60 100644 --- a/stories/SelectTransferModal.stories.ts +++ b/stories/SelectTransferModal.stories.ts @@ -2,7 +2,7 @@ * @Author: zhaojinfeng 121016171@qq.com * @Date: 2023-08-14 11:07:15 * @LastEditors: zhaojinfeng 121016171@qq.com - * @LastEditTime: 2023-08-14 16:45:09 + * @LastEditTime: 2023-08-14 18:52:56 * @FilePath: \vue3\stories\SelectTransferModal.stories.ts * @Description: * @@ -43,8 +43,7 @@ const meta = { formItems: [{ label: 'label1', prop: 'prop1' }, { label: 'label2', prop: 'prop2', selectOptions: [{ label: '1', value: '1' }, { label: '2', value: '2' }] }], request, optionRight: 'value', - layout: 'total, sizes, prev, pager, next, jumper', - pageSizes: [10, 20, 30, 50], + pageSizes: [20, 50, 100, 200], pagerCount: document.body.clientWidth < 992 ? 5 : 7, props: { key: 'id', label: 'name', disabled: 'disabled' }, hidePagination: false,