作者回复: 现在ref确实是比reactive优先级更高一些,直接建议ref + toRefs一把梭,我碰到必须有reactive的场景的话会写个加餐对比
作者回复: 这里对input的封装并没有做type的判断,为了更好的展示git hook这一节独立一个github的repo,可以看这里 https://github.com/shengxinjing/ailemente/blob/main/src/components/form/Input.vue
作者回复: 你好,type类型别名可以使用 type NameResolver = () => string 来定义一个函数类型,直接function需要用function(a:string):string来定义 interface需要使用下面的语法,写法不同 interface SearchFunc { (source: string, subString: string): boolean; }
作者回复: 我看下,看来是element3的bug
作者回复: https://github.com/shengxinjing/ailemente和https://github.com/hug-sun/element3 可以看到
作者回复: 这里我引入了emitter,是一个event-bus的实现,可以看这里https://github.com/shengxinjing/ailemente/blob/main/src/emitter.ts
作者回复: 其实复杂的也得自己封装一下 只不过vue3没有内置了