style: remove duplicate func (#3924)

pull/3775/head
zkwolf 4 years ago committed by GitHub
parent efb382c9ce
commit 44e73cf460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,5 @@
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import ScrollNumber from './ScrollNumber'; import ScrollNumber from './ScrollNumber';
import { PresetColorTypes } from '../_util/colors';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
import { initDefaultProps, getComponent, getSlot } from '../_util/props-util'; import { initDefaultProps, getComponent, getSlot } from '../_util/props-util';
import { cloneElement } from '../_util/vnode'; import { cloneElement } from '../_util/vnode';
@ -10,6 +9,7 @@ import { defaultConfigProvider } from '../config-provider';
import { inject, defineComponent, CSSProperties, VNode, App, Plugin } from 'vue'; import { inject, defineComponent, CSSProperties, VNode, App, Plugin } from 'vue';
import { tuple } from '../_util/type'; import { tuple } from '../_util/type';
import Ribbon from './Ribbon'; import Ribbon from './Ribbon';
import { isPresetColor } from './utils';
const BadgeProps = { const BadgeProps = {
/** Number to show in badge */ /** Number to show in badge */
@ -28,9 +28,6 @@ const BadgeProps = {
numberStyle: PropTypes.style, numberStyle: PropTypes.style,
title: PropTypes.string, title: PropTypes.string,
}; };
function isPresetColor(color?: string): boolean {
return (PresetColorTypes as string[]).indexOf(color) !== -1;
}
const Badge = defineComponent({ const Badge = defineComponent({
name: 'ABadge', name: 'ABadge',

@ -1,5 +1,5 @@
import { PresetColorTypes } from '../_util/colors'; import { PresetColorTypes } from '../_util/colors';
export function isPresetColor(color?: string): boolean { export function isPresetColor(color?: string): boolean {
return (PresetColorTypes as any[]).indexOf(color) !== -1; return (PresetColorTypes as string[]).indexOf(color) !== -1;
} }

Loading…
Cancel
Save