element-plus/packages/utils/vue/icon.ts
三咲智子 6503e55277
refactor(utils): migrate utils (#5949)
* refactor(utils-v2): migrate utils

* refactor(utils-v2): migrate utils

* refactor(utils-v2): migrate utils

* refactor(utils): remove

* refactor(utils): rename

* refactor(utils): move EVENT_CODE to constants

* refactor: remove generic
2022-02-11 11:03:15 +08:00

44 lines
747 B
TypeScript

import {
SuccessFilled,
InfoFilled,
WarningFilled,
CircleCloseFilled,
Close,
Loading,
CircleCheck,
CircleClose,
} from '@element-plus/icons-vue'
import { definePropType } from './props'
import type { Component } from 'vue'
export const iconPropType = definePropType<string | Component>([
String,
Object,
Function,
])
export const CloseComponents = {
Close,
}
export const TypeComponents = {
Close,
SuccessFilled,
InfoFilled,
WarningFilled,
CircleCloseFilled,
}
export const TypeComponentsMap = {
success: SuccessFilled,
warning: WarningFilled,
error: CircleCloseFilled,
info: InfoFilled,
}
export const ValidateComponentsMap = {
validating: Loading,
success: CircleCheck,
error: CircleClose,
}