types: use CSSProperties for style

This commit is contained in:
chenjiahan
2020-10-09 19:41:03 +08:00
parent 59fb1d4dfc
commit ed753ac97d
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { ref, watch, computed, PropType } from 'vue';
import { ref, watch, computed, PropType, CSSProperties } from 'vue';
import { createNamespace, isDef, addUnit } from '../utils';
import Icon from '../icon';
@@ -42,7 +42,7 @@ export default createComponent({
const imageRef = ref();
const style = computed(() => {
const style: Record<string, unknown> = {};
const style: CSSProperties = {};
if (isDef(props.width)) {
style.width = addUnit(props.width);