有关在script setup上面的问题
mhxy13867806343 opened this issue · comments
???? commented
刚刚遇到一个问题
如果使用这种<script setup></script> 无法使用
import {useContext, defineProps, defineEmit } from '@vue/composition-api'
这种
只能使用
setup(props,ctx){
....
return {}
},
@vue/composition-api版本号:^1.4.6 号 请问何时支持?
???? commented
???? commented
ZHAO Jin-Xiang commented
defineProps, defineEmit are compile time macros. You shouldn't import it. Just use it.
The script setup support is in https://github.com/antfu/unplugin-vue2-script-setup
useContext is deprecated, please use https://vuejs.org/api/sfc-script-setup.html#useslots-useattrs