<template>
<div>
<div id="weather" ref="someElement"></div>
</div>
</template>
<script setup name="TianQi">
import { onMounted, ref } from 'vue'
const someElement = ref(null)
onMounted(() => {
let iframe = document.createElement('iframe')
iframe.setAttribute('frameborder', '0')
iframe.setAttribute('src', 'https://i.tianqi.com/?c=code&id=99')
someElement.value.appendChild(iframe)
})
</script>
<style>
#weather {
position: absolute;
top: 90px;
left: 730px;
width: 150px;
height: 40px;
background-color: #67c23aa2;
border-radius: 5px;
}
</style>