-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always provide access to global property (#2386)
createVMProxy function has been fixed to also return global properties. Fixes #2140
- Loading branch information
1 parent
6aa8226
commit 05f76b6
Showing
5 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
message: 'Hello world!' | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<div>{{ message }} (Options API)</div> | ||
<div>{{ foo }}</div> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script> | ||
export default { | ||
setup() { | ||
const description = "Options API with setup() function"; | ||
return { description }; | ||
}, | ||
data() { | ||
return { | ||
message: "Hello world!", | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div>{{ message }} ({{ description }})</div> | ||
<div>{{ foo }}</div> | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script> | ||
import { onUnmounted } from 'vue' | ||
export default { | ||
setup() { | ||
onUnmounted(() => { console.log('unmounted') }) | ||
}, | ||
data() { | ||
return { | ||
message: 'Hello world!' | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<div>{{ message }} (Options API component with a setup() function that does not return)</div> | ||
</template> |
This file contains 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