mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: correct misleading JSDoc about stubs auto-application
renderWithDefaults only merges plugins and directives, not stubs. Updated doc to accurately describe behavior. Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10628#discussion_r3004203297
This commit is contained in:
@@ -42,10 +42,11 @@ const defaultDirectiveStubs: Record<string, () => void> = {
|
||||
*
|
||||
* Use via `global.stubs` in render options:
|
||||
* ```ts
|
||||
* render(MyComponent, { global: { stubs: { Button: stubs.Button } } })
|
||||
* render(MyComponent, { global: { stubs: { Skeleton: stubs.Skeleton } } })
|
||||
* ```
|
||||
*
|
||||
* Or use `renderWithDefaults` which auto-applies these as defaults.
|
||||
* Or use `renderWithDefaults` which provides plugins and directives.
|
||||
* Import `stubs` and pass them via `global.stubs` when needed.
|
||||
*/
|
||||
const SkeletonStub = defineComponent({
|
||||
name: 'Skeleton',
|
||||
|
||||
Reference in New Issue
Block a user