perf: code style

This commit is contained in:
vben 2020-10-20 23:11:58 +08:00
parent 894b63b801
commit f96d6b221c
6 changed files with 8 additions and 7 deletions

View File

@ -53,8 +53,6 @@ export default defineComponent({
}
};
watch(() => props.icon, update, { flush: 'post' });
const wrapStyleRef = computed((): any => {
const { size, color } = props;
let fs = size;
@ -68,6 +66,7 @@ export default defineComponent({
};
});
watch(() => props.icon, update, { flush: 'post' });
onMounted(update);
return () => (

View File

@ -15,8 +15,6 @@
// components
import { defineComponent, computed } from 'vue';
// hook
import { SizeEnum, sizeMap } from '/@/enums/sizeEnum';
import { BasicLoadingProps } from './type';

View File

@ -21,7 +21,6 @@
absolute: Boolean as PropType<boolean>,
},
setup(props) {
//
const getStyle = computed((): any => {
return props.absolute
? {
@ -32,6 +31,7 @@
}
: {};
});
return { getStyle, SizeEnum };
},
});

View File

@ -29,7 +29,6 @@
setup(props, { attrs, emit }) {
const wrapRef = ref<Nullable<HTMLDivElement>>(null);
const vditorRef = ref<Nullable<Vditor>>(null);
const initedRef = ref(false);
function init() {

View File

@ -66,7 +66,7 @@ export default defineComponent({
offset += 54;
}
return {
height: `calc(100% - ${offset}px)`,
height: `calc(100% - ${offset - 30}px)`,
position: 'relative',
overflow: 'auto',
};

View File

@ -417,3 +417,8 @@
padding: 0 16px;
flex-grow: 1;
}
.ant-layout-sider-trigger {
height: 30px;
line-height: 30px;
}