Skip to content

Commit

Permalink
fix: 修复调用 refreshRender 函数报错
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-xiao-shuai committed Nov 20, 2024
1 parent 821f5f9 commit 5ec04b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/powerful-form/src/form-view-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ export const useFunction = (
elFormRef: Ref<FormInstance | null>,
transformHeader: (headerLists: PowerfulFormPTHeaders[]) => void
) => {
const { proxy: _proxy_ } = getCurrentInstance()!

let visible = true
/**
* @param {object} [params = {}] apis 请求的格外参数
Expand Down Expand Up @@ -516,9 +518,10 @@ export const useFunction = (
refName: string = typeof props.extendTable === 'boolean'
? 'PTable'
: props.extendTable!,
proxy = getCurrentInstance()?.proxy!
proxy?: ComponentPublicInstance
) => {
const PTExpose = useGetRefs<PowerfulTableExpose>(refName, proxy)
const _proxy = proxy ? proxy : _proxy_!
const PTExpose = useGetRefs<PowerfulTableExpose>(refName, _proxy)

const stop = watch(
() => PTExpose.value,
Expand Down
2 changes: 1 addition & 1 deletion packages/powerful-form/src/form-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @Description:
-->
<template>
<div style="transition: height 0.3s; overflow: hidden">
<div style="transition: all 0.3s; overflow: hidden">
<ElForm
v-bind="property"
ref="elFormRef"
Expand Down

0 comments on commit 5ec04b1

Please sign in to comment.