修复流程表单:表单保存后返回列表页面且重新加载列表数据

This commit is contained in:
puhui999
2023-04-19 11:35:37 +08:00
parent 3d579b3a99
commit 604b8867ce
2 changed files with 21 additions and 3 deletions

View File

@ -98,7 +98,7 @@ import { setConfAndFields2 } from '@/utils/formCreate'
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const { push } = useRouter() // 路由
const { currentRoute, push } = useRouter() // 路由
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
@ -174,7 +174,16 @@ const openDetail = async (rowId: number) => {
// 弹窗打开
detailVisible.value = true
}
/**表单保存返回后重新加载列表 */
watch(
() => currentRoute.value,
() => {
getList()
},
{
immediate: true
}
)
/** 初始化 **/
onMounted(() => {
getList()