diff --git a/packages/select-transfer-modal/index.vue b/packages/select-transfer-modal/index.vue index ca46fc7..2eec6db 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-09-05 18:26:31 + * @LastEditTime: 2023-09-06 20:03:04 * @FilePath: \vue3\packages\select-transfer-modal\index.vue * @Description: * @@ -19,9 +19,8 @@ :z-index="zIndex" @open="getList" @closed="closed" >
- -
- {{ queryParams }} + +
@@ -148,8 +147,6 @@ const queryParams = reactive({ pageSize: properties.pageSizes[0] || 10, }) -const leftParams = reactive({}) - const data = computed(() => { const all: any[] = [] const { props: { disabled = 'disabled', key = 'id' }, lockList } = properties @@ -180,7 +177,6 @@ async function getList() { try { const response = await properties.request({ ...properties.defaultParams, - ...leftParams, // 合并参数 ...queryParams, }) const { key = 'id' } = properties.props @@ -241,7 +237,7 @@ function transferValueInit() { transferValueInit() -watch(() => leftParams, handleQuery) +watch(() => properties.defaultParams, handleQuery, { deep: true }) watch(() => properties.value, transferValueInit) watch(() => properties.show, (show) => { showDialog.value = show diff --git a/stories/SelectTransferModal.stories.ts b/stories/SelectTransferModal.stories.ts index 3aad97f..eaaafa9 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-09-05 18:19:09 + * @LastEditTime: 2023-09-06 20:02:01 * @FilePath: \vue3\stories\SelectTransferModal.stories.ts * @Description: * @@ -168,6 +168,10 @@ export const LeftSlot: Story = { name: '左插槽', args: { ...meta.args, + width: '90%', + defaultParams: { + name: '', + }, }, render: args => ({ components: { ThSelectTransferModal }, @@ -189,10 +193,9 @@ export const LeftSlot: Story = { :width="args.width" :z-index="args.zIndex" > -