创建一个vue单页面应用

 

最最开始是要安装cli3

 1.npm install -g @vue/cli 

    2.npm install -g @vue/cli-service-global

然后是创建单页面应用singer.vue

<template>
    <div>
       {{message}}
    </div>
</template>

<script>
    export default {
        data() {
            return {
                message: 'hello,vue'
            }
        },
    }
</script>

<style scoped>

</style>

1.首先这个是创建在桌面上的,需要先回到桌面上

cd .\Desktop\

2.再运行该文件

vue serve .\02.singer.vue

3.运行成功

猜你喜欢

转载自www.cnblogs.com/quitpoison/p/10686397.html