Skip to content

Commit

Permalink
fix 修复 form 无法显示问题 #I9R6U5
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed May 22, 2024
1 parent 783820e commit a56eb8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.6.15",
"version": "4.6.16",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
17 changes: 5 additions & 12 deletions packages/form/src/form.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, h, ref, Ref, createCommentVNode, provide, computed, inject, reactive, watch, nextTick, PropType, onMounted } from 'vue'
import { defineComponent, h, ref, Ref, createCommentVNode, provide, computed, inject, reactive, watch, nextTick, PropType } from 'vue'
import XEUtils from 'xe-utils'
import GlobalConfig from '../../v-x-e-table/src/conf'
import { VXETable } from '../../v-x-e-table'
Expand Down Expand Up @@ -642,17 +642,6 @@ export default defineComponent({
reactData.collapseAll = !!value
})

onMounted(() => {
nextTick(() => {
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
if (props.customLayout && props.items) {
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
}
}
loadItem(props.items || [])
})
})

const renderVN = () => {
const { loading, className, data, customLayout } = props
const { formItems } = reactData
Expand Down Expand Up @@ -700,6 +689,10 @@ export default defineComponent({

$xeform.renderVN = renderVN

if (props.items) {
loadItem(props.items)
}

provide('$xeform', $xeform)
provide('$xeformgather', null)
provide('$xeformitem', null)
Expand Down

0 comments on commit a56eb8b

Please sign in to comment.