- 博客(16)
- 收藏
- 关注
原创 TypeScript 项目 移动版 两个滑块 滑动 (交叉)
index.tsximport { Component } from "react";import { connect } from 'react-redux';import './index.less';interface Props {}interface State { Num: number, MaxNum: number,}class Slider extends Component<Props, State>{ constructor(prop
2021-12-14 10:46:42 198
原创 TypeScript 项目 拖拽(移动端)
index.teximport React, { Component, createRef } from "react";import { connect } from 'react-redux';import './index.less'interface Props {}interface State {}class Drag extends Component<Props, State>{ startX: number = 0 startY: numb
2021-12-10 14:00:14 215
原创 TypeScript 项目 拖拽(PC端)
index.teximport React, { Component, createRef } from "react";import { connect } from 'react-redux';import './index.less'interface Props {}interface State {}class Drag extends Component<Props, State>{ disX: number = 0 disY: numbe
2021-12-10 11:45:54 537
原创 TypeScript 项目 选项卡
index.tsximport { Component } from "react";import { connect } from 'react-redux';import './index.less'interface Props {}interface user { id: string, text: string}interface content { id: string, text: string}interface State {
2021-12-10 11:42:56 131
原创 TypeScript项目 返回顶部 --匀减速到匀加速
index.tsximport { Component, createRef } from "react";import { connect } from 'react-redux';import "./index.less"interface Props {}interface State {}class Top extends Component<Props, State>{ nbackToTop = createRef<HTMLInputElemen
2021-12-10 10:11:35 416
原创 圣杯布局 和双飞翼布局
圣杯布局<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <titl
2021-11-29 16:41:10 146
原创 Vue 脚手架配置
1.安装vue脚手架 vue create project2.启动项目npm run serve3.配置px 转为rem1.安装px2rem-loader npm install px2rem-loader --save-dev2.移动端适配解决npm包npm install lib-flexible --save3.(目录: src/main.js)import 'lib-flexible' // 移动端适配4...
2021-11-21 20:01:07 1204
原创 树形结构 与 平铺结构之间的转换
树形结构 转为 平铺结构<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
2021-09-23 10:55:52 1055
原创 React原生下拉刷新 上拉加载 图片预加载
首先配置好React px转rem 这里是750转的 请注意!!!js 页面的代码import { Component } from 'react'//引入数据接口 就是axios的二次封装import { searchCar } from '../httpRequest/index'//引入css样式import './index.less'class Index extends Component { constructor(...args) { ...
2021-09-06 15:16:41 220
原创 React安装 create-react-app
1.修改 npm 下载源 1.查看当前的下载源npm config get registry2.修改下载源为淘宝景象源npm config setregistry https://registry.npm.taobao.org2.安装 create-react-appcnpm i create-react-app -g 检测create-react-app是否安装成功create-react-app --version...
2021-09-01 19:21:44 363
原创 Vue脚手架和React脚手架,二次封装axios
1、src文件夹下新建api文件夹2、api文件文件夹中新建index.js文件和request.js文件3、request文件相关配置 import axios from "axios"; export const Service = axios.create({ timeout: 3000, //延迟时间 method: 'POST', headers: { "content-Type": "application/x.
2021-09-01 19:07:52 111
原创 React 配置反向代理
1、下载相关依赖cnpm i http-proxy-middleware --save -dev2、在src目录下新建 setupProxy.js 的文件3、然后在setupProxy.js写如下代码(2020-6-23日下载的版本)const { createProxyMiddleware } = require('http-proxy-middleware')module.exports = function (app) { app.use(createProxy...
2021-09-01 18:55:08 239
原创 React 选项卡
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>选.
2021-08-31 07:12:33 113
原创 React滑块拖拽(pc端)
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>滑块拖拽pc</title> <script src="./js//browser.js"><.
2021-08-31 07:09:07 170
原创 React滑块拖拽(移动端)
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>滑.
2021-08-31 06:59:24 152
原创 React滑块拖拽(移动端)
<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1.0"><titl...
2021-08-31 06:55:44 240
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人