Skip to content

hongxuli/lime-ui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LimeUI

A lightweight Vue.js UI toolkit

demo: https://arronkler.github.io/lime-ui/

Install

Run the command below in your terminal to install limeUI first

npm install lime-ui --save

Usage

Global Use

Import in your entry script file and register it

import LimeUI from 'lime-ui'
import "lime-ui/lib/styles/lime-ui.css"

Vue.use(LimeUI)

Example

<l-button>click</l-button>

On-demand Loading

Firstly, you should install babel-plugin-component in your project.

npm install babel-plugin-component

Configure your .babelrc file like this

{
    "plugins": [
        ["component", {
            "libraryName": "lime-ui",
            "libDir": "lib",
            "styleLibrary": {
                "name": "styles",
                "base": false, // no base.css file
                "path": "[module].css"
            }
        }]
    ]
}

The you can import component on demand, and you don't need to care about importing styles, the babel plugin will do it automaticly.

import Vue from 'vue'
import { Button } from 'lime-ui'

Vue.component('a-button', Button)

About

《如何打造一套vue组件库》示例代码

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.5%
  • Vue 28.7%
  • SCSS 12.4%
  • CSS 0.4%