feat(sfc): add defineEmits and deprecate defineEmit (#3725)

This commit is contained in:
Eduardo San Martin Morote
2021-06-22 21:02:56 +02:00
committed by GitHub
parent 6b6d566861
commit a137da8a9f
8 changed files with 102 additions and 54 deletions

View File

@@ -3,7 +3,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted, defineProps, defineEmit, watchEffect } from 'vue'
import { ref, onMounted, defineProps, defineEmits, watchEffect } from 'vue'
import { debounce } from '../utils'
import CodeMirror from './codemirror'
@@ -24,7 +24,7 @@ const props = defineProps({
}
})
const emit = defineEmit<(e: 'change', value: string) => void>()
const emit = defineEmits<(e: 'change', value: string) => void>()
onMounted(() => {
const addonOptions = {