import { computed, defineComponent, PropType } from 'vue' import { SketchView, StyleSheetDeclaration } from '@sketchjs/runtime' import { useSketchElement } from '@/common/hooks' export const InternalSketchView = defineComponent({ name: 'SketchView', props: { /** * 样式 */ style: Object as PropType }, setup: (props, { slots }) => { const sketchView = computed(() => SketchView.create({ style: props.style })) useSketchElement({ self: sketchView.value }) return () => ( ) } })