-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add fix * fix * revert verison * fix fn is undefined g * add e2e test * fix unit test * delete redundant code * add changeset --------- Co-authored-by: wuls <linsheng.wu@beantechs.com>
- Loading branch information
1 parent
07e8a1b
commit d59e511
Showing
7 changed files
with
63 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/vue': patch | ||
--- | ||
|
||
Supporting the top of the await syntax sugar for Vue in the template's setup |
19 changes: 19 additions & 0 deletions
19
packages/astro/e2e/fixtures/vue-component/src/components/Test.vue
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,19 @@ | ||
<script setup lang="ts"> | ||
import {onMounted, ref} from 'vue' | ||
const props = defineProps(['id']) | ||
/** The top-level await causes event handling to not work (button click) */ | ||
await new Promise((resolve) => setTimeout(resolve, 10)); | ||
const a = ref(1); | ||
onMounted(()=>{ | ||
a.value = 2 | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div :id="props.id"> | ||
{{ a }} | ||
</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
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
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