Skip to content
New issue

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

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

Already on GitHub? # to your account

当Space下面的子元素都被v-if掉之后,Space整体是否也不要进行渲染了? #1605

Closed
Adangs opened this issue Nov 17, 2021 · 5 comments
Labels
feature request New feature or request

Comments

@Adangs
Copy link
Contributor

Adangs commented Nov 17, 2021

This function solves the problem (这个功能解决的问题)

比如表格操作列会使用多个Space配置多行多个操作按钮
当针对按钮添加上权限之后,有可能当前Space行下都被v-if隐藏掉了;
这个时候Space自带的一些样式就不是特别友好了;

Expected API (期望的 API)

无参考

@github-actions github-actions bot added the feature request New feature or request label Nov 17, 2021
@Adangs
Copy link
Contributor Author

Adangs commented Nov 17, 2021

这种情况下也是个问题。

image
image

@07akioni 07akioni added bug Something isn't working and removed bug Something isn't working labels Nov 17, 2021
@07akioni
Copy link
Collaborator

你是说每一个都被 v-if false 还是说仅存在一个元素

@Adangs
Copy link
Contributor Author

Adangs commented Nov 18, 2021

你是说每一个都被 v-if false 还是说仅存在一个元素

两种情况
1、当某些被 v-if false 的时候
2、当所有的都被 v-if false 的时候

image
image

@Adangs
Copy link
Contributor Author

Adangs commented Nov 18, 2021

你是说每一个都被 v-if false 还是说仅存在一个元素
经过再次尝试发现,
第一种情况,1、当某些被 v-if false 的时候
元素是会被隐藏的;

至于我上面为什么会出现不隐藏的情况;
是因为我return出来一个空字符串;当return出一个null的时候,就ok了;

image

@07akioni
Copy link
Collaborator

你是说每一个都被 v-if false 还是说仅存在一个元素

两种情况 1、当某些被 v-if false 的时候 2、当所有的都被 v-if false 的时候

image image

1 是做不到的,没有办法在做到读取 children node 的时候还知道 children node 里面是什么,即使这个 children node 没有自己的 children
2 的话我觉得没问题,这就做

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants