nuxt-element-ui

A Nuxt module for Element UI.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
nuxt-element-ui
1.0.104 years ago5 years agoMinified + gzip package size for nuxt-element-ui in KB

Readme

nuxt-element-ui
npm npm (scoped with tag) NpmLicense
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 to modules section of nuxt.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