自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

原创 js点击a标签,打开新窗口预览图片

const imgSrc= '图片路径'var el = document.createElement("a");el.target = "_blank"; el.href = 'http://xxx?spUrl='+imgSrc; $("body").append(el)//将a标签插入页面el.click()//点击a标签实现跳转$(el).remove()//移除a标签

2021-08-10 16:48:02 3653

原创 设置vue的axios请求格式为form-data方式

// 设置vue的axios请求格式为form-data// 以下只是其中的一种方式axios({ method: 'post', url: 'http://localhost:8080/login', data: { username: this.loginForm.username, password: this.loginForm.password }, transformRequest: [ function (data) {

2021-05-20 09:49:46 625

原创 (前端)js 获取到秒的时间戳

var time = Date.parse( new Date() ).toString(); //精确到毫秒time = time.substr(0,10); //精确到秒

2021-04-29 10:04:31 2934

原创 Vue项目中的 Async 方法报Uncaught (in promise)如何解决?

加上try {}catch{}async getCode() { try { const res = await this.getCodeAsync() } catch (err) { console.log(err) }}

2021-04-29 10:02:44 3590 1

原创 前端自己测试部署到tomcat的项目,手机访问Tomcat下的webapps页面为空

Tomcat启动之后手机访问webapps里面的页面为空查看tomcat的8080端口是否被占用,停掉被占用端口即可访问web项目,

2021-04-29 09:58:52 311

原创 Vue3.0项目从构建到用tomcat打包并成功运行(前端)

1创建Vue3.0demo 1).全局安装 npm uninstall vue-cli -g2安装Tomcat(我的tomcat和jdk都安在了c盘,看自己想放在哪奥)1).Tomcat安装需要先下载jdk,选最近的版本jdk就可以附带网址 https://www.oracle.com/java/technologies/javase-downloads.html直接点击exe 安装 2).安完jdk之后配置环境变量控制面板----->系统和安全----->系统-----&

2021-04-23 16:11:19 1017 1

原创 小程序 (in promise)navigateTo:fail can not navigateTo a tabbar page 报错

(in promise) MiniProgramError{“errMsg”:“navigateTo:fail can not navigateTo a tabbar page”}object问题原因:经过查阅资料,知道使用navigateTo路由跳转方式,保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。解决办法:只需在js文件的点击事件中,配置跳转的url地址与tabbar中的跳转地址不一样就ok.我就简单说一下我用navigateTo方式实现的小程序路由跳转过程1.

2020-12-10 16:34:04 561

原创 小程序tabBar带文本展示

wx.removeTabBarBadge

2020-12-08 09:44:15 335

原创 小程序tabBar之间的传参

小程序tabBar之间的传参

2020-11-30 10:13:34 1346 4

原创 用Fly在小程序里面配置拦截器

微信小程序的 javascript 运行环境和浏览器不同。页面的脚本逻辑是在JsCore中运行,JsCore是一个没有窗口对象的环境,不能在脚本中使用window,无法在脚本中操作组件,JsCore中也没有 XmlhttpRequest对象,jquery 、zepto、axios这些在小程序中都不可以用下载文件https://unpkg.com/flyio@0.6.14/dist/fly.min.js新建http.js var Fly = require('./flyio'); // 引入

2020-11-24 10:08:26 404

原创 小程序的文件WXM引入语法

