07 2021 档案
摘要:第一种方法如果没有高度是有问题,基本不算一种方式 <div className="mxbox"> <div className="mbox1"> position:absolute<br/> left top<br/> right bottom 0<br/> margin auto<br/> </d
阅读全文
摘要:一对一一边写html 一边写css一小块为单位html csscss html整块单位html csscss html react/first-react/src/views/Wk/index.jsx import React, { Component } from 'react'; class V
阅读全文
摘要:布局方式,两列三列布局中间自适应 <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>web前端</title> <meta name="description" content="web前端" /> <meta name="ke
阅读全文
摘要:第一步,安装 sinopia npm install -g sinopia 开启终端一: 第二步,启动 sinopia -l 127.0.0.1:4873 开启终端二: cd 到某个指定仓库 mkdir unit-restful-axios(包的名称) cd unit-restful-axios n
阅读全文
摘要:1、axios post通过点击事件提交数据不需要使用input直接使用state2、pdd你好天天象上默认执行点击(1,2,3)也可以执行并且能切换页码3、tab 针对新闻不同时4、天天象上首页和精品微课右侧 鼠标滑过展示全内容 代码如下: react/first-react/src/views/
阅读全文
摘要:见代码 class View extends Component { constructor(props){ super(props); this.state = { cancel:null, cancel2:null } } //简易版 async getApi2(url,cfg,headers)
阅读全文
摘要:BetterScroll 是什么 BetterScroll 是一款重点解决移动端(已支持 PC)各种滚动场景需求的插件。它的核心是借鉴的 iscroll (opens new window) 的实现,它的 API 设计基本兼容 iscroll,在 iscroll 的基础上又扩展了一些 feature
阅读全文
摘要:什么是防抖 函数防抖(debounce):当持续触发事件时,一定时间段内没有再触发事件,事件处理函数才会执行一次,如果设定的时间到来之前,又一次触发了事件,就重新开始延时。如下图,持续触发 scroll 事件时,并不执行 handle 函数,当 1000 毫秒内没有触发 scroll 事件时,才会延
阅读全文
摘要:import React, { useState, useEffect } from "react"; // antd import { Pagination } from "antd"; // 二次封装axios import Unit from "../分页/index.js"; const A
阅读全文
摘要:import axios from 'axios'; import qs from 'qs'; const Unit = { async getApi(ajaxCfg){ let data = await axios.get(ajaxCfg.url,{params:ajaxCfg.cfg}, { h
阅读全文
摘要: 创建项目第一步 基本搭建 在创建之前,需要有一个git 仓库,我们要把项目搭建到git 中 目录介绍 cd 到某个盘 mkdir workspace 创建workspace文件夹 cd workspace 进入workspace文件夹 workspace一般为我们仓库和项目总目录 git@1 仓
阅读全文
摘要:input react 表单 input 密码框在谷歌浏览器下 会有黄色填充 官网的不太用,这个比较好用 type="password" autoComplete="new-password" HTML index.jsx import React, { Component } from 'reac
阅读全文
摘要:把此下代码放入scss文件 使用时候引入scss文件 @charset "UTF-8"; $yh:"Microsoft yahei"; @function rm($px, $base: 24) { @return ($px / $base) * 1rem; } // @function pxToRe
阅读全文
摘要:把此代码放进js文件里 使用的时候引入调用内方法即可! import axios from 'axios'; const Unit = { async getApi(ajaxCfg){ let data = await axios.get(ajaxCfg.url,{params:ajaxCfg.c
阅读全文

浙公网安备 33010602011771号