diff --git a/dev/children/vue3/babel.config.js b/dev/children/vue3/babel.config.js index e9558405f..137da8795 100644 --- a/dev/children/vue3/babel.config.js +++ b/dev/children/vue3/babel.config.js @@ -1,5 +1,8 @@ module.exports = { presets: [ '@vue/cli-plugin-babel/preset' + ], + plugins: [ + '@babel/plugin-proposal-optional-chaining', ] } diff --git a/dev/children/vue3/package.json b/dev/children/vue3/package.json index 56199bb6e..0669f943f 100644 --- a/dev/children/vue3/package.json +++ b/dev/children/vue3/package.json @@ -9,11 +9,12 @@ }, "dependencies": { "core-js": "^3.6.5", - "element-plus": "^1.3.0-beta.1", + "element-plus": "^1.3.0-beta.7", "vue": "^3.2.26", "vue-router": "^4.0.12" }, "devDependencies": { + "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@vue/cli-plugin-babel": "^4.5.0", "@vue/cli-plugin-eslint": "^4.5.0", "@vue/cli-service": "^4.5.0", diff --git a/dev/children/vue3/src/App.vue b/dev/children/vue3/src/App.vue index dfea5e1c6..47f0bfd3d 100644 --- a/dev/children/vue3/src/App.vue +++ b/dev/children/vue3/src/App.vue @@ -5,7 +5,6 @@ diff --git a/dev/children/vue3/vue.config.js b/dev/children/vue3/vue.config.js index 41dff8c21..93f0dd631 100644 --- a/dev/children/vue3/vue.config.js +++ b/dev/children/vue3/vue.config.js @@ -30,4 +30,5 @@ module.exports = { ] } }, + transpileDependencies: ['element-plus'], // 解决element-plus使用 ?. 操作符导致启动失败的问题 } diff --git a/dev/children/vue3/yarn.lock b/dev/children/vue3/yarn.lock index 5478b8444..a3aab7a84 100644 --- a/dev/children/vue3/yarn.lock +++ b/dev/children/vue3/yarn.lock @@ -928,10 +928,10 @@ resolved "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz#c3c5ae543c897caa9c2a68630bed355be5f9990f" integrity sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ== -"@element-plus/icons-vue@^0.2.4": - version "0.2.4" - resolved "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.4.tgz#dadcf72f0cea53dc83b7b7db80e1418716d7b02c" - integrity sha512-RsJNyL58rwxtsjeMy34o8txkL6UlME1stWsUlRpTac6UE9Bx9gdJvnDXbIKhOJqBLX17fBjmposdrn6VTqim2w== +"@element-plus/icons-vue@^0.2.6": + version "0.2.6" + resolved "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.6.tgz#28e48aa4abd5b02638b41c1d95a6e7f96bb23308" + integrity sha512-2gg7VCq4d2firgl7/aVym4Cx/wqKFwKybEQGJiiWJN4urW36+QdAEG1knqSD9qidbjhVp0Jnc9XdSTR1/4Whzw== "@hapi/address@2.x.x": version "2.1.4" @@ -987,7 +987,7 @@ resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@popperjs/core@^2.10.2": +"@popperjs/core@^2.11.2": version "2.11.2" resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz#830beaec4b4091a9e9398ac50f865ddea52186b9" integrity sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA== @@ -1532,18 +1532,18 @@ resolved "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz#b6b40a7625429d2bd7c2281ddba601ed05dc7f1a" integrity sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA== -"@vueuse/core@^7.3.0": - version "7.5.3" - resolved "https://registry.npmjs.org/@vueuse/core/-/core-7.5.3.tgz#7e8ea430a293670f12e5052a5285cb4ef8e9c758" - integrity sha512-D9j5ymHFMFRXQqCp0yZJkf/bvBGiz0MrKUa364p+L8dMyd5zyq2K1JmHyvoBd4xbTFRfmQ1h878u6YE5LCkDVQ== +"@vueuse/core@^7.5.4": + version "7.5.4" + resolved "https://registry.npmjs.org/@vueuse/core/-/core-7.5.4.tgz#c515c6795f1b8ab9a50e62e2f1aa75aac5f1ca14" + integrity sha512-PKmyHN2lZuttGgKmsoMMqiSojSYYKraszilP0gpQIGcLt2YoLABaG3VFjdPs2tY6DM+HG3o70HuzOMEQCY8fqQ== dependencies: - "@vueuse/shared" "7.5.3" + "@vueuse/shared" "7.5.4" vue-demi "*" -"@vueuse/shared@7.5.3": - version "7.5.3" - resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-7.5.3.tgz#2a844f38e45b1002e14d8f0ab5b41221c4fb9b09" - integrity sha512-BJ71cxHN5VByW1S58Gl85NFJaQu93F7Vs7K/MuAKsIIuHm9PBbkR5Vxkg9ko9cBdiKVt+FNoo13BhdbA+Vwycg== +"@vueuse/shared@7.5.4": + version "7.5.4" + resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-7.5.4.tgz#4285e5c47fe5f2d608f115bf2aa26154f474e881" + integrity sha512-750RnGUEgg1+K4jGVkv7M5UOStAa/IjAInV6BugyBOvRYL2l1lcIDUi4V/qIKTlhd2oUAByCEnlqIpFD2a3tfw== dependencies: vue-demi "*" @@ -3437,15 +3437,15 @@ electron-to-chromium@^1.4.17: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.38.tgz#10ea58d73d36b13e78d5024f3b74a352d3958d01" integrity sha512-WhHt3sZazKj0KK/UpgsbGQnUUoFeAHVishzHFExMxagpZgjiGYSC9S0ZlbhCfSH2L2i+2A1yyqOIliTctMx7KQ== -element-plus@^1.3.0-beta.1: - version "1.3.0-beta.3" - resolved "https://registry.npmjs.org/element-plus/-/element-plus-1.3.0-beta.3.tgz#db98a4483098d2e9889eab27cb1146413cbf14cb" - integrity sha512-OeSAfuXpZJAdakC9hsQkcBrQEib+uVzzTZ52EiZZxQ1ArktxdfONkQyZ/KTR20pfr+3gla2guhWseg60md1sLA== +element-plus@^1.3.0-beta.7: + version "1.3.0-beta.7" + resolved "https://registry.npmjs.org/element-plus/-/element-plus-1.3.0-beta.7.tgz#8c589d5f6e945dc36181571cacd617f93d93f8f5" + integrity sha512-zrkw0OqhJG70oA+O796HK0IU1KSHboQbHcSeQVqhWLxmv/rEHOzEAcRKKeOACQFoJY/EU7CKJVjlV+Gaww1ccA== dependencies: "@ctrl/tinycolor" "^3.4.0" - "@element-plus/icons-vue" "^0.2.4" - "@popperjs/core" "^2.10.2" - "@vueuse/core" "^7.3.0" + "@element-plus/icons-vue" "^0.2.6" + "@popperjs/core" "^2.11.2" + "@vueuse/core" "^7.5.4" async-validator "^4.0.7" dayjs "^1.10.7" lodash "^4.17.21" diff --git a/docs/zh-cn/jump.md b/docs/zh-cn/jump.md index e7a5924b3..e18262e87 100644 --- a/docs/zh-cn/jump.md +++ b/docs/zh-cn/jump.md @@ -1,5 +1,5 @@ -每个应用的路由实例都是不同的,应用的路由实例只能控制自身,无法影响其它应用,包括基座应用无法通过控制自身路由影响到子应。 +每个应用的路由实例都是不同的,应用的路由实例只能控制自身,无法影响其它应用,包括基座应用无法通过控制自身路由影响到子应用。 > 常见的问题如:开发者想通过基座应用的侧边栏跳转,从而控制子应用的页面,这其实是做不到的,只有子应用的路由实例可以控制自身的页面。 diff --git a/src/prefetch.ts b/src/prefetch.ts index 7ce3274c2..e0e0e954a 100644 --- a/src/prefetch.ts +++ b/src/prefetch.ts @@ -86,6 +86,7 @@ export function getGlobalAssets (assets: globalAssetsType): void { } } +// TODO: requestIdleCallback for every file function fetchGlobalResources (resources:string[] | undefined, suffix:string, cache:Map) { if (isArray(resources)) { const effectiveResource = resources!.filter((path) => isString(path) && path.includes(`.${suffix}`) && !cache.has(path))