文档目录
Thermal 布局槽位
Thermal 布局槽位:按角色标签注入物品并转发点击。
import { THERMAL_DEMO_SMOOTH_STONE } from "../thermal-demo-data";
import { ThermalLayoutSlot } from "./index";
export function ThermalLayoutSlotDemo() {
return (
<div className="relative size-16">
<ThermalLayoutSlot item={THERMAL_DEMO_SMOOTH_STONE} label="demo-slot" left={8} top={8} />
</div>
);
}
安装
$pnpm add @tennantite/thermalnpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/thermal/src/thermal-layout-slot/index.tsxnpm 包保留源码目录,可直接复制改造。