2026-08-28 15:06:01 +08:00
|
|
|
import { createApp } from 'vue'
|
|
|
|
|
import ElementPlus from 'element-plus'
|
|
|
|
|
import 'element-plus/dist/index.css'
|
|
|
|
|
import App from './App.vue'
|
|
|
|
|
import router from './router'
|
2026-10-06 19:36:22 +08:00
|
|
|
import { touch } from './store/station'
|
|
|
|
|
|
|
|
|
|
// 滑动续签全局监听(修订需求):任何人工触屏行为(点击/触摸/键盘/滚轮/滚动)都触发续签。
|
|
|
|
|
// 捕获阶段监听,弹窗/遮罩/任何组件拦截不了;程序化行为(轮询、WS 保活、定时刷新)
|
|
|
|
|
// 不派发真实用户事件,不算触发。具体节流在 store.touch() 内部(本地立即 + Bearer 30 秒)。
|
|
|
|
|
const ACTIVITY_EVENTS = ['click', 'touchstart', 'keydown', 'wheel', 'scroll']
|
|
|
|
|
for (const evt of ACTIVITY_EVENTS) {
|
|
|
|
|
window.addEventListener(evt, () => touch(), { capture: true, passive: true })
|
|
|
|
|
}
|
2026-08-28 15:06:01 +08:00
|
|
|
|
|
|
|
|
createApp(App).use(router).use(ElementPlus).mount('#app')
|