摘要: 创建vue项目 1.创建项目 npm init vite@latest 输入项目名称,选择vue 2. 安装依赖 npm install 3.运行 npm run dev 安装Three.js 1.首先利用npm安装three.js,具体操作代码如下: npm install three12.接下来 阅读全文
posted @ 2022-06-22 16:19 Code_Lzh 阅读(917) 评论(0) 推荐(0)
摘要: ```` Document ```` 阅读全文
posted @ 2022-06-11 10:56 Code_Lzh 阅读(564) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-06-11 10:21 Code_Lzh 阅读(75) 评论(0) 推荐(0)
摘要: 在vue中data里的变量是响应式数据,在回调函数中不能使用data中定义的变量,因为data中定义的变量是响应式数据,被回调函数赋值使用后会一直渲染,从而导致浏览器卡死 使用局部变量,就可以解决卡死的问题 阅读全文
posted @ 2022-05-31 09:44 Code_Lzh 阅读(1447) 评论(0) 推荐(0)
摘要: 1、首先在控制台输入命令,这里装的是router4,其他版本及安装方法直接看官方文档即可 npm install vue-router@4 2、对router文件夹的index.js进行内容编辑,详解可以参考这个网页 import { createRouter, createWebHistory } 阅读全文
posted @ 2022-05-25 16:42 Code_Lzh 阅读(347) 评论(0) 推荐(0)
摘要: 1、那么和安装router一样 先去vuex的官方文档看下 这里装的是vuex4,其他版本查看官方文档即可控制台输入 npm install vue-router@4 2、然后src目录下新建store文件夹和index.js,并编辑index.js文件,随便给个数据测试用 import { cre 阅读全文
posted @ 2022-05-25 16:30 Code_Lzh 阅读(482) 评论(0) 推荐(0)
摘要: 1、通过Vite创建项目 # npm 6.x npm init vite@latest my-vue-app --template vue 或 npm init vite-app projectName # npm 7+, 需要额外的双横线: npm init vite@latest my-vue- 阅读全文
posted @ 2022-05-21 15:55 Code_Lzh 阅读(921) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-05-20 17:44 Code_Lzh 阅读(24) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript"> /* * 创建一个正则表达式检查一个字符串中是否含有aaa */ /* * 量词 * - 通过量词 阅读全文
posted @ 2022-05-06 16:28 Code_Lzh 阅读(641) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <script type="text/javascript"> var str = "1a2b3c4d5e6f7"; /* * split() * - 可以将一个 阅读全文
posted @ 2022-05-06 16:00 Code_Lzh 阅读(24) 评论(0) 推荐(0)