点我去Gitee
点我去Gitee
摘要: 1.必填 页面.js(核心代码 非完全) //引入检测方法 import validate from '../utils/validate.js'//方法:验证填写信息 //填写规则 const rules = { name: { rule: /\S/, info: "*机床名字必填" }, ip: 阅读全文
posted @ 2021-10-16 17:16 biuo 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 原文链接:https://www.jianshu.com/p/7ad7ab2745af react路由带值跳转 一、params传参 1、在路由配置中以/:的方式评接参数标识 2、在路径后面将参数评接上(/参数) 3、在被跳转页使用this.props.match.params.xxx(此处为id) 阅读全文
posted @ 2021-10-16 16:18 biuo 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 原文连接:https://blog.csdn.net/weixin_45540478/article/details/114378389 react路由跳转不刷新 1.路由页面 2.组件页面 阅读全文
posted @ 2021-10-16 16:07 biuo 阅读(491) 评论(0) 推荐(0) 编辑
摘要: url传递参数 url的加码和解码 encodeURI decodeURI 加码 encodeURI const sendData = { boxId: this.state.boxIdMessage[0].boxId, flag: "add", from: 'boxMessage' } let j 阅读全文
posted @ 2021-10-16 15:50 biuo 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 把react打包成app的方法以及app打包下载 一.关于react代码如何运行为APP(测试) 1.先用手机开启网络共享 将电脑和手机连接在同一网段 2.运行代码 获取地址 http://xxx.xxx.xxx.xxx,例如我的是http://192.168.42.103:3000 3.在vsco 阅读全文
posted @ 2021-10-16 15:14 biuo 阅读(1724) 评论(0) 推荐(0) 编辑
摘要: 原文链接:https://blog.csdn.net/bbsyi/article/details/78781826 build 之后文件很大 webpack打包时要添加NODE_ENV,并且将devtool:'eval-source-map',去除,不然build出来的js特别大,source ma 阅读全文
posted @ 2021-10-16 14:46 biuo 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 原文连接:https://www.cnblogs.com/nuister/p/12496570.html build 出现空白页解决办法 项目执行npm run build后,将打包后的build文件放到 Nginx 配置中。 如果 react-router 路由 使用了 history 模式(即) 阅读全文
posted @ 2021-10-16 14:40 biuo 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Hbuilder WebView 关于APP中的页面返回问题 plus.webview 前言: 最近在做一个react+ant+H5app的APP应用项目。 众所周知,应create-react-app脚手架创建出来的是单页面项目。 在浏览器中,页面通过react-router-dom进行组件渲染, 阅读全文
posted @ 2021-10-16 12:01 biuo 阅读(1501) 评论(0) 推荐(0) 编辑
摘要: 1.价格保留两位小数 wxs 2.跳转页面--单纯页面和导航页面 3.左右滑动和循环嵌套 1.设计左右id并画出界面 2.左侧点击事件:用自定义属性myid获得数字id,并赋值给leftid用于绑定左侧id,赋值给rightid用于绑定右侧id,赋值给leftActiveNum用于修改左侧样式。 3 阅读全文
posted @ 2021-10-16 11:20 biuo 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 原文连接1:https://segmentfault.com/a/1190000019357253 原文连接2:https://www.jianshu.com/p/5bed07073ddd create-react-app 多页面 方法1 https://github.com/maoguijun/m 阅读全文
posted @ 2021-10-16 10:52 biuo 阅读(455) 评论(1) 推荐(0) 编辑
摘要: 原文连接:https://blog.csdn.net/changliangwl/article/details/82703251 js自定义监听事件及触发 <html> <body> <input id="input" > <button onclick="myEvent()">myEvent</b 阅读全文
posted @ 2021-10-16 10:36 biuo 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 原文连接:https://blog.csdn.net/debruyne/article/details/70313371 一、获取url内容 //设置或获取对象指定的文件名或路径。 alert(window.location.pathname); //设置或获取整个 URL 为字符串。 alert( 阅读全文
posted @ 2021-10-16 10:32 biuo 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 原文连接:https://www.jianshu.com/p/b4874462916c 在react中定义、使用全局变量 1.定义 新建一个js文件,写如下代码,定义全局变量 #例如起一个文件名为globalData.js global.全局变量名称= { aaa:'111', bbb:[]', } 阅读全文
posted @ 2021-10-16 10:22 biuo 阅读(8115) 评论(0) 推荐(0) 编辑