- 博客(16)
- 收藏
- 关注
原创 vue3提供两个方法provide与inject,可以实现隔辈组件传递参数
provide方法用于提供数据,此方法执需要传递两个参数,分别提供数据的key与提供数据value。后代组件可以通过inject方法获取数据,通过key获取存储的数值。
2024-02-28 16:39:41
495
原创 报错 Module Error (from ./node_modules/eslint-loader/index.js): 亲测有效
报错Module Error (from ./node_modules/eslint-loader/index.js): 亲测有效
2022-12-19 16:07:31
2894
原创 js原型链
function Star(uname, age) { this.uname = uname; this.age = age; } Star.prototype.sing = function() { console.log('我会唱歌'); } var ldh = new Star('刘德华', 18); // 1. 只要是对象就有__p...
2021-12-16 20:11:32
64
原创 JS super的使用方法
class Father { constructor(x, y) { this.x = x; this.y = y; } sum() { console.log(this.x + this.y); } } // 子类中显式定义constructor ...
2021-12-16 20:09:49
1291
原创 js 高级 类的创建
class star{ constructor (name ,age ){ this.name = name; this.age= age ; } say(){ console.log(this.name +'你好'); } } var ldh = new star('liu',20) console.log(ldh); ...
2021-12-16 20:08:03
63
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人