zarm-vue
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-beta.3 • Public • Published

Zarm Vue

Build Status Coverage Status Netlify Status npm package NPM downloads JS gzip size CSS gzip size License

版本

  • Beta版:npm package

Install 安装

npm install zarm-vue --save

Import 引入

  • 全组件引入
import Vue from 'vue';
import zarmVue from 'zarm-vue';
// 引入全局样式
import 'zarm-vue/zarm-vue.default.css';
Vue.use(zarmVue);
  • 按需引入

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

首先,安装 babel-plugin-component:

npm install babel-plugin-component -D

然后,将 .babelrc 添加:

{
  // ...
  "plugins": [["component", {
      "libraryName": "zarm-vue",
      "styleLibraryName": "theme"
    }
  ]]
}

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

import { Button, Alert } from 'zarm-vue'
Vue.use(Button)
Vue.use(Alert)
  • 也可以通过cdn引入umd模块
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://unpkg.com/zarm-vue@latest/zarm-vue.default.css">
  <script src="https://unpkg.com/vue@latest/dist/vue.min.js"></script> 
  <script src="https://unpkg.com/zarm-vue@latest/zarm-vue.umd.js"></script> 
</head>
<body>
  <div id="app">
      <za-button theme="primary">普通按钮</za-button>
  </div>
</body>
<script>
  new Vue({
    el: '#app'
  })
</script> 
</html>
 

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.0-beta.38latest
2.0.0-alpha.380alpha

Version History

VersionDownloads (Last 7 Days)Published
2.0.0-beta.38
2.0.0-beta.10
2.0.0-alpha.380
2.0.0-alpha.370
2.0.0-alpha.360
1.6.20
2.0.0-alpha.350
2.0.0-alpha.340
2.0.0-alpha.330
2.0.0-alpha.320
2.0.0-alpha.310
2.0.0-alpha.300
2.0.0-alpha.290
2.0.0-alpha.280
2.0.0-alpha.270
2.0.0-alpha.260
2.0.0-alpha.250
1.6.12
1.6.00
2.0.0-alpha.240
1.5.10
2.0.0-alpha.230
2.0.0-alpha.220
2.0.0-alpha.210
2.0.0-alpha.200
2.0.0-alpha.190
2.0.0-alpha.180
2.0.0-alpha.170
1.5.00
2.0.0-alpha.160
2.0.0-alpha.150
2.0.0-alpha.140
2.0.0-alpha.130
2.0.0-alpha.120
2.0.0-alpha.110
2.0.0-alpha.100
1.4.30
2.0.0-alpha.90
2.0.0-alpha.80
2.0.0-alpha.70
2.0.0-alpha.50
2.0.0-alpha.40
2.0.0-alpha.30
2.0.0-alpha.10
1.4.10
1.3.00
1.2.11
1.2.00
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.1.0-beta0
1.0.70
1.0.60
1.0.5-beta-10
1.0.5-beta0
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.1.70
0.1.60
0.1.50
0.1.30
0.1.20
0.1.10
0.1.00
0.0.90
0.0.80
0.0.71
0.0.60
0.0.50
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i zarm-vue

Weekly Downloads

12

Version

2.0.0-beta.3

License

MIT

Unpacked Size

9.13 MB

Total Files

590

Last publish

Collaborators

  • zhanwangye
  • cqh