Optimize Import

This commit is contained in:
MengYX
2020-02-11 14:48:27 +08:00
parent 08553884ab
commit 5171872ec9
8 changed files with 33 additions and 50 deletions

View File

@@ -10,6 +10,7 @@
</el-image>
</template>
</el-table-column>
<!--todo: Check sortable-->
<el-table-column label="歌曲" sortable>
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.title }}</span>

View File

@@ -27,10 +27,10 @@
},
mounted() {
if (document.location.host !== "" && process.env.NODE_ENV === 'production') {
//todo: Fail on Hot Reload
const worker = require("workerize-loader!../decrypt/common");
this.thread_num = navigator.hardwareConcurrency || 1;
for (let i = 0; i < this.thread_num; i++) {
//todo: Optimize for first loading
// noinspection JSValidateTypes,JSUnresolvedVariable
this.workers.push(worker().CommonDecrypt);
this.idle_workers.push(i);