defineComponent函数,只是对setup函数进行封装,返回options的对象 export function defineComponent(options: unknown) { return isFunction(options) ? { setup: options } : options } defineComponent最重要的是:在TS下,给予了组件 正确的参数类型推断 搜索
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有