Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否提高"ui:hidden": true的优先级?发现ui:hidden和anyOf之类的同时存在时,仍然会渲染 #372

Open
Flora-XueXinyi opened this issue Nov 26, 2024 · 3 comments

Comments

@Flora-XueXinyi
Copy link

Flora-XueXinyi commented Nov 26, 2024

vue2 vjsf 1.0.4

问题描述

ui:hidden和anyOf之类的同时存在时,仍然会渲染;去除anyOf就正常隐藏了;我试图在anyOf中添加ui:hidden,但无效

如何复现

<vue-form v-model="formData" :schema="schema"></vue-form> schema: { type: "object", properties: { userName: { title: "用户名", type: "string", }, test: { title: "测试", type: "string", anyOf: [ { type: "string", "ui:hidden": true, }, { type: "string", enum: ["USD"], enumNames: ["USD"], "ui:hidden": true, }, ], "ui:hidden": true, }, }, },

期望的结果

处理大量复杂数据时,不方便直接去除anyOf。因此,希望只要存在ui:hidden,就能直接隐藏。

@lljj-x
Copy link
Owner

lljj-x commented Nov 28, 2024

正常的object上配置 ui:hidden 现在是生效的吗 ?

@Flora-XueXinyi
Copy link
Author

正常的object上配置 ui:hidden 现在是生效的吗 ?

image
这样是生效的。取消图中的注释就不生效

@lljj-x
Copy link
Owner

lljj-x commented Nov 29, 2024

了解了,现在可能是需要你先配置在 每一个anyOf的元素上 可以升级支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants