0
点赞
收藏
分享

微信扫一扫

vue3官方文档(1): hello world


一、配置vue.config.js

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  runtimeCompiler: true,
})

二、main.js

import { createApp } from 'vue'


 createApp({
    data() {
        return {
            count: 0
        }
    },
    template: `<div id="app">
    <button @click="count++">
      Count is: {{ count }}
    </button>
  </div>
  `
}).mount('#app')

三、访问localhost:8080


举报

相关推荐

0 条评论