1.3.3 • Published 4 months ago

lemon-ui-vue2 v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Lemon-ui

组件库目录

组件库文档

文档地址

组件

  • Button
  • 标题框
  • 边框
  • 加载组件

gitlab仓库

Lemon-ui 仓库地址

npm

版本管理

  "name": "Lemon-ui",
  "version": "1.0.1", 
  "description": "可视化大屏UI库",
  "main": "lib/index.js",

安装

通过npm安装

npm i lemon-ui-vue2 -S

通过yarn安装

yarn add lemon-ui-vue2 -S

快速开始

引入Lemon-ui

你可以引入整个Lemon-ui,或是根据需要仅引入部分组件。我们先介绍如何引入完整的 Lemon-ui。

完整引入

在 main.js 中写入以下内容:

import Vue from 'vue';
import LemonUI from 'lemon-ui-vue2';
import 'lemon-ui-vue2/lib/lemonui.css';
import App from './App.vue';

Vue.use(LemonUI);

new Vue({
  el: '#app',
  render: h => h(App)
});

按需引入

借助 babel-plugin-component,我们可以只引入需要的组件,以达到减小项目体积的目的。

首先,安装 babel-plugin-component:

npm install babel-plugin-component -D

然后,将babel.config.js修改为

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ],
  plugins: [
    ['component',
    {
      libraryName:'lemon-ui-vue2',
      libDir:'lib/packages',
      camel2Dash:true
    },
  ],
],
}

接下来,如果你只希望引入部分组件,比如 BorderBox1 和 TitleBox1,那么需要在 main.js 中写入以下内容:

import Vue from 'vue';
import { BorderBox1, BorderBox1 } from 'element-ui';
import App from './App.vue';

Vue.component(BorderBox1.name, BorderBox1);
Vue.component(TitleBox1.name, TitleBox1);
/* 或写为
 * Vue.use(BorderBox1)
 * Vue.use(TitleBox1)
 */

new Vue({
  el: '#app',
  render: h => h(App)
});
1.3.3

4 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.3.20

4 months ago

1.2.20

1 year ago

1.2.19

1 year ago

1.2.18

2 years ago

1.2.16

2 years ago

1.2.17

2 years ago

1.2.14

2 years ago

1.2.15

2 years ago

1.2.12

2 years ago

1.2.13

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago