Skip to content

quanzhiyuan/mkd-ui

Repository files navigation

Mkd UI

flowchart TD
A[Hard] -->|Text| B(Round)
B --> C{Decision}
C -->|One| D[Result 1]
C -->|Two| E[Result 2]
Loading

Mobile UI elements for Vue 2.0

Installation

npm i mkd-ui -S

Usage

Import all components.

import Vue from 'vue'
import Mkd from 'mkd-ui'
import 'mkd-ui/lib/style.css'

Vue.use(mkd)

Or import specified component. (Use babel-plugin-component)

import { Cell, Checklist } from 'mkd-ui'

Vue.component(Cell.name, Cell)
Vue.component(Checklist.name, Checklist)

Equals to

import Vue from 'vue'
import Mkd from 'mkd-ui'
import 'mkd-ui/lib/style.css'

Vue.use(Mkd)

// import specified component

import MkdRadio from 'mkd-ui/lib/radio'
import 'mkd-ui/lib/radio/style.css'

Vue.component(MkdRadio.name, MkdRadio)

babel-plugin-component

  • Auto import css file
  • Modular import component

Installation

npm i babel-plugin-component -D

Usage

.babelrc

{
  "plugins": ["other-plugin", ["component", [
    { "libraryName": "mint-ui", "style": true }
  ]]]
}

npm run dev

License

MIT