You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used Vue3 and customized the renderer of Hummer (a cross-end framework similar to Weex). In my business scenario, when element attributes are processed, the attribute value of the parent element is relied on, that is, the child element needs to be processed after the parent element attribute is processed.
For example, in the processing of Class, if I want to implement style inheritance, I need to get the attributes of the current parent element when processing the style of the child element. However, due to the existing Vue next render "mount children first, since some props may rely on child content." design, I had to install a patch package.
The Source Code:
After Patch Change:
Whether or not configuration items can be provided, the processing order of attributes and children is determined by the customizer.
I have two plans:
Extend RendererOptions, support custom order.
function baseCreateRenderer(
options: RendererOptions,
createHydrationFns?: typeof createHydrationFunctions
)
Increase environment variables,support conditional compilation of this module.
What does the proposed API look like?
Extend RendererOptions, support custom order.
// use
baseCreateRenderer({
...rendererOptions,
prefixOrder: true
})
The text was updated successfully, but these errors were encountered:
Thank you for your reply. I can understand why it is designed this way.
I want to consult if there is a better solution for scenarios that depend on the order of attribute processing.
Now I just added a patch package for runtime-core.
What problem does this feature solve?
I used Vue3 and customized the renderer of Hummer (a cross-end framework similar to Weex). In my business scenario, when element attributes are processed, the attribute value of the parent element is relied on, that is, the child element needs to be processed after the parent element attribute is processed.
For example, in the processing of Class, if I want to implement style inheritance, I need to get the attributes of the current parent element when processing the style of the child element. However, due to the existing Vue next render "mount children first, since some props may rely on child content." design, I had to install a patch package.
The Source Code:
After Patch Change:
Whether or not configuration items can be provided, the processing order of attributes and children is determined by the customizer.
I have two plans:
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: