Last active
March 20, 2016 22:24
-
-
Save thgh/a71030c6b48f41b0a8dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<comp-a level="1"></comp-a> | |
</div> | |
</template> | |
<script> | |
import CompA from './components/CompA' | |
export default { | |
components: { | |
CompA | |
} | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
A to B {{level}} | |
<comp-b :level="level+1"></comp-b> | |
</div> | |
</template> | |
<script> | |
import CompB from './CompB' | |
export default { | |
props: ['level'], | |
components: { | |
CompB | |
} | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
B to C {{level}} | |
<div v-if="level<11111111"> | |
<comp-c :level="level+1"></comp-c> | |
</div> | |
</div> | |
</template> | |
<script> | |
import CompC from './CompC' | |
export default { | |
props: ['level'], | |
components: { | |
CompC | |
} | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
C to A {{level}} | |
<comp-a :level="level+1"></comp-a> | |
</div> | |
</template> | |
<script> | |
import CompA from './CompA' | |
export default { | |
props: ['level'], | |
components: { | |
CompA | |
} | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expected output: | |
A to B 1 | |
B to C 11 | |
C to A 111 | |
A to B 1111 | |
B to C 11111 | |
C to A 111111 | |
A to B 1111111 | |
B to C 11111111 | |
C to A 111111111 | |
Actual output: | |
A to B 1 | |
B to C 11 | |
C to A 111 | |
And console: [Vue warn]: Attribute ":level" is ignored on component <comp-a> because the component is a fragment instance: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment