修复问题
This commit is contained in:
@@ -3,6 +3,21 @@
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<script setup lang="ts">
|
||||
import { onUnmounted } from "vue"
|
||||
import { Modal } from "@arco-design/web-vue"
|
||||
const storageEvent = function (e: StorageEvent) {
|
||||
if (e.key === "token") {
|
||||
Modal.warning({
|
||||
title: "警告消息",
|
||||
content: "登录用户在其他窗口发生改变,正在刷新浏览器"
|
||||
})
|
||||
}
|
||||
}
|
||||
window.addEventListener("storage", storageEvent)
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener("storage", storageEvent)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user