nuxt-element-ui
v1.0.10
Published
A Nuxt module for Element UI.
Downloads
788
Readme
nuxt-element-ui
Add ElementUI A Vue.js 2.0 UI Toolkit for Web to Nuxt.
Setup
- Add
nuxt-element-ui
dependency using yarn or npm to your project
yarn add nuxt-element-ui
- Add
nuxt-element-ui
tomodules
section ofnuxt.config.js
{
modules: [
'nuxt-element-ui'
],
elementUI: {
components: ['Button', 'DatePicker'],
locale: 'fr',
},
}
or
{
modules: [
[
'nuxt-element-ui',
{
components: ['Button', 'DatePicker'],
locale: 'fr',
},
],
],
}
- Add Element UI styles.
Options
components
- optional
- Type:
string[]
- Default:
[]
Adds specific ElementUI Components to your project. If components
is empty, all components will be imported.
locale
- optional
- Type:
string
- Default:
en
Sets elementUI locale globally.
Usage
Simply use ElementUI Components inside your single file components.
my-component.vue
:
<template>
<el-button>Button</el-button>
</template>
License
MIT License