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
{{ message }}
Repository navigation
Request order changes the component's content / 请求顺序改变了组件的内容 #773
With a type-only defineProps<T>() page component in @void/vue, the component's props are fixed by the first request that renders it in a process. If a later request's loader returns a key the first request did not return, that key is not passed as a prop; Vue renders it as an HTML attribute on the root element.
/items/b renders <div><h1>B</h1><p>note=N</p></div> regardless of request order.
Related
#557 listed "Do not derive a permanent props declaration from the first received props object". #589 fixed only components with a runtime props declaration.
Analysis
@void/vue strips the type argument of defineProps<T>(), so the component has no runtime props. patchProps then sets comp.props = Object.keys(props) from the first page data and marks __voidPatched, so later keys are never declared.
问题
@void/vue 中,页面组件只用类型参数声明 props(defineProps<T>())时,props 由进程里第一个渲染它的请求固定。之后的请求如果 loader 返回了第一次没有的字段,这个字段不会作为 prop 传入,而是被渲染成根元素上的 HTML 属性。
changed the title [-][Vue] Type-only defineProps: props are fixed by the first request / 仅类型声明的 defineProps:props 被首个请求固定[/-][+]请求顺序改变了组件的内容[/+]on Nov 10, 2026
Activity
[-][Vue] Type-only defineProps: props are fixed by the first request / 仅类型声明的 defineProps:props 被首个请求固定[/-][+]请求顺序改变了组件的内容[/+][-]请求顺序改变了组件的内容[/-][+]Request order changes the component's content / 请求顺序改变了组件的内容[/+]fix(vue): declare inline typed page props before rendering (#777)