上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: js的原型链 为什么需要原型链? 为什么需要原型:在一些场景中,比如人类行为有些要打游戏,有些要上学,有些要工作,但同时他们都需要吃饭和睡觉,但如果把每个人吃饭睡觉私有化使用的话就有点浪费内存,这时候就可以把这些每个人都需要做的行为统一拿出来放到一个公共的空间,每个人都有权限访问它,这样就可以节省内 阅读全文
posted @ 2022-01-16 00:34 fsdzh 阅读(647) 评论(0) 推荐(0)
摘要: function F() { Object.prototype.a = function () { console.log("a()"); }; Function.prototype.b = function () { console.log("b()"); }; } var f = new F() 阅读全文
posted @ 2022-01-15 17:51 fsdzh 阅读(275) 评论(0) 推荐(0)
摘要: 1: 对象字面量的方式 let o = {} 2: 通过Object.create() let o = Object.create({}) 3: 通过new 构造函数的方式 let o = new Object() function Person(name) { this.name = name } 阅读全文
posted @ 2022-01-15 17:51 fsdzh 阅读(1207) 评论(0) 推荐(1)
摘要: 什么是 构造函数constructor 函数名首字母必须大写 内部使用this对象,来指向将要生成的对象实例 使用new操作符来调用构造函数,并返回对象实例 构造函数用来干什么 所谓构造函数,就是提供了一个生成对象的模板并描述对象的基本结构的函数。一个构造函数,可以生成多个对象,每个对象都有相同的结 阅读全文
posted @ 2022-01-15 17:49 fsdzh 阅读(2634) 评论(0) 推荐(0)
摘要: [].shift.call( arguments ) 拿到第一个参数 arguments为一个数组 shift() 方法用于把数组的第一个元素从其中删除,并返回第一个元素的值 let arr=[1,2,3] arr.shift.call([4,5,6,7,8]) // 4 阅读全文
posted @ 2022-01-07 14:25 fsdzh 阅读(58) 评论(0) 推荐(0)
摘要: WeakMap 阅读全文
posted @ 2021-12-27 18:05 fsdzh 阅读(18) 评论(0) 推荐(0)
摘要: var arr=[1,2,3,4] arr.forEach((res)=>{return res+1}) undefined arr //[1,2,3,4] arr.map((res)=>{return res=res+1}) [2, 3, 4, 5] arr //[1,2,3,4] foreach 阅读全文
posted @ 2021-12-21 13:24 fsdzh 阅读(44) 评论(0) 推荐(0)
摘要: "dev": "vue-cli-service serve", "dev:pro": "vue-cli-service serve --mode production", "build": "vue-cli-service build", "build:stage": "vue-cli-servic 阅读全文
posted @ 2021-09-30 13:21 fsdzh 阅读(341) 评论(0) 推荐(0)
摘要: 'use strict' const path = require('path') const utils = require('./utils') const config = require('../config') const vueLoaderConfig = require('./vue- 阅读全文
posted @ 2021-08-27 16:13 fsdzh 阅读(774) 评论(0) 推荐(0)
摘要: import { Button, message , modal } from 'ant-design-vue'; import { settlementStatusList,payTypeList } from '@/utils/state' export function timeFix() { 阅读全文
posted @ 2021-07-20 13:36 fsdzh 阅读(298) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 21 下一页