版本
HBuilderX 3.4.18
没有提示如图
import {ref} from "vue" import {Test} from '@/store' import {apiPost,apiUrl} from '@/common/request' import {onShow,onHide,onLoad,onPullDownRefresh} from '@dcloudio/uni-app' const apiFn = async () => { const readingGet = await apiPost(1,2) console.log("readingGet", readingGet); // const readingGet = await apiPost(apiUrl.readingGet, {a: "123"}) // console.log("readingGet", readingGet); } const test = Test() const title = ref("hello uni-app vue3 Ts") onLoad(() => { apiFn() })
apiPost(1,2);//强制类型为 string , {} ,?:string
但是传入 1,2 并没有提示,也没有报错
代码例子
2 个回复
1***@qq.com - 没什么好说的
同问,难道又得换回vscode
DCloud_HB_WDL