UNPKG

vxe-table-demonic

Version:

一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...

28 lines (25 loc) 764 B
import { defineComponent, h, PropType } from 'vue' import { VxeIconPropTypes, VxeIconEmits } from '../../../types/all' export default defineComponent({ name: 'VxeIcon', props: { name: String as PropType<VxeIconPropTypes.Name>, roll: Boolean as PropType<VxeIconPropTypes.Roll>, status: String as PropType<VxeIconPropTypes.Status> }, emits: [ 'click' ] as VxeIconEmits, setup (props, { emit }) { const clickEvent = (evnt: KeyboardEvent) => { emit('click', { $event: evnt }) } return () => { const { name, roll, status } = props return h('i', { class: [`vxe-icon-${name}`, roll || '', status ? [`theme--${status}`] : ''], onClick: clickEvent }) } } })