<template>
|
<div id="app">
|
<router-view></router-view>
|
</div>
|
</template>
|
<script>
|
export default {
|
name: "App",
|
mounted(){
|
function checkIE(){
|
return '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style
|
}
|
if (checkIE()) {
|
window.addEventListener('hashchange', () => {
|
var currentPath = window.location.hash.slice(1);
|
if (this.$route.path !== currentPath) {
|
this.$router.push(currentPath)
|
}
|
}, false)
|
}
|
}
|
};
|
</script>
|
<style lang="less">
|
@import './assets/styles/theme.css';
|
|
html {
|
height: 100%;
|
font-size: 14px;
|
|
body {
|
padding: 0;
|
margin: 0;
|
height: 100%;
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
background-color: var(--bg-secondary);
|
color: var(--text-primary);
|
line-height: 1.5715;
|
|
#app {
|
height: 100%;
|
}
|
}
|
}
|
|
/* 全局Element UI样式优化 */
|
.el-button {
|
border-radius: var(--radius-md);
|
font-weight: 500;
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
&:hover {
|
transform: translateY(-1px);
|
box-shadow: var(--shadow-md);
|
}
|
}
|
|
.el-input__inner {
|
border-radius: var(--radius-md);
|
border: 1px solid var(--border-color);
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
&:focus {
|
border-color: var(--primary-color);
|
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
}
|
}
|
|
.el-table {
|
border-radius: var(--radius-lg);
|
overflow: hidden;
|
|
.el-table__header th {
|
background: var(--bg-tertiary);
|
color: var(--text-primary);
|
font-weight: 600;
|
}
|
|
.el-table__row:hover {
|
background: rgba(24, 144, 255, 0.04);
|
}
|
}
|
|
.el-card {
|
border-radius: var(--radius-lg);
|
box-shadow: var(--shadow-md);
|
border: 1px solid var(--border-light);
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
&:hover {
|
box-shadow: var(--shadow-lg);
|
transform: translateY(-2px);
|
}
|
}
|
|
.el-drawer {
|
.el-drawer__header {
|
margin-bottom: 0;
|
padding: var(--spacing-lg);
|
border-bottom: 1px solid var(--border-light);
|
background: var(--bg-primary);
|
}
|
|
.el-drawer__body {
|
padding: var(--spacing-lg);
|
background: var(--bg-secondary);
|
}
|
}
|
|
.el-dialog {
|
border-radius: var(--radius-lg);
|
overflow: hidden;
|
|
.el-dialog__header {
|
background: var(--bg-primary);
|
border-bottom: 1px solid var(--border-light);
|
padding: var(--spacing-lg);
|
}
|
|
.el-dialog__body {
|
background: var(--bg-secondary);
|
padding: var(--spacing-lg);
|
}
|
|
.el-dialog__footer {
|
background: var(--bg-primary);
|
border-top: 1px solid var(--border-light);
|
padding: var(--spacing-md) var(--spacing-lg);
|
}
|
}
|
|
/* 滚动条美化 */
|
::-webkit-scrollbar {
|
width: 6px;
|
height: 6px;
|
}
|
|
::-webkit-scrollbar-track {
|
background: var(--bg-tertiary);
|
border-radius: var(--radius-sm);
|
}
|
|
::-webkit-scrollbar-thumb {
|
background: var(--border-color);
|
border-radius: var(--radius-sm);
|
transition: background 0.3s ease;
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
background: var(--text-disabled);
|
}
|
|
/* 加载动画 */
|
.el-loading-mask {
|
background-color: rgba(255, 255, 255, 0.9);
|
backdrop-filter: blur(4px);
|
}
|
|
/* 消息提示优化 */
|
.el-message {
|
border-radius: var(--radius-md);
|
box-shadow: var(--shadow-lg);
|
border: none;
|
}
|
|
.el-notification {
|
border-radius: var(--radius-lg);
|
box-shadow: var(--shadow-xl);
|
border: 1px solid var(--border-light);
|
}
|
</style>
|