From 424b171e0db727f5e0157cbcfd5460f15f8ea609 Mon Sep 17 00:00:00 2001 From: 无木 <netfan@foxmail.com> Date: Wed, 30 Jun 2021 00:50:49 +0800 Subject: [PATCH] fix(demo): account list fetch loss param --- src/views/demo/system/account/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/demo/system/account/index.vue b/src/views/demo/system/account/index.vue index 7a800ff..fc60f5d 100644 --- a/src/views/demo/system/account/index.vue +++ b/src/views/demo/system/account/index.vue @@ -1,7 +1,7 @@ <template> <PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> <DeptTree class="w-1/4 xl:w-1/5" @select="handleSelect" /> - <BasicTable @register="registerTable" class="w-3/4 xl:w-4/5"> + <BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo"> <template #toolbar> <a-button type="primary" @click="handleCreate">新增账号</a-button> </template> @@ -35,7 +35,7 @@ </PageWrapper> </template> <script lang="ts"> - import { defineComponent } from 'vue'; + import { defineComponent, reactive } from 'vue'; import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { getAccountList } from '/@/api/demo/system'; @@ -54,6 +54,7 @@ setup() { const go = useGo(); const [registerModal, { openModal }] = useModal(); + const searchInfo = reactive<Recordable>({}); const [registerTable, { reload, updateTableDataRecord }] = useTable({ title: '账号列表', api: getAccountList, @@ -104,7 +105,8 @@ } function handleSelect(deptId = '') { - reload({ searchInfo: { deptId } }); + searchInfo.deptId = deptId; + reload(); } function handleView(record: Recordable) { @@ -120,6 +122,7 @@ handleSuccess, handleSelect, handleView, + searchInfo, }; }, }); -- libgit2 0.23.3