- 新增styles/transitions.css: 错误shake/按钮状态/弹窗过渡/骨架屏淡入(带prefers-reduced-motion) - 新增CountUp.vue: KPI数字滚动组件(easeOutCubic+千分位+闪烁提示) - Dashboard: CEO/IT视图摘要卡片接入CountUp - main.ts引入全局动效
28 lines
910 B
TypeScript
28 lines
910 B
TypeScript
import { createApp } from 'vue'
|
|
import ElementPlus from 'element-plus'
|
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
import { createPinia } from 'pinia'
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import './style.css'
|
|
import './styles/transitions.css'
|
|
|
|
const app = createApp(App)
|
|
|
|
const usedIcons = ['Monitor', 'Document', 'TrendCharts', 'WarningFilled', 'Connection', 'User', 'Bell', 'Menu', 'Setting', 'Expand', 'Fold', 'UploadFilled']
|
|
for (const key of usedIcons) {
|
|
const component = (ElementPlusIconsVue as any)[key]
|
|
if (component) app.component(key, component)
|
|
}
|
|
|
|
app.use(ElementPlus, { locale: zhCn })
|
|
app.use(createPinia())
|
|
app.use(router)
|
|
|
|
// 应用挂载后立即清理可能残留的弹窗遮罩
|
|
app.mount('#app')
|
|
setTimeout(() => {
|
|
document.querySelectorAll('.el-overlay').forEach(el => el.remove())
|
|
}, 200)
|