vue目录结构熟悉

 

 

 给项目的入口文件做点小改变:

【补充:编辑器建议使用vscode,我还没装,暂时先用phpstorm】

打开 APP.vue 文件,代码如下(解释在注释中)

<template>
  div id="app">
    img src="./assets/logo.png"router-view/>
    hello></</div>
>

script>
  //导入组件
  import Hello from "./components/Hello
  console.log(1)

export default {
  name: 'App,components:{
    Hello
  }
}
style>
#app {
  font-family: 'Avenir',Helvetica,Arial,sans-serif;
  -webkit-font-smoothing antialiased
  -moz-osx-font-smoothing grayscale
  text-align center
  color #2c3e50
  margin-top 60px;
}
>

 

修改 src/components/Hello.vue

class="hello">
        h1>{{ msg }}
export {
    name:helloreturn {
            msg:cyy要学习vue啦~
        }
    }
}
>

重新打开页面 http://localhost:8080/,一般修改后会自动刷新,显示效果

 

相关文章

https://segmentfault.com/a/1190000022018995 https://www....
ES6 (ECMAScript 6)中的模块是一个包含 JavaScript 代码的...
from https://mp.weixin.qq.com/s/-rc1lYYlsfx-wR4mQmIIQQ V...
D:\Temp&gt;npm init vite@latest vue3study --temp...
文章浏览阅读1.2k次。最近自己从零撸起的甘特图组件需要子组...
文章浏览阅读3.3k次,点赞3次,收藏16次。静默打印是什么?简...