You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import auth from '@websanova/vue-auth/dist/v2/vue-auth.esm.js'
import driverAuthBearer from '@websanova/vue-auth/dist/drivers/auth/bearer.esm.js'
import driverHttpAxios from '@websanova/vue-auth/dist/drivers/http/axios.1.x.esm.js'
import driverRouterVueRouter from '@websanova/vue-auth/dist/drivers/router/vue-router.2.x.esm.js'
import driverOAuth2Google from '@websanova/vue-auth/dist/drivers/oauth2/google.esm.js'
import driverOAuth2Facebook from '@websanova/vue-auth/dist/drivers/oauth2/facebook.esm.js'
config/plugin.js
`import Vue from 'vue'
import auth from '@websanova/vue-auth/dist/v2/vue-auth.esm.js'
import driverAuthBearer from '@websanova/vue-auth/dist/drivers/auth/bearer.esm.js'
import driverHttpAxios from '@websanova/vue-auth/dist/drivers/http/axios.1.x.esm.js'
import driverRouterVueRouter from '@websanova/vue-auth/dist/drivers/router/vue-router.2.x.esm.js'
import driverOAuth2Google from '@websanova/vue-auth/dist/drivers/oauth2/google.esm.js'
import driverOAuth2Facebook from '@websanova/vue-auth/dist/drivers/oauth2/facebook.esm.js'
driverOAuth2Google.params.client_id = '547886745924-4vrbhl09fr3t771drtupacct6f788566.apps.googleusercontent.com'
driverOAuth2Facebook.params.client_id = '196729390739201'
Vue.use(auth, {
plugins: {
http: Vue.axios, // Axios
// http: Vue.http, // Vue Resource
router: Vue.router
},
drivers: {
auth: driverAuthBearer,
http: driverHttpAxios,
router: driverRouterVueRouter,
oauth2: {
google: driverOAuth2Google,
facebook: driverOAuth2Facebook
}
},
options: {
rolesKey: 'type',
notFoundRedirect: { name: 'user-account' }
}
})
`
config/index.js
`import './plugins'
export default {}
`
main.js
`import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import http from './http'
import config from './config'
import '@/icons' // icon
import '@/permission' // permission control
/**
*/
if (process.env.NODE_ENV === 'production') {
const {mockXHR} = require('../mock')
mockXHR()
}
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
Vue.config.productionTip = false
new Vue({
el: '#app',
http: http,
store: store,
router: router,
config: config,
render: h => h(App)
})
`
The text was updated successfully, but these errors were encountered: