摘要:
<script type="text/babel"> function Demo(props){ const {name, age, sex} = props return ( <div> <ul> <li>{name}</li> <li>{age}</li> <li>{sex}</li> </ul 阅读全文
posted @ 2022-01-09 21:50
ellaha
阅读(163)
评论(0)
推荐(0)
摘要:
class Dog{ //一般属性挂载在实例上 a = 1; // 静态属性挂载在原型对象上 static b = 2 // 构造方法挂载在原型对象上 constructor(){} // 一般方法挂载在原型对象上 cry(){} static call(){ console.log('静态方法挂载 阅读全文
posted @ 2022-01-09 17:18
ellaha
阅读(48)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2022-01-09 17:10
ellaha
阅读(28)
评论(0)
推荐(0)
摘要:
1,https://juejin.cn/post/7001645745594400776 类式组件中的构造器完全可以省略 若写了构造器,super必须调用 需要在构造器中通过this.props访问,那么props必须传值给super <script type="text/babel"> class 阅读全文
posted @ 2022-01-09 15:04
ellaha
阅读(95)
评论(0)
推荐(0)
摘要:
https://juejin.cn/post/6844903496253177863 阅读全文
posted @ 2022-01-09 15:04
ellaha
阅读(17)
评论(0)
推荐(0)
浙公网安备 33010602011771号