vue3中jsx自定义指令的使用

640 阅读1分钟

自定义指令

只有 argument 的时候推荐使用

const App = { directives: { custom: customDirective }, setup() { return () => ; }, }; const App = { directives: { custom: customDirective }, setup() { return () => <a v-custom={[val, "arg", ["a", "b"]]} />; }, }; 文档中的描述看得我一愣一愣的,vue3+jsx使用自定义指令具体是什么步骤呢