This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Expand file tree Collapse file tree 2 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -954,3 +954,42 @@ export default __sfc_main;
954954</script>
955955"
956956`;
957+
958+ exports[`transform > fixtures > test/fixtures/VariableBinding.vue 1`] = `
959+ " <script lang =\\"ts\\">
960+ /* eslint-disable no-console */
961+ import { reactive } from ' @vue/composition-api' ;
962+ const __sfc_main = { } ;
963+
964+ __sfc_main.setup = (__props, __ctx) => {
965+ const state = reactive ({
966+ value: ' '
967+ });
968+
969+ function showEvent(event : MouseEvent ) {
970+ console .log (event );
971+ }
972+
973+ const emit = __ctx .emit ;
974+ return {
975+ state ,
976+ showEvent ,
977+ emit
978+ };
979+ } ;
980+
981+ export default __sfc_main;
982+ </script>
983+ <template>
984+ <div
985+ @click=\\"
986+ state.value = \`x: \${$event.x}\`
987+ showEvent($event)
988+ emit('foo')
989+ \\"
990+ >
991+ 2333
992+ </div >
993+ </template >
994+ "
995+ `;
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ /* eslint-disable no-console */
3+ import { reactive } from ' @vue/composition-api'
4+ const state = reactive ({ value: ' ' })
5+ function showEvent(event : MouseEvent ) {
6+ console .log (event )
7+ }
8+ const emit = defineEmits <{
9+ (event : ' foo' ): void
10+ }>()
11+ </script >
12+ <template >
13+ <div
14+ @click ="
15+ state.value = `x: ${$event.x}`
16+ showEvent($event)
17+ emit('foo')
18+ "
19+ >
20+ 2333
21+ </div >
22+ </template >
You can’t perform that action at this time.
0 commit comments