[improvement] rename suffixPx to addUnit
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
import { createNamespace, isDef, suffixPx } from '../utils';
|
||||
import { createNamespace, isDef, addUnit } from '../utils';
|
||||
import Icon from '../icon';
|
||||
|
||||
const [createComponent, bem] = createNamespace('image');
|
||||
@@ -32,11 +32,11 @@ export default createComponent({
|
||||
const style = {};
|
||||
|
||||
if (isDef(this.width)) {
|
||||
style.width = suffixPx(this.width);
|
||||
style.width = addUnit(this.width);
|
||||
}
|
||||
|
||||
if (isDef(this.height)) {
|
||||
style.height = suffixPx(this.height);
|
||||
style.height = addUnit(this.height);
|
||||
}
|
||||
|
||||
return style;
|
||||
|
||||
Reference in New Issue
Block a user