[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
+2 -4
View File
@@ -1,9 +1,8 @@
import Icon from '../icon';
import Cell from '../cell';
import { cellProps } from '../cell/shared';
import { use, isObj, isDef, isIOS } from '../utils';
import { getRootScrollTop } from '../utils/scroll';
import { isNumber } from '../utils/validate/number';
import { use, isObj, isDef, isIOS, suffixPx } from '../utils';
const [sfc, bem] = use('field');
@@ -66,8 +65,7 @@ export default sfc({
labelStyle() {
const { labelWidth } = this;
if (labelWidth) {
const width = isNumber(String(labelWidth)) ? `${labelWidth}px` : labelWidth;
return { width };
return { width: suffixPx(labelWidth) };
}
}
},