style: lint code
parent
eedd7f3302
commit
ed27700ef4
|
@ -14,7 +14,7 @@ const isPrerender = process.env.NODE_ENV === 'prerender';
|
|||
|
||||
// Generate different prefix to make user selector break in production env.
|
||||
// This helps developer not to do style override directly on the hash id.
|
||||
const hashPrefix = (!isProduction && !isPrerender) ? 'css-dev-only-do-not-override' : 'css';
|
||||
const hashPrefix = !isProduction && !isPrerender ? 'css-dev-only-do-not-override' : 'css';
|
||||
|
||||
export interface Option<DerivativeToken, DesignToken> {
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ export interface ConfigurableLocation {
|
|||
location?: Location;
|
||||
}
|
||||
|
||||
export const defaultWindow = isClient ? window : undefined;
|
||||
export const defaultDocument = isClient ? window.document : undefined;
|
||||
export const defaultNavigator = isClient ? window.navigator : undefined;
|
||||
export const defaultLocation = isClient ? window.location : undefined;
|
||||
export const defaultWindow = isClient ? window : undefined;
|
||||
export const defaultDocument = isClient ? window.document : undefined;
|
||||
export const defaultNavigator = isClient ? window.navigator : undefined;
|
||||
export const defaultLocation = isClient ? window.location : undefined;
|
||||
|
|
|
@ -21,8 +21,6 @@ export const rand = (min: number, max: number) => {
|
|||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
};
|
||||
export const isIOS =
|
||||
isClient &&
|
||||
window?.navigator?.userAgent &&
|
||||
/iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
isClient && window?.navigator?.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
||||
export const hasOwn = <T extends object, K extends keyof T>(val: T, key: K): key is K =>
|
||||
Object.prototype.hasOwnProperty.call(val, key);
|
||||
|
|
|
@ -128,6 +128,7 @@ const mergedArrow = computed(() => {
|
|||
case 'hide':
|
||||
return false;
|
||||
case 'center':
|
||||
default:
|
||||
return { pointAtCenter: true };
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { cloneVNode, type FunctionalComponent, type PropType } from 'vue';
|
||||
import { cloneVNode } from 'vue';
|
||||
import type { VNode, FunctionalComponent, PropType } from 'vue';
|
||||
import type { MouseEventHandler } from '../_util/EventInterface';
|
||||
import type { VueNode } from '../_util/type';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
|
@ -23,7 +24,7 @@ const TransBtn: TransBtnType = (props, { slots }) => {
|
|||
if (typeof customizeIcon === 'function') {
|
||||
icon = customizeIcon(customizeIconProps);
|
||||
} else {
|
||||
icon = cloneVNode(customizeIcon);
|
||||
icon = cloneVNode(customizeIcon as VNode);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue