import { KitBox } from 'poster-kit/dist/react/components.ts'
import type { CardData } from 'poster-kit'
import { useRef, type ComponentRef } from 'react'
const App = () => {
const kitBoxRef = useRef<ComponentRef<typeof KitBox> | null>(null)
function currentDataChange(data: CardData) {
console.log('当前数据:', data)
}
return <div className="box">
<KitBox
ref={kitBoxRef}
width={1080}
height={1920}
onCurrentDataChange={(e) => currentDataChange(e.detail)}
/>
</div>
}