Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 826e688

Browse files
committed
wip: macros
1 parent 0a74ffe commit 826e688

File tree

8 files changed

+339
-329
lines changed

8 files changed

+339
-329
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Bring `<script setup>` to Vue 2
1313
- [x] Vite plugin
1414
- [x] Webpack plugin
1515
- [ ] Top-level await
16+
- [ ] Global types
1617

1718
## Sponsors
1819

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"@babel/generator": "^7.15.0",
6666
"@babel/parser": "^7.15.3",
6767
"@babel/traverse": "^7.15.0",
68+
"@babel/types": "^7.15.0",
6869
"@vue/shared": "^3.2.4",
6970
"htmlparser2": "^6.1.0",
7071
"magic-string": "^0.25.7",

playground/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<hello-world />
3+
<hello-world msg="Hi"/>
44
</div>
55
</template>
66

playground/HelloWorld.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<div>
3+
<h3>{{msg}}</h3>
34
<button @click="inc">
45
Inc
56
</button>
@@ -11,6 +12,14 @@
1112
<script setup lang="ts">
1213
import { ref, computed } from '@vue/composition-api'
1314
15+
const props = defineProps({
16+
msg: {
17+
type: String,
18+
},
19+
})
20+
21+
const emit = defineEmits()
22+
1423
const count = ref(0)
1524
const doubled = computed(() => count.value * 2)
1625

0 commit comments

Comments
 (0)