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

feat: Tree组件支持设置目录的文件类型 #2071

Open
CaptainJon opened this issue Apr 11, 2024 · 4 comments
Open

feat: Tree组件支持设置目录的文件类型 #2071

CaptainJon opened this issue Apr 11, 2024 · 4 comments
Labels
enhancement New feature or request PR Welcome

Comments

@CaptainJon
Copy link

CaptainJon commented Apr 11, 2024

What problem does this feature solve?

目前Tree组件只能根据是否存在ul和li标签(且li标签必须有内容)才能识别当前节点为文件夹,但是有时候只需初步展示一下目录结构,并不想展示里面的子文件,目前还实现不了。

Possible Solution (optional)

可以和small一样,比如通过“fold”来声明是否为文件夹,如果存在ul和li则不需要声明,自动识别为文件夹。

@CaptainJon CaptainJon added the enhancement New feature or request label Apr 11, 2024
@PeachScript
Copy link
Member

fold 不是标准 HTML 标签,可以改一下逻辑支持空 ul 也判定为文件夹

Copy link

Hello @CaptainJon. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @CaptainJon,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@andybuibui
Copy link

fold 不是标准 HTML 标签,可以改一下逻辑支持空 ul 也判定为文件夹

image
这种样式么? 可以的话我来改一下

@PeachScript
Copy link
Member

这种样式么? 可以的话我来改一下

感谢贡献,样式是这样:空目录不展示左侧 +/- 按钮,始终为关闭的文件夹图标,你看看是否合理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR Welcome
Projects
None yet
Development

No branches or pull requests

3 participants