08 2021 档案

摘要:<template> <div> <h1>{{count}}</h1> <h1>{{double}}</h1> <button @click="increase">+1</button> </div> </template> <script lang="ts"> import { ref,compu 阅读全文
posted @ 2021-08-28 15:14 13522679763-任国强 阅读(89) 评论(0) 推荐(0)
摘要:ref,computed 用法 <template> <div> <h1>{{count}}</h1> <h1>{{double}}</h1> <button @click="increase">+1</button> </div> </template> <script lang="ts"> im 阅读全文
posted @ 2021-08-28 14:50 13522679763-任国强 阅读(160) 评论(0) 推荐(0)
摘要:import React,{useState} from 'react' export default function ComplexHookState() { const [friends, setFriends] = useState(['李雷','科比']) const [students, 阅读全文
posted @ 2021-08-20 17:51 13522679763-任国强 阅读(888) 评论(0) 推荐(0)
摘要:yarn add antdyarn add @ant-design/iconsyarn add moment // 配置andt 主题yarn add @craco/craco// 修改配置命令 "scripts": { "start": "craco start", "build": "craco 阅读全文
posted @ 2021-08-16 17:45 13522679763-任国强 阅读(474) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' // yarn add classnames import classNames from 'classnames' export default class app extends PureComponent 阅读全文
posted @ 2021-08-13 17:05 13522679763-任国强 阅读(2154) 评论(0) 推荐(0)
摘要:yarn add styled-components 1 import styled from 'styled-components' export const HomeWrapper = styled.div ` font-size:20px; color:red; .banner{ backgr 阅读全文
posted @ 2021-08-13 15:01 13522679763-任国强 阅读(154) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' function withRenderTime(WrappedComponent){ return class extends PureComponent{ componentWillMount() { thi 阅读全文
posted @ 2021-08-13 09:41 13522679763-任国强 阅读(154) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' // class LoginPage extends PureComponent { render() { return ( <div> <h2>LoginPage</h2> </div> ) } } func 阅读全文
posted @ 2021-08-12 17:46 13522679763-任国强 阅读(85) 评论(0) 推荐(0)
摘要:import React, { PureComponent, createContext } from 'react' import { render } from 'react-dom' // 定义一个高阶组件 function withUser(WrappedComponent){ return 阅读全文
posted @ 2021-08-12 17:20 13522679763-任国强 阅读(67) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' // 定义一个高阶组件 function enhanceRegionProps(WrappedComponent){ return props => { return <WrappedComponent {.. 阅读全文
posted @ 2021-08-12 17:19 13522679763-任国强 阅读(35) 评论(0) 推荐(0)
摘要:import React, { PureComponent,createRef } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.username 阅读全文
posted @ 2021-08-12 15:13 13522679763-任国强 阅读(33) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.state = { username 阅读全文
posted @ 2021-08-12 15:06 13522679763-任国强 阅读(101) 评论(0) 推荐(0)
摘要:import React, { PureComponent,createRef } from 'react' class Counter extends PureComponent { constructor(props){ super(props) this.state = { counter:0 阅读全文
posted @ 2021-08-12 14:15 13522679763-任国强 阅读(97) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' import {EventEmitter} from 'events'; // yarn add events // 事件总线 event bus const eventBus = new EventEmitt 阅读全文
posted @ 2021-08-12 11:54 13522679763-任国强 阅读(85) 评论(0) 推荐(0)
摘要:import React, { PureComponent } from 'react' export default class App extends PureComponent { constructor(props){ super(props) this.state = { friends: 阅读全文
posted @ 2021-08-12 10:54 13522679763-任国强 阅读(57) 评论(0) 推荐(0)
摘要:function wxToPromise(method, options = {}) { return new Promise((resolve, reject) => { options.success = resolve options.fail = err => { reject(err) } 阅读全文
posted @ 2021-08-11 21:55 13522679763-任国强 阅读(312) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0, name: 阅读全文
posted @ 2021-08-11 17:29 13522679763-任国强 阅读(230) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0 } } re 阅读全文
posted @ 2021-08-11 17:02 13522679763-任国强 阅读(268) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' export default class App extends Component { constructor(props){ super(props) this.state = { counter:0 } } re 阅读全文
posted @ 2021-08-11 16:33 13522679763-任国强 阅读(327) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' const userContext = React.createContext({ nickname:'AAA', level:0 }) class ProfileHeader extends Component{ r 阅读全文
posted @ 2021-08-11 14:40 13522679763-任国强 阅读(36) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' // props 从上向下一层一层传递 function ProfileHeader(props){ console.log(props); return ( <div> <h2>用户昵称: {props.nickna 阅读全文
posted @ 2021-08-11 14:27 13522679763-任国强 阅读(45) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' // import NavBar from './NavBar' import NavBar2 from './NavBar-2' export default class App extends Component  阅读全文
posted @ 2021-08-11 13:48 13522679763-任国强 阅读(404) 评论(0) 推荐(0)
摘要:app.js import React, { Component } from 'react' import TabControll from './tabControll' export default class App extends Component { constructor(props 阅读全文
posted @ 2021-08-11 12:10 13522679763-任国强 阅读(29) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-11 09:15 13522679763-任国强 阅读(18) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-10 18:00 13522679763-任国强 阅读(21) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-10 17:59 13522679763-任国强 阅读(19) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-10 17:58 13522679763-任国强 阅读(20) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-10 17:57 13522679763-任国强 阅读(27) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-10 17:57 13522679763-任国强 阅读(18) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' class ChildCpn extends Component{ render(){ // console.log(this.props); // {name: "Eric", age: "28"} let {nam 阅读全文
posted @ 2021-08-10 17:56 13522679763-任国强 阅读(66) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' import PropTypes from 'prop-types'; function ChildCpn(props){ // console.log(props); // {name: "Eric", age: " 阅读全文
posted @ 2021-08-10 17:56 13522679763-任国强 阅读(23) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' class Cpn extends Component{ render(){ return ( <div>我是Cpn组件</div> ) } componentWillUnmount(){ console.log('调 阅读全文
posted @ 2021-08-10 17:54 13522679763-任国强 阅读(58) 评论(0) 推荐(0)
摘要:import React, { Component } from 'react' class Header extends Component{ render(){ return ( <div>我是Header组件</div> ) } } class Banner extends Component 阅读全文
posted @ 2021-08-10 17:54 13522679763-任国强 阅读(27) 评论(0) 推荐(0)
摘要:import React,{Component} from "react"; // export default class App extends Component{ // constructor(){ // super(); // this.state = { // message:'你好啊' 阅读全文
posted @ 2021-08-10 17:53 13522679763-任国强 阅读(41) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-05 14:11 13522679763-任国强 阅读(39) 评论(0) 推荐(0)
摘要:// 1 创建AJAX 实例对象 let xhr = new XMLHttpRequest; // 2 打开 URL(发送请求前的一些处理) xhr.open('get','./data.json',true); // 3 监听 ajax 状态信息 xhr.onreadystatechange =  阅读全文
posted @ 2021-08-05 11:54 13522679763-任国强 阅读(18) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'tabs/Home.dart'; import 'tabs/Setting.dart'; import 'tabs/Category.dart'; class Tabs extends StatefulW 阅读全文
posted @ 2021-08-04 22:57 13522679763-任国强 阅读(43) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; class ButtonPage extends StatelessWidget { const ButtonPage({Key? key}) : super(key: key); @override Widget bu 阅读全文
posted @ 2021-08-04 22:08 13522679763-任国强 阅读(86) 评论(0) 推荐(0)
摘要:https://gitee.com/eric167/js <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <met 阅读全文
posted @ 2021-08-04 18:00 13522679763-任国强 阅读(121) 评论(0) 推荐(0)
摘要:(function () { // 插件核心:OOP的模式,可以创建单独的实例,这样实现私有属性和公有方法的有效管理 class zTree { constructor(element, options) { // init params let self = this, len = argumen 阅读全文
posted @ 2021-08-04 08:54 13522679763-任国强 阅读(156) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; class TabBarControllerPage extends StatefulWidget { TabBarControllerPage({Key? key}) : super(key: key); @overr 阅读全文
posted @ 2021-08-03 21:19 13522679763-任国强 阅读(192) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; class AppBarDemoPage extends StatelessWidget { const AppBarDemoPage({Key? key}) : super(key: key); @override W 阅读全文
posted @ 2021-08-03 20:28 13522679763-任国强 阅读(36) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; class AppBarDemoPage extends StatelessWidget { const AppBarDemoPage({Key? key}) : super(key: key); @override W 阅读全文
posted @ 2021-08-03 20:19 13522679763-任国强 阅读(37) 评论(0) 推荐(0)
摘要:(function($){ if(!$ || !$.prototype.jquery) throw new ReferenceError('must import jquery'); // 向其原型获取方法 $.fn.extend({ zTree(data,callback){ typeof cal 阅读全文
posted @ 2021-08-03 16:44 13522679763-任国强 阅读(47) 评论(0) 推荐(0)
摘要:(function(){ function LazyImage(options){ // init params options = options || {}; let defaults = { context:document, attr:'lazy-image', threshold:1, s 阅读全文
posted @ 2021-08-03 14:40 13522679763-任国强 阅读(58) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta name="viewport" content="width=device 阅读全文
posted @ 2021-08-03 11:54 13522679763-任国强 阅读(53) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta name="viewport" content="width=device 阅读全文
posted @ 2021-08-03 11:29 13522679763-任国强 阅读(152) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>单张图片懒加载案例</title> < 阅读全文
posted @ 2021-08-03 10:46 13522679763-任国强 阅读(65) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-02 17:08 13522679763-任国强 阅读(182) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-02 14:06 13522679763-任国强 阅读(236) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-02 14:00 13522679763-任国强 阅读(52) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-08-02 13:36 13522679763-任国强 阅读(53) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'tabs/Home.dart'; import 'tabs/Setting.dart'; import 'tabs/Category.dart'; class Tabs extends StatefulW 阅读全文
posted @ 2021-08-01 20:25 13522679763-任国强 阅读(379) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 17:33 13522679763-任国强 阅读(54) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 16:51 13522679763-任国强 阅读(58) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 16:21 13522679763-任国强 阅读(99) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 15:31 13522679763-任国强 阅读(52) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 12:59 13522679763-任国强 阅读(27) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 12:29 13522679763-任国强 阅读(35) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 12:23 13522679763-任国强 阅读(38) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override W 阅读全文
posted @ 2021-08-01 11:08 13522679763-任国强 阅读(43) 评论(0) 推荐(0)
摘要:1 import 'package:flutter/material.dart'; import 'res/listData.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override 阅读全文
posted @ 2021-08-01 10:56 13522679763-任国强 阅读(119) 评论(0) 推荐(0)