fix: 1.取消歌单懒加载 2.修改vite打包时chunk文件命名规则
This commit is contained in:
1 parent
53ab0ad45b
commit
9611e9f4ed
2 files changed
+72
-68
No files matched your search
@@ -2,8 +2,8 @@
|
||||
<ol :style="{ maxHeight: ap.options.listMaxHeight }" :key="refreshKey" ref="ol">
|
||||
<VueDraggable v-model="ap.list.audios" @start="onDragStart" @end="onDragEnd" item-key="id"
|
||||
handle=".aplayer-list-control-btn-reorder" ghostClass="iSDragging" :animation="150">
|
||||
<miaoLazyDiv v-for="(element, index) in ap.list.audios" :min-height="'32px'" auto-height>
|
||||
<li :class="activeAudioIndex == index ? 'aplayer-list-light' : ''" class="aplayer-list-new"
|
||||
<!-- <miaoLazyDiv :min-height="'32px'" auto-height> -->
|
||||
<li v-for="(element, index) in ap.list.audios" :class="activeAudioIndex == index ? 'aplayer-list-light' : ''" class="aplayer-list-new"
|
||||
:key="element.id">
|
||||
<span class="aplayer-list-cur" :style="{ backgroundColor: apTheme }"></span>
|
||||
<span class="aplayer-list-index">{{ index + 1 }}</span>
|
||||
@@ -34,7 +34,7 @@
|
||||
<span class="aplayer-list-author" v-show="element.artist !== 'Audio artist1'">{{ element.artist
|
||||
}}</span>
|
||||
</li>
|
||||
</miaoLazyDiv>
|
||||
<!-- </miaoLazyDiv> -->
|
||||
</VueDraggable>
|
||||
</ol>
|
||||
</template>
|
||||
@@ -43,7 +43,8 @@
|
||||
import { computed, nextTick, onMounted, ref } from 'vue';
|
||||
import { ChevronUpOutline, ChevronDownOutline, CloseOutline, ReorderFourOutline, PlayOutline, HeartOutline } from '@vicons/ionicons5';
|
||||
import { VueDraggable } from 'vue-draggable-plus'
|
||||
import miaoLazyDiv from '@/components/miaoLazyDiv.vue';
|
||||
// 与vue-draggable冲突
|
||||
// import miaoLazyDiv from '@/components/miaoLazyDiv.vue';
|
||||
import apType, { audioType } from '../types/ap';
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
+67
-64
@@ -5,69 +5,72 @@ import { resolve } from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: "./",
|
||||
plugins: [
|
||||
vue()
|
||||
// viteSingleFile()
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(__dirname, "src")
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/get": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/get/, "/get")
|
||||
},
|
||||
base: './',
|
||||
plugins: [
|
||||
vue()
|
||||
// viteSingleFile()
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src')
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/get': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/get/, '/get')
|
||||
},
|
||||
|
||||
"/upload": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/upload/, "/upload")
|
||||
},
|
||||
'/upload': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/upload/, '/upload')
|
||||
},
|
||||
|
||||
"/delete": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/delete/, "/delete")
|
||||
},
|
||||
"/query": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/query/, "/query")
|
||||
},
|
||||
"/rename": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/rename/, "/rename")
|
||||
},
|
||||
"/cut": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/cut/, "/cut")
|
||||
},
|
||||
"/mkdir": {
|
||||
target: "http://127.0.0.1:17705",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/mkdir/, "/mkdir")
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: "index.html"
|
||||
},
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes("export.ts") && id.includes('plugins')) {
|
||||
return "pluginExports";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
'/delete': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/delete/, '/delete')
|
||||
},
|
||||
'/query': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/query/, '/query')
|
||||
},
|
||||
'/rename': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/rename/, '/rename')
|
||||
},
|
||||
'/cut': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/cut/, '/cut')
|
||||
},
|
||||
'/mkdir': {
|
||||
target: 'http://127.0.0.1:17705',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/mkdir/, '/mkdir')
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: 'index.html'
|
||||
},
|
||||
output: {
|
||||
entryFileNames: 'assets/[name]-[hash].js',
|
||||
chunkFileNames: 'assets/chunk-[name]-[hash].js',
|
||||
assetFileNames: 'assets/[name]-[hash][extname]',
|
||||
manualChunks(id) {
|
||||
if (id.includes('export.ts') && id.includes('plugins')) {
|
||||
return 'pluginExports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user