
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@das-fed/mframe
Advanced tools
总体接入步骤
完成以上步骤即可完成接入。
pnpm add @das-fed/mframe
原应用的mian.ts代码最小化代码假设如下:
import { createApp } from 'vue'
import { router } from './router'
import App from './App.vue'
const app = createApp(App)
app.use(router)
app.mount('#app')
需要改为:
import { createApp } from 'vue'
import { router } from './router'
import App from './App.vue'
import { createMicroApp } from '@das-fed/mframe' // 引入框架依赖
const app = createApp(App)
app.use(router)
// 使用mframe创建子应用,并修改原spa应用的挂载点
createMicroApp().then(res=>{
app.mount(res.mountDom!)
})
建设中...
建设中...
总体接入步骤
完成以上步骤即可完成接入。
pnpm add @das-fed/mframe
原应用的mian.ts代码最小化代码假设如下:
import { createApp } from 'vue'
import { router } from './router'
import App from './App.vue'
const app = createApp(App)
app.use(router)
app.mount('#app')
需要改为:
import { createApp, h, render } from 'vue'
import { router } from './router'
import App from './App.vue'
import { createMicroApp } from '@das-fed/mframe' // 引入框架依赖
import Nav from './layout-components/nav.vue' // 引入布局组件中的顶部导航组件
import Menu from './layout-components/menu.vue' // 引入布局组件中的左侧菜单组件
import Tab from './layout-components/tab.vue' // 引入布局组件中的标签栏组件
const app = createApp(App)
app.use(router)
// 使用mframe创建子应用,并修改原spa应用的挂载点
createMicroApp({
// 子应用列表
microApps: [
{
name: 'app1',
origin: 'http://localhost:5174',
activeRule: '/micro-app-1/*',
},
{
name: 'app2',
origin: 'http://localhost:5175',
activeRule: '/micro-app-2/*',
router: { mode: 'hash' },
},
],
}).then(res => {
const { mountDom, navDom, menuDom, tabDom } = res
app.mount(res.mountDom!) // 修改应用的挂载点
render(h(Nav), navDom!) // 修改布局组件中的顶部导航组件的挂载点
render(h(Menu), menuDom!) // 修改布局组件中的左侧菜单组件的挂载点
render(h(Tab), tabDom!) // 修改布局组件中的标签栏组件的挂载点
})
建设中...
建设中...
建设中...
建设中...
FAQs
总体接入步骤 1. 安装@das-fed/mframe 2. 修改单页应用的挂载点
We found that @das-fed/mframe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.