mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
[improvement] rename suffixPx to addUnit
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createNamespace, suffixPx } from '../utils';
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { GRAY } from '../utils/color';
|
||||
import { inherit } from '../utils/functional';
|
||||
|
||||
@@ -37,7 +37,7 @@ function LoadingIcon(h: CreateElement, props: LoadingProps) {
|
||||
function LoadingText(h: CreateElement, props: LoadingProps, slots: DefaultSlots) {
|
||||
if (slots.default) {
|
||||
const style = props.textSize && {
|
||||
fontSize: suffixPx(props.textSize)
|
||||
fontSize: addUnit(props.textSize)
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -58,7 +58,7 @@ function Loading(
|
||||
|
||||
const style: { [key: string]: string } = { color };
|
||||
if (size) {
|
||||
const iconSize = suffixPx(size) as string;
|
||||
const iconSize = addUnit(size) as string;
|
||||
style.width = iconSize;
|
||||
style.height = iconSize;
|
||||
}
|
||||
|
Reference in New Issue
Block a user