Vue: UI component framework recommendation

illustrate

This section describes the UI component library based on Vue.js
- recommended: ElementUi, MintUI, iView

PC side
- ElementUI : Eleme UI open source
- iView
mobile terminal
- mintUI : Eleme UI open source

1 、 ElementUI

1、 安装
    npm install element-ui -D
2、引入main.js
    import ElementUI from 'element-ui'
    // 注意引入css,需要css-loader加载器,以及对应字体图标需要使用file-loader
    import 'element-ui/lib/theme-chalk/index.css'
3、注册全局组件
    Vue.use(ElementUI)

4、组件内部使用
<template>
    <div>
        <el-button type="primary">主要按钮</el-button>
    </div>
</template>

2 、 MintUI

  • Official documentation: mintUI
  • MintUI is a set of UI implementation for the mobile terminal launched by Ele.me. Its usage is similar to element, and it is a componentized use.
// 安装
# Vue 1.x
npm install mint-ui@1 -S
# Vue 2.0
npm install mint-ui -S

// 引入全部组件
import Vue from 'vue';
import Mint from 'mint-ui';
Vue.use(Mint);

// 按需引入部分组件
import { Cell, Checklist } from 'minu-ui';
Vue.component(Cell.name, Cell);
Vue.component(Checklist.name, Checklist);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324652204&siteId=291194637