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