Full and runtime versions

The full version

Include both the compiler (compiler) and the runtime version, with the file name vue.js, or the full version of the smaller vue.mini.js

The compiler converts the VUE syntax of the HTML or template in the view to the corresponding JS,HTML, or CSS code.

<template>
    <div id="app">      
        {{n}}
        <button @click="add">+ 1</button>   
   </div> 
</template>
Copy the code

The runtime version

Does not include the compiler, file name vue.runtime.js, or a smaller version of vue.runtime.js

The runtime version with no compiler requires an H in the reander function to create the label

Render (h) {return h (' div ', [this. N, h (' button '{on: {' click' : this. Add}}, '1')])}Copy the code

An address to write code onlinecodesandbox

  1. Select the icon of the project type to be created and wait for 30 seconds