# Installation

# Installation

The following code describes how to use NPM to install our VEasy

npm install v-easy-components --save-dev
yarn add v-easy-components -D

# Introduced directly with <script> 0.5.1+

Directly downloaded and introduced with the <script> tag, you can use the global variable VEasy to get v-easy-components

# CDN

Currently you can get the latest version of the resource through unpkg, and introduce js and css files on the page to get started.
Note: If introduced in the form of CDN, font files currently only support one of them (solid)

<script src="//unpkg.com/vue@2.6.10/dist/vue.js"></script>
<!-- Introducing component library -->
<script src="//unpkg.com/v-easy-components"></script>
<!-- Introducing style -->
<link rel="stylesheet" href="//unpkg.com/v-easy-components/lib/theme-chalk/index.css">

If you want to get a stable version, please bring the version number

<script src="//unpkg.com/vue@2.6.10/dist/vue.js"></script>
<!-- Introducing component library -->
<script src="//unpkg.com/v-easy-components@1.3.0/lib/index.js"></script>
<!-- Introducing style -->
<link rel="stylesheet" href="//unpkg.com/v-easy-components@1.3.0/lib/theme-chalk/index.css">

# Hello world

A simple example, you can quickly start prototyping

Just use it as agreed, and you can quickly prototype
<template>
  <div>
    <ve-input v-model="value" @keyup.native.enter="handlerTargetMessage" placeholder="please enter"></ve-input>
    <ve-button style="margin-left: 20px" @click="handlerTargetMessage">TargetMessage</ve-button>
  </div>
</template>

<script>
  export default {
    methods: {
      handlerTargetMessage() {
        if (this.value) {
          this.$msg({
            type: 'success',
            message: this.value
          })
        } else {
          this.$msg({
            type: 'error',
            message: 'please enter text',
          })
        }
      }
    }
  }
</script>