SuperAPI AI 工具集

solid-syntax-components

通用与其它

查看项目

更新于 10-16 06:17

技能介绍

用途:在 SolidJS 中编写组件时提供语法规范,覆盖组件类型、props 处理、children 解析、refs、指令与事件系统,帮助避免破坏响应式的常见错误。

主要能力:组件类型选择(Component、ParentComponent、VoidComponent、FlowComponent);props 处理工具 splitProps、mergeProps;children() 解析与 toArray() 迭代;ref 变量赋值、回调、Signal 与转发模式;use: 指令;委托事件与原生事件(on: 前缀)。

必要用法:props 必须通过 props.x 访问,禁止解构;children 用 children(() => props.children) 解析一次;ref 用 let ref!: HTMLElement,禁止 useRef/forwardRef;需要阻止传播时用 on: 前缀;事件处理器需包在箭头函数中。

限制:资料未提供安装命令、版本要求、收费与平台信息;仅覆盖 SolidJS 组件语法相关主题。