[new feature] Loading: add text-size prop

This commit is contained in:
陈嘉涵
2019-04-30 17:47:41 +08:00
parent cd0720954c
commit 0a7ca2fb6e
11 changed files with 53 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
import { use } from '../utils';
import { use, suffixPx } from '../utils';
import { inherit } from '../utils/functional';
import { isNumber } from '../utils/validate/number';
// Types
import { CreateElement, RenderContext } from 'vue/types';
@@ -22,11 +21,6 @@ const [sfc, bem] = use('skeleton');
const DEFAULT_ROW_WIDTH = '100%';
const DEFAULT_LAST_ROW_WIDTH = '60%';
function suffixPx(value: string | number): string {
value = String(value);
return isNumber(value) ? `${value}px` : value;
}
function Skeleton(
h: CreateElement,
props: SkeletonProps,