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

guiMenu一个bug. #171

Closed
zWingz opened this issue Jan 19, 2019 · 5 comments
Closed

guiMenu一个bug. #171

zWingz opened this issue Jan 19, 2019 · 5 comments

Comments

@zWingz
Copy link
Contributor

zWingz commented Jan 19, 2019

问题类型

bug

PicGo的相关信息

最新

问题重现

image

既然guiMenu是一个function, 那就不应该拿guiMenu.length > 0
因为guiMenu.length返回的是方法参数的个数.

guiMenu = () => [{label: '', handle: () => {}}]

此时guiMenu.length === 0, 会导致无法执行menu
目前解决方法只能是

guiMenu = (ctx) => [{label: '', handle: () => {}}]

还是说编写guiMenu参数一定要带ctx呢? 这不太合理.

@Molunerfinn
Copy link
Owner

哦哦这里是我写错了。一开始guiMenu只是数组,后来加入了ctx支持,忘记改过来了。应该是不用一定要加ctx作为参数的,不过guiMenu依然应该是个函数,只不过不一定要用到ctx。之后我会修改这个部分。

@zWingz
Copy link
Contributor Author

zWingz commented Jan 19, 2019

guiMenu 能否提供一个confirm操作. 有些操作无法回滚可能要二次确认.

@Molunerfinn
Copy link
Owner

guiApi以后会提供messagebox用于信息提醒或者二次确认,类似删除图片的时候弹出来的那个确认框

@zWingz
Copy link
Contributor Author

zWingz commented Jan 19, 2019

不错不错

@Molunerfinn
Copy link
Owner

Molunerfinn commented Jan 19, 2019

开发计划可以参考project
https://github.com/Molunerfinn/PicGo/projects/6

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

No branches or pull requests

2 participants