Browse Source
fix: When multiple Tables are loaded on a page, a warning will be reported in the initialization of Tables after the second one (#4791)
pull/4792/head
1302岁的龙猫
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
packages/effects/plugins/src/vxe-table/use-vxe-grid.vue
|
|
|
@ -220,7 +220,9 @@ async function init() { |
|
|
|
|
|
|
|
// form 由 vben-form代替,所以不适配formConfig,这里给出警告 |
|
|
|
const formConfig = gridOptions.value?.formConfig; |
|
|
|
if (formConfig) { |
|
|
|
// 处理某个页面加载多个Table时,第2个之后的Table初始化报出警告 |
|
|
|
// 因为第一次初始化之后会把defaultGridOptions和gridOptions合并后缓存进State |
|
|
|
if (formConfig && formConfig.enabled) { |
|
|
|
console.warn( |
|
|
|
'[Vben Vxe Table]: The formConfig in the grid is not supported, please use the `formOptions` props', |
|
|
|
); |
|
|
|
|