0.3.3 • Published 4 years ago

@chen129/cl-ui v0.3.3

Weekly downloads
7
License
-
Repository
github
Last release
4 years ago

cl-ui

Build Status

:rainbow: 安装

nmp 安装

npm install @chen129/cl-ui --seave

CDN

// 引入样式
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@chen129/cl-ui@0.3.1/package/clUi.css">

// 引入组件库
<script src="https://cdn.jsdelivr.net/npm/@chen129/cl-ui@0.3.1/package/clUi.umd.min.js"></script>

:beers: 引入 cl-ui

import CLUI  from '@chen129/cl-ui'

import '@chen129/cl-ui/package/clUi.css'

Vue.use(CLUI)

:hammer: 按需引入

  • 借助插件 babel-plugin-import可以实现按需加载组件,减少文件体积。首先安装,并在文件 babel.config.js 中配置:
npm install babel-plugin-import --save-dev
// babel.config.js
module.exports = {
  ...
  plugins: [['import', {
    'libraryName': '@chen129/cl-ui',
    'libraryDirectory': 'src/components'
  }]]
}

// main.js
import { Hello } from '@chen129/cl-ui'
import '@chen129/cl-ui/package/index.css'

Vue.component(Hello.name, Hello)
//or
Vue.use(Hello)
0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago