| | |
| | | import Print from "vue-print-nb"; |
| | | |
| | | import JsonExcel from "vue-json-excel"; |
| | | |
| | | import '@/utils/rem.js'; //在main.js中引入rem.js |
| | | Vue.component("downloadExcel", JsonExcel); |
| | | |
| | | import "./assets/icons"; // icon |
| | |
| | | // 分页组件 |
| | | import Pagination from "@/components/Pagination"; |
| | | // 分页组件 |
| | | |
| | | import { monitorZoom } from "@/utils/devicePixelRatio.js"; |
| | | const m = monitorZoom(); |
| | | if (window.screen.width * window.devicePixelRatio >= 3840) { |
| | | document.body.style.zoom = 100 / (Number(m) / 2); // 屏幕为 4k 时 |
| | | } else { |
| | | document.body.style.zoom = 100 / Number(m); |
| | | } |
| | | |
| | | // 自定义表格工具组件 |
| | | import RightToolbar from "@/components/RightToolbar"; |
| | |
| | | |
| | | Vue.config.productionTip = false; |
| | | |
| | | let lastVersion = localStorage.getItem('appVersion'); |
| | | const checkVersion = async () => { |
| | | const res = await axios.get('/api/version'); // 返回当前版本号 |
| | | if (res.data.version !== lastVersion) { |
| | | localStorage.setItem('appVersion', res.data.version); |
| | | // ElMessageBox.confirm('检测到新版本,是否刷新?', '提示', { |
| | | // confirmButtonText: '刷新', |
| | | // }).then(() => { |
| | | window.location.reload(true); // 强制刷新 |
| | | // }); |
| | | } |
| | | }; |
| | | |
| | | // 定时检查(如每小时一次) |
| | | setInterval(checkVersion, 60 * 60 * 1000); |
| | | |
| | | new Vue({ |
| | | el: "#app", |
| | | router, |