Files
MujicaUI/docs/components/383-file-icon.md
T

36 lines
556 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# FileIcon
## 用途
按扩展名和文件夹开合显示类型图标。
## 最小示例
```go
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
mujica.FileIcon(c, "seal.go", mujica.FileIconOptions{Size: 32})
}
ui.Render(view, 100, 80, 1)
```
## 参数
Size 默认 20 DIP;Folder 表示目录;Open 需要 Folder。
## 状态
文件、目录关闭、目录打开。
## 事件
展示组件。
## 键盘操作
展示组件,沿用父级焦点。
## 限制
扩展名大小写无关;未知扩展名显示通用文件图标。