Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Can the issue be reproduced with the default theme (daylight/midnight)?
- I was able to reproduce the issue with the default theme
Could the issue be due to extensions?
- I've ruled out the possibility that the extension is causing the problem.
Describe the problem
在 addDock 中提供的类型为 Dock,实际上传递的是 Custom。
Expected result
Screenshot or screen recording presentation
No response
Version environment
- Version:
- Operating System:
- Browser (if used):
Log file
More information
No response
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Vanessa219 commentedon May 5, 2025
Custom 的参数是这个,addDock 的参数和实现是一致的。建议如何修改呢?

Wetoria commentedon May 5, 2025
Vanessa219 commentedon May 6, 2025
没法一致,两个参数是不一样的。返回的 model 就是 Custom。
移动端的布局结构导致 Dock 和 PC 不一致,因此没有对应的方法。
为确保唯一性,不同的 dock 需要不同的 type。
Vanessa219 commentedon May 13, 2025
没有问题的话我先关闭了。
Wetoria commentedon May 13, 2025
addDock 的几个回调函数,实际上只有init的参数是 Custom,其他都是没有参数,但是现在写的是 Dock
这是 addDock 中的:
实际上的:
桌面端 Custom:

移动端 MobileCustom:
[-]插件 Plugin.addDock 类型错误[/-][+]update Plugin.addDock [/+][-]update Plugin.addDock [/-][+]Update plugin `addDock` callback parameter scope[/+]🎨 siyuan-note/siyuan#14752