index.jsx 356 B

12345678910111213141516
  1. import { computed } from 'vue'
  2. import './index.less'
  3. export default {
  4. name: 'CipSvgIcon',
  5. props: {
  6. name: String
  7. },
  8. setup (props) {
  9. const className = computed(() => {
  10. return `#icon-${props.name}`
  11. })
  12. return () => <svg class={['cip-svg-icon']} aria-hidden={'true'}>
  13. <use xlinkHref={className.value}></use>
  14. </svg>
  15. }
  16. }