1.0.0 • Published 3 years ago

xaas-fe v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

xaas-fe

后台管理系统前端基础框架

install

npm i xaas-fe -S

main.js

import Vue from 'vue'
// 覆盖默认路由
import appRoutes from './router'

import XaaSFE from 'xaas-fe'
window.appCode = 'test'
Vue.use(XaaSFE, { appRoutes, {setting: {}} })

自定义通用路由 ./router/index.js

import { commonRoute } from 'xaas-fe'

const routers = [
  commonRoute.login,
  commonRoute.ssoLogin,
  commonRoute.layout
]

export default routers

默认全局配置

可通过Vue.use(XaaSFE, { appRoutes, {setting: {}} }) 覆盖

  {
      clientId: 'saas',
      clientSecret: '123456',
      sessionName: 'XAAS_SESSION',
      baseURL: baseURL,
      authUrl: baseURL + '/auth-api',
      ucUrl: baseURL + '/uc-api',
      cfgUrl: baseURL + '/cfg-api',
      dictUrl,
      copyName: 'chirspan',
      copyRight: '2021 - ' + getYear(),
      copyContact: '',
      superAdminRole: 'ROLE_SUPER_ADMIN'
  }