GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ZhongAnTech/zarm-vue: zarm in Vue.js

BranchesTags
Open more actions menu

Latest commit

 

History

584 Commits
584 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
build
build
 
 
config
config
 
 
docs/2.0.0
docs/2.0.0
 
 
example
example
 
 
js
js
 
 
script
script
 
 
site
site
 
 
src
src
 
 
styles
styles
 
 
template
template
 
 
test/unit
test/unit
 
 
types
types
 
 
.babelrc
.babelrc
 
 
.commitlintrc
.commitlintrc
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.postcssrc.js
.postcssrc.js
 
 
.stylelintrc
.stylelintrc
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
netlify.toml
netlify.toml
 
 
package.json
package.json
 
 
version.js
version.js
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Zarm Vue

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

版本

  • Beta版:npm package

  • Alpha版:[ZarmVue-Next]

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>

About

zarm in Vue.js

vue.zarm.design/#/documents/quick-start

Topics

vuezarmzarm-vue

Resources

Readme
MIT license
Activity
Custom properties

Stars

129 stars

Watchers

11 watching

Forks

45 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.