提交 3510816c 作者: 陈楚尹

upd: 更新降水

上级 5f26a564
......@@ -81,6 +81,7 @@
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3080320230523001",
"@dcloudio/uni-ui": "^1.4.27",
"@faker-js/faker": "^8.0.2",
"@turf/turf": "^6.5.0",
"@types/mapbox-gl": "^2.7.11",
"@vue/runtime-core": "~3.2.47",
"@vueuse/core": "^10.1.2",
......@@ -92,6 +93,7 @@
"mapbox-gl-controls": "^2.3.5",
"nanoid": "^4.0.2",
"pinia": "~2.0.36",
"pnpm": "8.6.7",
"qs": "~6.9.7",
"stompjs": "^2.3.3",
"urijs": "^1.19.11",
......
......@@ -12,5 +12,6 @@
<template>
<view class="bg h-100vh">
<CustomPicker />
<Map />
</view>
</template>
export function appendStylesheet(id: string, href: string) {
return new Promise((resolve, reject) => {
const element = document.getElementById(id) as HTMLLinkElement
if (element && element.href === href) {
resolve(0)
return
}
const link = document.createElement('link')
link.id = id
link.rel = 'stylesheet'
link.href = href
link.onload = resolve
link.onerror = link.onabort = reject
document.head.appendChild(link)
})
}
export function appendScript(id: string, src: string) {
return new Promise((resolve, reject) => {
const element = document.getElementById(id) as HTMLScriptElement
if (element && element.src === src) {
resolve(0)
return
}
const script = document.createElement('script')
script.id = id
script.src = src
script.onload = resolve
script.onerror = script.onabort = reject
document.head.appendChild(script)
})
}
export function removeChild(id: string) {
const child = document.getElementById(id)
if (child) {
child.parentNode.removeChild(child)
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论