会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
种太阳
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
11
12
13
14
···
19
下一页
2022年1月16日
44.安装node.js
摘要: 使用淘宝 NPM 镜像淘宝 NPM 镜像是一个完整 npmjs.org 镜像,你可以用此代替官方版本(只读),同步频率目前为 10分钟 一次以保证尽量与官方服务同步。你可以使用淘宝定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:$ npm install -g cnpm --
阅读全文
posted @ 2022-01-16 01:47 种太阳
阅读(77)
评论(0)
推荐(0)
2022年1月15日
1.VSCode之编写Vue单文件组件时template标签报红
摘要: 1.要在VSCode中编写Vue文件格式,需要安装一个插件:Vetur 2.点击VSCode的设定 3.在搜索中搜索Vetur,然后把这个template的勾选去掉 4.再看代码就不会报红了
阅读全文
posted @ 2022-01-15 22:38 种太阳
阅读(2613)
评论(3)
推荐(1)
2022年1月9日
2.重学Vue 模板语法
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>模板语法</title> <!-- 引入Vue --> <script type="text/javascript" src="../JS/vue.js"></script> <
阅读全文
posted @ 2022-01-09 06:56 种太阳
阅读(29)
评论(0)
推荐(0)
1.重学Vue 初识Vue
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>初识Vue</title> <!-- 引入Vue --> <script type="text/javascript" src="../JS/vue.js"></script>
阅读全文
posted @ 2022-01-09 06:55 种太阳
阅读(28)
评论(0)
推荐(0)
2022年1月6日
26.javascript 性能
摘要: 1.for循环中,常见的大家获取数组长度,喜欢写在for循环里面,其实将该代码提出来,先对数组长度进行运算,会使得循环运行的更快。 原因是:循环每次迭代时,坏代码就会访问数组的 length 属性。 差的代码: var i; for (i = 0; i < arr.length; i++) {} 更
阅读全文
posted @ 2022-01-06 23:23 种太阳
阅读(34)
评论(0)
推荐(0)
25.javascript json
摘要: 1.JSON格式大致是如下样子 大括号包裹数据,数据已键值对形式存在,键需要用引号,接着使用冒号:,再接着就是其值。 多个键值对用逗号隔开。 { "employees":[ {"firstName":"Bill", "lastName":"Gates"}, {"firstName":"Steve",
阅读全文
posted @ 2022-01-06 22:42 种太阳
阅读(41)
评论(0)
推荐(0)
24.javascript 类
摘要: 类的创建方法:记得一点要用constructor class ClassName { constructor() { ... } } 实例 class Car { constructor(name, year) { this.name = name; this.year = year; } } 多个
阅读全文
posted @ 2022-01-06 22:26 种太阳
阅读(26)
评论(0)
推荐(0)
23.javascript 箭头函数
摘要: 原先模式: hello = function() { return "Hello World!"; } 箭头模式: hello = () => { return "Hello World!"; } //再变 hello = () => "Hello World!"; //有参数,再变 hello =
阅读全文
posted @ 2022-01-06 06:15 种太阳
阅读(33)
评论(0)
推荐(0)
22.javascript 中的try和catch
摘要: 通常如果觉得某段代码会发生错误,我们使用try catch来操作 try用来包裹执行的语句 catch用来捕获错误,进行操作 finally无论结果如何,都需要执行 try { // 供测试的代码块 } catch(err) { // 处理错误的代码块 } finally { // 无论结果如何都执
阅读全文
posted @ 2022-01-06 05:49 种太阳
阅读(115)
评论(0)
推荐(0)
21.javascript 中constructor属性
摘要: constructor 属性返回所有 JavaScript 变量的构造函数。 "Bill".constructor // 返回 function String() {[native code]} (3.14).constructor // 返回 function Number() {[native
阅读全文
posted @ 2022-01-06 05:26 种太阳
阅读(67)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
19
下一页
公告