code refactor

This commit is contained in:
MaysWind
2025-01-05 17:15:06 +08:00
parent 7c40157cba
commit 5256eff88d
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ const props = defineProps<{
const { tt, getCurrentLanguageInfo } = useI18n();
const mapContainer: Ref<HTMLElement | null> = useTemplateRef('mapContainer');
const mapContainer = useTemplateRef<HTMLElement>('mapContainer');
const mapInstance: Ref<MapInstance | null> = ref(createMapInstance());
const initCenter: Ref<MapPosition> = ref({
latitude: 0,
+1 -1
View File
@@ -43,7 +43,7 @@ const emit = defineEmits<{
}>();
const codes: Ref<PinCode[]> = ref([]);
const pinCodeInputs: Ref<HTMLInputElement[]> = useTemplateRef('pin-code-input');
const pinCodeInputs = useTemplateRef<HTMLInputElement[]>('pin-code-input');
const finalPinCode = computed<string>(() => {
let ret = '';
+1 -1
View File
@@ -69,7 +69,7 @@ const icons = {
checked: mdiCheck
};
const dropdownMenu: Ref<HTMLElement | null> = useTemplateRef('dropdownMenu');
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
const itemPerRow: Ref<number> = ref(props.columnCount || 7);
const allColorRows = computed<ColorInfo[][]>(() => {
+1 -1
View File
@@ -67,7 +67,7 @@ const icons = {
checked: mdiCheck
};
const dropdownMenu: Ref<HTMLElement | null> = useTemplateRef('dropdownMenu');
const dropdownMenu = useTemplateRef<HTMLElement>('dropdownMenu');
const itemPerRow: Ref<number> = ref(props.columnCount || 7);
const allIconRows = computed<IconInfoWithId[][]>(() => {
+1 -1
View File
@@ -43,7 +43,7 @@ const emit = defineEmits<{
(e: 'info:copied'): void
}>();
const iconCopyToClipboard: Ref<unknown> = useTemplateRef('copyToClipboardIcon');
const iconCopyToClipboard = useTemplateRef('copyToClipboardIcon');
let clipboardHolder: ClipboardHolder | null = null;