Commit f96d6b221c7ad97e0ed80250acb192b6be92c4a6
1 parent
894b63b8
perf: code style
Showing
6 changed files
with
8 additions
and
7 deletions
src/components/Icon/index.tsx
@@ -53,8 +53,6 @@ export default defineComponent({ | @@ -53,8 +53,6 @@ export default defineComponent({ | ||
53 | } | 53 | } |
54 | }; | 54 | }; |
55 | 55 | ||
56 | - watch(() => props.icon, update, { flush: 'post' }); | ||
57 | - | ||
58 | const wrapStyleRef = computed((): any => { | 56 | const wrapStyleRef = computed((): any => { |
59 | const { size, color } = props; | 57 | const { size, color } = props; |
60 | let fs = size; | 58 | let fs = size; |
@@ -68,6 +66,7 @@ export default defineComponent({ | @@ -68,6 +66,7 @@ export default defineComponent({ | ||
68 | }; | 66 | }; |
69 | }); | 67 | }); |
70 | 68 | ||
69 | + watch(() => props.icon, update, { flush: 'post' }); | ||
71 | onMounted(update); | 70 | onMounted(update); |
72 | 71 | ||
73 | return () => ( | 72 | return () => ( |
src/components/Loading/BasicLoading.vue
@@ -15,8 +15,6 @@ | @@ -15,8 +15,6 @@ | ||
15 | // components | 15 | // components |
16 | import { defineComponent, computed } from 'vue'; | 16 | import { defineComponent, computed } from 'vue'; |
17 | 17 | ||
18 | - // hook | ||
19 | - | ||
20 | import { SizeEnum, sizeMap } from '/@/enums/sizeEnum'; | 18 | import { SizeEnum, sizeMap } from '/@/enums/sizeEnum'; |
21 | 19 | ||
22 | import { BasicLoadingProps } from './type'; | 20 | import { BasicLoadingProps } from './type'; |
src/components/Loading/FullLoading.vue
@@ -21,7 +21,6 @@ | @@ -21,7 +21,6 @@ | ||
21 | absolute: Boolean as PropType<boolean>, | 21 | absolute: Boolean as PropType<boolean>, |
22 | }, | 22 | }, |
23 | setup(props) { | 23 | setup(props) { |
24 | - // 样式前缀 | ||
25 | const getStyle = computed((): any => { | 24 | const getStyle = computed((): any => { |
26 | return props.absolute | 25 | return props.absolute |
27 | ? { | 26 | ? { |
@@ -32,6 +31,7 @@ | @@ -32,6 +31,7 @@ | ||
32 | } | 31 | } |
33 | : {}; | 32 | : {}; |
34 | }); | 33 | }); |
34 | + | ||
35 | return { getStyle, SizeEnum }; | 35 | return { getStyle, SizeEnum }; |
36 | }, | 36 | }, |
37 | }); | 37 | }); |
src/components/Markdown/src/index.vue
@@ -29,7 +29,6 @@ | @@ -29,7 +29,6 @@ | ||
29 | setup(props, { attrs, emit }) { | 29 | setup(props, { attrs, emit }) { |
30 | const wrapRef = ref<Nullable<HTMLDivElement>>(null); | 30 | const wrapRef = ref<Nullable<HTMLDivElement>>(null); |
31 | const vditorRef = ref<Nullable<Vditor>>(null); | 31 | const vditorRef = ref<Nullable<Vditor>>(null); |
32 | - | ||
33 | const initedRef = ref(false); | 32 | const initedRef = ref(false); |
34 | 33 | ||
35 | function init() { | 34 | function init() { |
src/components/Menu/src/BasicMenu.tsx
@@ -66,7 +66,7 @@ export default defineComponent({ | @@ -66,7 +66,7 @@ export default defineComponent({ | ||
66 | offset += 54; | 66 | offset += 54; |
67 | } | 67 | } |
68 | return { | 68 | return { |
69 | - height: `calc(100% - ${offset}px)`, | 69 | + height: `calc(100% - ${offset - 30}px)`, |
70 | position: 'relative', | 70 | position: 'relative', |
71 | overflow: 'auto', | 71 | overflow: 'auto', |
72 | }; | 72 | }; |