Commit 2b9a89d2 by xinla

--no commit message

1 parent ab5a390a
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
</template> </template>
<script> <script>
import { registerMicroApps, start } from 'qiankun' // import { registerMicroApps, start } from 'qiankun'
export default { export default {
name: 'AppMain', name: 'AppMain',
data() { data() {
...@@ -50,32 +50,32 @@ export default { ...@@ -50,32 +50,32 @@ export default {
// }, // },
}, },
mounted() { mounted() {
if (window.lwConfig.MICRO_APPS && window.lwConfig.MICRO_APPS.store) { // if (window.lwConfig.MICRO_APPS && window.lwConfig.MICRO_APPS.store) {
// window.Vue2 = window.Vue // // window.Vue2 = window.Vue
// delete window.Vue // // delete window.Vue
window.lwConfig.MICRO_APPS.store.loader = (loading) => (this.loading = loading) // window.lwConfig.MICRO_APPS.store.loader = (loading) => (this.loading = loading)
registerMicroApps([window.lwConfig.MICRO_APPS.store], { // registerMicroApps([window.lwConfig.MICRO_APPS.store], {
beforeLoad: () => (this.isActiveMicroApp = true), // beforeLoad: () => (this.isActiveMicroApp = true),
afterUnmount: () => (this.isActiveMicroApp = false), // afterUnmount: () => (this.isActiveMicroApp = false),
}) // })
start({ // start({
sandbox: { experimentalStyleIsolation: true }, // sandbox: { experimentalStyleIsolation: true },
}) // })
// 挂在window供下面微服务使用 // // 挂在window供下面微服务使用
window.lwConfig.$store = { // window.lwConfig.$store = {
dispatch: (_, s) => { // dispatch: (_, s) => {
this.$store.setBusininessDesc(s) // this.$store.setBusininessDesc(s)
}, // },
} // }
// 初始化 state // // 初始化 state
// const actions = initGlobalState({ token: getToken() }) // // const actions = initGlobalState({ token: getToken() })
// actions.onGlobalStateChange((state, prev) => { // // actions.onGlobalStateChange((state, prev) => {
// // state: 变更后的状态; prev 变更前的状态 // // // state: 变更后的状态; prev 变更前的状态
// }); // // });
// actions.setGlobalState(state) // // actions.setGlobalState(state)
} // }
// if (window.lwConfig.MICRO_APPS) { // if (window.lwConfig.MICRO_APPS) {
// import('qiankun').then(({ registerMicroApps, start }) => { // import('qiankun').then(({ registerMicroApps, start }) => {
// registerMicroApps(window.lwConfig.MICRO_APPS) // registerMicroApps(window.lwConfig.MICRO_APPS)
......
// RSA加密 // RSA加密
import JSEncrypt from 'jsencrypt/bin/jsencrypt.js' // import JSEncrypt from 'jsencrypt/bin/jsencrypt.js'
import JSEncrypt from 'jsencrypt'
// 密钥对生成 http://web.chacuo.net/netrsakeypair // 密钥对生成 http://web.chacuo.net/netrsakeypair
......
...@@ -227,11 +227,11 @@ export default defineConfig(async ({ command, mode }) => { ...@@ -227,11 +227,11 @@ export default defineConfig(async ({ command, mode }) => {
// version: '2.1.0', // version: '2.1.0',
// path: 'dist/index.iife.min.js', // path: 'dist/index.iife.min.js',
// }, // },
// { {
// name: 'ali-oss', name: 'ali-oss',
// var: 'OSS', var: 'OSS',
// path: 'http://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js', path: 'https://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js',
// }, },
], ],
}), }),
rollupPluginVisualizer({ rollupPluginVisualizer({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!