张恒

更新依赖,添加了错误抓取,更换了开启加载框

......@@ -4187,9 +4187,9 @@
"dev": true
},
"css-loader": {
"version": "3.4.0",
"resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.4.0.tgz",
"integrity": "sha1-n7JjQ2eDEXpB0BTkXo6uulTdZnA=",
"version": "3.4.1",
"resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.4.1.tgz?cache=0&sync_timestamp=1578065938051&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.4.1.tgz",
"integrity": "sha1-37eWiqm/+ya9IDda/f/nfVojS3c=",
"dev": true,
"requires": {
"camelcase": "^5.3.1",
......
......@@ -73,6 +73,7 @@
"date-fns": "^2.8.1",
"electron-updater": "^4.2.0",
"element-ui": "^2.13.0",
"fs-extra": "^8.1.0",
"js-cookie": "^2.2.1",
"nedb": "^1.8.0",
"nprogress": "^0.2.0",
......@@ -114,7 +115,7 @@
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.1",
"cross-env": "^6.0.3",
"css-loader": "^3.4.0",
"css-loader": "^3.4.1",
"del": "^5.1.0",
"electron": "^7.1.7",
"electron-builder": "^21.2.0",
......
......@@ -70,6 +70,7 @@ function createMainWindow () {
.catch(err => console.log('Unable to install `vue-devtools`: \n', err))
loadWindow.destroy()
})
mainWindow.webContents.openDevTools(true)
} else {
mainWindow.webContents.once('dom-ready', () => {
mainWindow.show()
......@@ -87,7 +88,7 @@ function loadindWindow () {
width: 400,
height: 600,
frame: false,
backgroundColor: '#222428',
backgroundColor: '#222',
transparent: true,
webPreferences: { experimentalFeatures: true }
})
......
......@@ -91,6 +91,7 @@ export default {
},
// 获取数据库的数据
getdata() {
console.log(ne)
this.$db
.finddata()
.then(res => {
......
import Vue from 'vue'
Vue.config.errorHandler = function (err, vm, info) {
Vue.nextTick(() => {
if (process.env.NODE_ENV === 'development') {
console.group('%c >>>>>> 错误信息 >>>>>>', 'color:red')
console.log(`%c ${info}`, 'color:blue')
console.groupEnd()
console.group('%c >>>>>> 发生错误的Vue 实例对象 >>>>>>', 'color:green')
console.log(vm)
console.groupEnd()
console.group('%c >>>>>> 发生错误的原因及位置 >>>>>>', 'color:red')
console.error(err)
console.groupEnd()
}
})
}
......@@ -9,7 +9,8 @@ import db from './api/operationalData'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './permission'
// 日志
import './error'
import './icons'
import '@/styles/index.scss'
......
......@@ -13,7 +13,6 @@
}
html body {
/* on the windows it's con't use l don't why */
background-size: 163px;
font: 14px/21px Monaco, sans-serif;
color: #999;
......@@ -27,89 +26,86 @@
margin: 0px;
}
html body a,
html body a:visited {
text-decoration: none;
color: #FF805F;
}
html body h4 {
margin: 0;
color: #666;
}
.scene {
width: 100%;
height: 100%;
-webkit-perspective: 600;
perspective: 600;
display: flex;
align-items: center;
justify-content: center;
align-items: center;
height: 100%;
background: #222;
position: relative;
}
.scene svg {
width: 240px;
height: 240px;
.loader {
position: relative;
width: 15em;
height: 15em;
background: linear-gradient(-225deg, #ff3cac 0%, #562b7c 52%, #2b86c5 100%);
border-radius: 50%;
animation: spin 0.5s linear infinite;
}
.dc-logo {
position: fixed;
right: 10px;
bottom: 10px;
span {
position: absolute;
width: 100%;
height: 100%;
border-radius: inherit;
background: inherit;
}
.dc-logo:hover svg {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: arrow-spin 2.5s 0s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
animation: arrow-spin 2.5s 0s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
span:nth-child(1) {
filter: blur(5px);
}
.dc-logo:hover:hover:before {
content: '\2764';
padding: 6px;
font: 10px/1 Monaco, sans-serif;
font-size: 10px;
color: #00fffe;
text-transform: uppercase;
span:nth-child(2) {
filter: blur(10px);
}
span:nth-child(3) {
filter: blur(25px);
}
span:nth-child(4) {
filter: blur(50px);
}
span::after {
position: absolute;
left: -70px;
top: -30px;
white-space: nowrap;
z-index: 20px;
box-shadow: 0px 0px 4px #222;
background: rgba(0, 0, 0, 0.4);
content: "";
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
background: #222;
border-radius: inherit;
}
.dc-logo:hover:hover:after {
content: 'Digital Craft';
padding: 6px;
font: 10px/1 Monaco, sans-serif;
font-size: 10px;
color: #6E6F71;
text-transform: uppercase;
.text {
position: absolute;
right: 0;
top: -30px;
white-space: nowrap;
z-index: 20px;
box-shadow: 0px 0px 4px #222;
background: rgba(0, 0, 0, 0.4);
background-image: none;
opacity: 0;
animation: breath 3s ease-in-out infinite;
}
@-webkit-keyframes arrow-spin {
@keyframes breath {
from {
opacity: 0.05;
}
50% {
-webkit-transform: rotateY(360deg);
transform: rotateY(360deg);
opacity: 1;
}
to {
opacity: 0.05;
}
}
@keyframes arrow-spin {
50% {
-webkit-transform: rotateY(360deg);
transform: rotateY(360deg);
@keyframes spin {
to {
transform: rotate(1turn);
}
}
</style>
......@@ -117,35 +113,13 @@
<body>
<div class="scene">
<svg version="1.1" id="dc-spinner" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width:"38" height:"38"
viewBox="0 0 38 38" preserveAspectRatio="xMinYMin meet">
<text x="13" y="21" font-family="Monaco" font-size="2px" style="letter-spacing:0.6" fill="grey">准备资源中...
<animate attributeName="opacity" values="0;1;0" dur="1.8s" repeatCount="indefinite" />
</text>
<path fill="#373a42" d="M20,35c-8.271,0-15-6.729-15-15S11.729,5,20,5s15,6.729,15,15S28.271,35,20,35z M20,5.203
C11.841,5.203,5.203,11.841,5.203,20c0,8.159,6.638,14.797,14.797,14.797S34.797,28.159,34.797,20
C34.797,11.841,28.159,5.203,20,5.203z">
</path>
<path fill="#373a42" d="M20,33.125c-7.237,0-13.125-5.888-13.125-13.125S12.763,6.875,20,6.875S33.125,12.763,33.125,20
S27.237,33.125,20,33.125z M20,7.078C12.875,7.078,7.078,12.875,7.078,20c0,7.125,5.797,12.922,12.922,12.922
S32.922,27.125,32.922,20C32.922,12.875,27.125,7.078,20,7.078z">
</path>
<path fill="#2AA198" stroke="#2AA198" stroke-width="0.6027" stroke-miterlimit="10"
d="M5.203,20
c0-8.159,6.638-14.797,14.797-14.797V5C11.729,5,5,11.729,5,20s6.729,15,15,15v-0.203C11.841,34.797,5.203,28.159,5.203,20z">
<animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" calcMode="spline"
keySplines="0.4, 0, 0.2, 1" keyTimes="0;1" dur="2s" repeatCount="indefinite" />
</path>
<path fill="#859900" stroke="#859900" stroke-width="0.2027" stroke-miterlimit="10" d="M7.078,20
c0-7.125,5.797-12.922,12.922-12.922V6.875C12.763,6.875,6.875,12.763,6.875,20S12.763,33.125,20,33.125v-0.203
C12.875,32.922,7.078,27.125,7.078,20z">
<animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1.8s"
repeatCount="indefinite" />
</path>
</svg>
<div class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="text">正在准备资源中...</div>
</div>
</body>
......