refactor(runtime-core): adjust attr fallthrough behavior

BREAKING CHANGE: attribute fallthrough behavior has been adjusted
according to https://github.com/vuejs/rfcs/pull/154
This commit is contained in:
Evan You
2020-04-02 21:51:01 -04:00
parent 2103a485d7
commit 21bcdec943
5 changed files with 144 additions and 27 deletions

View File

@@ -8,7 +8,8 @@ import {
createStaticVNode,
Suspense,
onMounted,
defineAsyncComponent
defineAsyncComponent,
defineComponent
} from '@vue/runtime-dom'
import { renderToString } from '@vue/server-renderer'
import { mockWarn } from '@vue/shared'
@@ -448,8 +449,9 @@ describe('SSR hydration', () => {
const mountedCalls: number[] = []
const asyncDeps: Promise<any>[] = []
const AsyncChild = {
async setup(props: { n: number }) {
const AsyncChild = defineComponent({
props: ['n'],
async setup(props) {
const count = ref(props.n)
onMounted(() => {
mountedCalls.push(props.n)
@@ -468,7 +470,7 @@ describe('SSR hydration', () => {
count.value
)
}
}
})
const done = jest.fn()
const App = {