1、新建一个空项目

使用 WebStorm 2018 运行第一个 Vue 程序

2、在项目下新建一个 HTML 文件

使用 WebStorm 2018 运行第一个 Vue 程序

3、在 HTML 文件中写入:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div >
    {{message}}
</div>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            message:"hello vue !"
        }
    })
</script>
</body>
</html>

如下图:

使用 WebStorm 2018 运行第一个 Vue 程序

4、使用浏览器打开该 HTML 文件

使用 WebStorm 2018 运行第一个 Vue 程序

如上,成功运行第一个 Vue 程序。

参考链接:https://cn.vuejs.org/v2/guide/

每天学习一点点,每天进步一点点。

相关文章:

  • 2021-11-29
  • 2021-04-01
  • 2021-09-17
  • 2021-04-27
  • 2021-09-20
  • 2022-12-23
猜你喜欢
  • 2021-05-24
  • 2021-08-22
  • 2021-04-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案