在仓库制作打包脚本

This commit is contained in:
aixianling
2024-10-12 16:17:37 +08:00
parent a5e0f3a6c5
commit 043aaf8399
8 changed files with 42 additions and 40 deletions

View File

@@ -57,7 +57,7 @@ export default {
loadDvs() {
//新App的自动化格式
waiting.init({innerHTML: '应用加载中..'})
let apps = require.context('../../apps', true, /\.(\/.+)\/App[A-Z][^\/]+D[Vv]\.vue$/, "lazy")
let apps = require.context('../apps', true, /\.(\/.+)\/App[A-Z][^\/]+D[Vv]\.vue$/, "lazy")
return Promise.all(apps.keys().map(path => apps(path).then(file => {
if (file.default) {
let {name} = file.default

View File

@@ -22,7 +22,7 @@ export default {
useCopilot: () => !!configExtra?.copilot
},
created() {
import("../../apps/actions").then(extra => {
import("../apps/actions").then(extra => {
const actions = extra?.default || {}
this.$store.hotUpdate({actions})
Object.keys(actions)?.map(action => this.$store.dispatch(action))