NIO-DOP-CLI-SERVICE
NIOhome Do-Portal项目组
功能
-
接入
NIO-DOP
系统的公用组件- 左侧树形菜单
- 收缩侧边栏
- 面包屑导航
- Tag标签导航
- 全屏/退出全屏
- 消息中心
- 个人中心
-
暴露的API
- Main公用组件
- UserAuth认证方法
- Store全局数据
在NIO-DOP-CLI
脚手架中使用方法(接入系统改变了目录结构请自行按需更改)
// ~src/components/main/index.js
import { Main } from 'dop-cli-service'
export default Main
// ~src/router/router.js
import Main from '@/components/main'
...
{
path: '/foo',
name: 'bar',
meta: {
...
},
component: Main,
...
}
...
// ~src/main.js
import { UserAuth } from 'dop-cli-service'
UserAuth(`Your AssetsPath e.g. ${process.env.VUE_APP_ASSETSPATH}`).then( (routes) => {
new Vue({
el: '#app',
router: router(routes),
store,
render: h => h(App)
})
})
// ~src/store/index.js
import { storeApp as app } from 'dop-cli-temp-v1'
...
modules: {
user,
app
}
...