@mercadoeletronico/meweb-module
ME-Web Nuxt.js Module.
6,439
| Install | |
|---|---|
npm install @mercadoeletronico/meweb-module |
|
| Latest Version: | 2.3.1 |
| Vue: | 2 |
| License: | Apache-2.0 |
| Last Updated: | Jun 22, 2020 |
| Links: | Repository · npm |
Maintainer: beccari
ME Web Nuxt.js Module
Integrated middleware with ME-WEB`s Microservices.
- ME-Toolkit
- ME Vuex Store
- Auth
- GA
- i18n
Getting Started
Nuxt.js module
Nuxt.js version 2.8.1 (or greater) is recommended.
Install dependencies:
# With npm
npm i @mercadoeletronico/meweb-module
# With yarn
yarn add @mercadoeletronico/meweb-module
Add @mercadoeletronico/meweb-module to modules section of nuxt.config.js.
module.exports = {
modules: ['@mercadoeletronico/meweb-module']
}
Auth Middleware
The MEWeb`s module provides an authentication middleware
module.exports = {
router: {
// Run the middleware/me-auth.js on every page
middleware: 'me-auth'
}
}
Built-in Vuex
ME Module
Getters
Get current user
$store.getters['me/getUser']
Get current Customer
$store.getters['me/getCustomer']
Get current locale
$store.getters['me/getLocale']
Get site map
$store.getters['me/getSiteMap']
Get available locales
$store.getters['me/getLocales']
Actions
Set current user
store.dispatch('me/setUser', {
name: 'Renato Dias',
role: 'Developer'
})
Set current customer
store.dispatch('me/setCustomer', {
idMain: 1,
header: {
logo: '',
background: {
mainImage: '',
repeatImage: '',
primaryColor: '',
secondaryColor: ''
}
}
})
Set current locale
store.dispatch('me/setLocale', 'pt-BR')
Load site-map
store.dispatch('me/loadSiteMap')
Change User-Locale
- Change User Locale on ME-WEB
- Update store
- Reload Site-map
store.dispatch('me/changeLocale', 'pt-BR')
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.3.1 | ^2.6.11 | Apache-2.0 | |
| 2.3.0 | ^2.6.11 | Apache-2.0 | |
| 2.2.8 | ^2.6.11 | Apache-2.0 | |
| 2.2.7 | ^2.6.11 | Apache-2.0 | |
| 2.2.6 | ^2.6.11 | Apache-2.0 | |
| 2.2.5 | ^2.6.11 | Apache-2.0 | |
| 2.2.4 | ^2.6.11 | Apache-2.0 | |
| 2.2.3 | ^2.6.11 | Apache-2.0 | |
| 2.2.2 | ^2.6.11 | Apache-2.0 | |
| 2.2.1 | ^2.6.11 | Apache-2.0 | |
| 2.2.0 | ^2.6.11 | Apache-2.0 | |
| 2.1.5 | ^2.6.11 | Apache-2.0 | |
| 2.1.4 | ^2.6.11 | Apache-2.0 | |
| 2.1.3 | ^2.6.11 | Apache-2.0 | |
| 2.1.2 | ^2.6.11 | Apache-2.0 | |
| 2.1.1 | ^2.6.11 | Apache-2.0 | |
| 2.1.0 | ^2.6.11 | Apache-2.0 | |
| 2.0.21 | ^2.6.11 | Apache-2.0 | |
| 2.0.20 | ^2.6.11 | Apache-2.0 | |
| 2.0.16 | ^2.6.11 | Apache-2.0 | |
| 2.0.15 | ^2.6.11 | Apache-2.0 | |
| 2.0.13 | ^2.6.11 | Apache-2.0 | |
| 2.0.12 | ^2.6.11 | Apache-2.0 | |
| 2.0.11 | ^2.6.11 | Apache-2.0 | |
| 2.0.10 | ^2.6.11 | Apache-2.0 | |
| 2.0.8 | ^2.6.11 | Apache-2.0 | |
| 2.0.7 | ^2.6.11 | Apache-2.0 | |
| 2.0.6 | ^2.6.11 | Apache-2.0 | |
| 2.0.5 | ^2.6.11 | Apache-2.0 | |
| 2.0.2 | ^2.6.11 | Apache-2.0 |
Showing the latest 30 of 252. See every release on npm