mgt-base
v1.2.9
Published
pc web base page
Readme
mgt-base
pc web base page
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# 使用方法
1. npm install mgt-base --save
2. main.js中 import mgtBase from 'mgt-base'
Vue.use(mgtBase)
3. 初始化组件:
①:初始页面结构组件
app.vue中或其他路由容器中
<init-page :sliders="sliders" userName="lmr">
<router-view />
</init-page>
props参数:
1. sliders【导航列表】注:path字段为路由路径 required: true(必须)
2. userName 登录后用户名 登录之前可不传 required: false(非必须)
例如:sliders: [
{
name: '首页',
child: [
{
name: '首页-1',
path: '/index-1'
},
{
name: '首页-2',
child: [
{
name: '首页-2-1',
path: '/index-2-2'
}
]
}
]
},
{
name: '用户',
child: [
{
name: '用户-1',
path: '/user-1'
}
]
},
{
name: '管理',
path: '/manage-1'
},
{
name: '数据',
path: '/data-1'
}
]
②:开发中:xxx组件For detailed explanation on how things work, consult the docs for vue-loader.
