一、使用setState现象 1.不可变值 class StateDemo extends React.Component { constructor(props) { super(props) this.state = { count: 0 } } render() { return <div> ...
分类:
其他好文 时间:
2020-07-04 20:55:55
阅读次数:
77
1.JSX的使用 class JSXBaseDemo extends React.Component { constructor(props) { super(props) this.state = { name: 'xiaoming', imgUrl: 'https://img1.mukewang ...
分类:
Web程序 时间:
2020-07-04 20:48:13
阅读次数:
84
1.react父子组件之间通过props传递数据,通过callback回调子组件向父组件通信, 我们看下面的伪代码: class TodoListDemo extends React.Component { constructor(props) { super(props) // 状态(数据)提升 ...
分类:
其他好文 时间:
2020-07-04 20:45:48
阅读次数:
67
import 'package:flutter/material.dart'; class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: ...
分类:
其他好文 时间:
2020-07-04 19:17:30
阅读次数:
132
import 'package:flutter/material.dart'; class WrapDemo extends StatefulWidget { @override _WrapDemoState createState() => _WrapDemoState(); } class _W ...
分类:
其他好文 时间:
2020-07-04 17:15:23
阅读次数:
81
import 'dart:ui'; import 'package:flutter/material.dart'; class FrostedClassDemo extends StatelessWidget { @override Widget build(BuildContext context ...
分类:
其他好文 时间:
2020-07-04 13:35:48
阅读次数:
86
(array) class Pre1 { private $name = 'aaa' ; private $age = 100; } class Pre2 extends Pre1 { private $name= 'bbb' ; public $age= 111; } var_dump ((arr ...
分类:
编程语言 时间:
2020-07-04 11:58:46
阅读次数:
71
示例 class Base(object): def func(self): print('Base.func') class Foo(Base): def func(self): # 方式一:根据mro的顺序执行方法 # super(Foo,self).func() # 方式二:主动执行Base类 ...
分类:
其他好文 时间:
2020-07-03 23:41:44
阅读次数:
61
需要掌握的知识点: 包的使用 继承时,子类如何覆盖父类方法(重写和重载) 继承时,构造方法的执行过程 JVM中子类如何实例化(先实例化父,再实例化子) super和this关键字 final关键字 包的导入 import java.util.Scanner; public class Package ...
分类:
编程语言 时间:
2020-07-03 21:43:59
阅读次数:
77
android7.0以上的手机https抓包失败,安装了https证书也不行,是因为android7.0+的版本安卓新增了证书验证,需要修改配置 ...
分类:
移动开发 时间:
2020-07-03 17:53:07
阅读次数:
106