0.0.0-beta.9 • Published 1 year ago
@blueking/sub-saas v0.0.0-beta.9
SAAS Iframe 访问分主系统(iframe 嵌入方),子系统(被嵌入方)
子系统使用
// router.js
import { rootPath, connectToMain } from '@blueking/sub-saas'
import { createRouter, createWebHistory } from 'vue-router';
const routes = [
{
path: rootPath,
children: [
{
path: 'index',
component: () => import("@view/index/index.vue")
}
]
}
]
const appRouter = createRouter({
history: createWebHistory(),
routes,
});
connectToMain(appRouter)
// main.js
import { createApp } from 'vue'
import { subEnv } from '@blueking/sub-saas'
import App from './app.vue';
import IframeApp from './iframe-app.vue';
createApp(subEnv ? IframeApp : App)
.mount('#app');
主系统使用(SAAS url path 拼接 /sub/)
vue3
<template>
<SubSaas src="http://xxx.job.com/sub" />
</template>
<script setup>
import SubSaas from '@blueking/sub-saas/vue3'
</script>
vue2
<template>
<SubSaas src="http://xxx.job.com/sub" />
</template>
<script setup>
import SubSaas from '@blueking/sub-saas/vue2'
</script>
0.0.0-beta.9
1 year ago
0.0.0-beta.8
1 year ago
0.0.0-beta.7
1 year ago
0.0.0-beta.5
1 year ago
0.0.0-beta.6
1 year ago
0.0.0-beta.4
1 year ago
0.0.0-beta.3
1 year ago
0.0.0-beta.2
1 year ago
0.0.0-beta.1
1 year ago