code refactor

This commit is contained in:
MaysWind
2025-01-27 00:45:53 +08:00
parent d7193847c5
commit 10d301aa3c
+2 -2
View File
@@ -41,11 +41,11 @@ const finalMapStyle = computed<Record<string, unknown>>(() => {
const styles: Record<string, unknown> = copyObjectTo(props.mapStyle, {}); const styles: Record<string, unknown> = copyObjectTo(props.mapStyle, {});
if (props.height) { if (props.height) {
styles.height = props.height; styles['height'] = props.height;
} }
if (!mapSupported.value || !mapDependencyLoaded.value) { if (!mapSupported.value || !mapDependencyLoaded.value) {
styles.height = '0'; styles['height'] = '0';
} }
return styles; return styles;