alibaba / x-render

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案
https://xrender.fun
6.98k stars 988 forks source link

visible 不支持隐藏对象! #1423

Closed Deja-vuuu closed 11 months ago

Deja-vuuu commented 11 months ago

1.依赖仓库的版本(Dependencies versions)

2.问题描述(Bug description)

3.出现问题的 schema demo(Reproduction schema demo)

const schema = {
  type: 'object',
                displayType: 'column',
                properties: {
                    cpName: {
                        title: '组件名称',
                        type: 'string',
                        visible: false,
                    },
                    config: {
                        widget: 'collapse',
                        display: 'block',
                        type: 'object',
                        title: '弹窗配置',
                        column: 1,
                        visible: false,
                        properties: {
                            backGroundUrl: {
                                title: '背景图片',
                                type: 'string',
                                widget: 'upload',
                            },
                            bgTitle: {
                                title: '标题文案',
                                type: 'string',
                            },
                        },
                    },
}

4.最小复现 demo(Reproduction demo)

form-render demo https://codesandbox.io/s/unruffled-flower-jl78h table-render demo https://codesandbox.io/s/sweet-euler-bdoty fr-generator demo https://codesandbox.io/s/s13sh

lhbxs commented 11 months ago

用 hidden

Deja-vuuu commented 11 months ago

用 hidden

hidden 提交的的时候 配置了removeHiddenData 也不会被提交上去

我现在有个需求是需要把隐藏表单上的一些项目 但是他也能被提交上去

Deja-vuuu commented 11 months ago

removeHiddenData = false 属性 hidden =true form.getValues(true) 这样可以获取隐藏数据 感谢~