icon.tsx 264 Bytes RawBlameHistoryPermalink 1 2 3 4 5 6 7 8 9 10 11 12 // 有点丑陋 但是功能在 import { h, compile } from 'vue'; type Props = { name: string; }; const icon = (props: Props) => { console.log(props.name) return(props.name ? h(compile(`<${props.name}/>`)) : null, {size: 20}) } export default icon;