fix(ssr): handle fallthrough attrs in ssr compile output

This commit is contained in:
Evan You
2020-06-26 14:23:50 -04:00
parent 30584bcc61
commit d5dbd27193
21 changed files with 776 additions and 488 deletions

View File

@@ -119,7 +119,8 @@ export interface ComponentOptionsBase<
ssrRender?: (
ctx: any,
push: (item: any) => void,
parentInstance: ComponentInternalInstance
parentInstance: ComponentInternalInstance,
attrs?: Data
) => void
/**

View File

@@ -554,8 +554,7 @@ export function normalizeChildren(vnode: VNode, children: unknown) {
const handlersRE = /^on|^vnode/
export function mergeProps(...args: (Data & VNodeProps)[]) {
const ret: Data = {}
extend(ret, args[0])
const ret = extend({}, args[0])
for (let i = 1; i < args.length; i++) {
const toMerge = args[i]
for (const key in toMerge) {