以下内容来自官方文档https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/import.html有两种方式:import和includeimportimport可以在该文件中使用目标文件定义的template,如:在 item.wxml 中定义了一个叫item的template:<!-- item.wxml --><template name="item"> <text>{{te

2020-11-24 09:44:47 343

原创 小程序框架的选择

小程序开发有哪些痛点?• 频繁调用 setData及 setData过程中页面跳闪• 组件化支持能力太弱(几乎没有)• 不能使用 less、scss 等预编译器• request 并发次数限制为什么使用第三方框架?• 只要熟悉vue或react即可快速上手,学习成本低 • 一套代码可在多端编译运行(微信,支付宝,h5,RN) 支付宝小程序暂不完善• 组件化开发,完美解决组件隔离,组件嵌套,组件通信等问题 • 支持使用第三方 npm 资源• 使小程序可支持 Promise,解决回调烦恼

2020-10-23 11:08:39 367

原创 antd的多个table渲染带复选框

{ <Col>{ this.state.tableData.map((Item,index) =>{ <Table columns=this.columns dataSource={item.tableData} rowKey={(record) => record.id} rowSelection={rowSelection(index)}/ expandedRowKeys={expandedRowKeys}>

2020-10-19 11:06:04 1638

原创 关于React引入组件报错

错误信息 Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might hav

2020-10-14 16:30:35 2636

原创 React子向父传值

父组件 import React, {Component} from 'react' import Child from './Child' export default class Parent extends Component { constructor(props) { super(props) this.state = { name: ''" } } getChildName = (r

2020-10-13 22:34:59 106

原创 React父组件向子组件传值

发发发

2020-10-13 22:23:31 268

原创 React页面变化页面数据清空问题

采用 sessionStorage.setItem('paramsId,‘123’) 存储数据 componentDidMount () { sesstionStorage.getItem('paramsId') }localStorage 和sessionStorage的主要区别在于 sessionStorage 在关闭页面后即被清空,而 localStorage 则会一直保存...

2020-09-19 00:53:41 2250

原创 React监听路由参数

原声 window.addEventListener('hashChange', () => { // 路由变化 }) componentWillUpdare(nextProps) { if(this.props.location !== nextProps.location) { // 路由变化 } }componentDidMount () { this.props.history.listern(() => { // 路由变化 ..

2020-09-19 00:31:11 581

原创 antd Select 参数 defaultValue 和 value 区别

window.history.pushStatewindow.hasChange

2020-09-19 00:19:41 2425

原创 小程序 wepy城市锚点事件

index.wpy<template> <view class="cityBox"> <view class="cityHead"> <view> <view class="nowLo">天津</view> </view> </view> <view class="city_list"> <scroll

2020-09-10 17:42:32 163

原创 Wepy微信小程序框架

WePY 框架在开发过程中参考了 Vue 等现有框架的一些语法风格和功能特性,对原生小程序的开发模式进行了再次封装,更贴近于 MVVM 架构模式, 并支持ES6/7的一些新特性。官网:https://wepyjs.github.io/wepy-docs/现在已经更新到2.x// WEPY踩坑首先给大家说一下 wepy 开发使用的说明(重要)1、使用微信开发者工具-->添加项目,项目目录请选择 dist 目录;2、微信开发者工具-->项目-->关闭 ES6 转 ES5。 重要:漏

2020-09-09 20:45:17 257

原创 微信小程序踩坑2

微信小程序踩坑2(持续更新)1.小程序跳转小程序功能(请注意 两个小程序之间需要相互绑定) 小程序根目录下的 app.json 文件用来对微信小程序进行全局配置 “navigateToMiniProgramAppIdList”: [“wxxxxxxxxxxxx”,“wxxxxxxxxxxxx”]    * appId    string   要打开的小程序 appId   &

2020-09-09 17:40:19 786

原创 React 踩坑1

// 以下是我近期踩到的坑1.在create-react-app中使用绝对路径在项目根目录的.env文件中加上NODE_PATH=src/ src目录下的文件相互引用就不需要加上../../,如:import modelConnect from "../../components/common/myCommonHead";// 以下直接引入import modelConnect from "components/common/myCommonHead";···················.

2020-09-09 12:10:24 191

原创 微信小程序踩坑1

附上以下网址微信小程序开发文档https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html微信小程序开发工具下载https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html微信小程序后台管理https://developers.weixin.qq.com/微信支付商户官网https://pay.weixin.qq.com===

2020-09-09 11:45:00 372

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除