
前端随笔
world_kun
这个作者很懒,什么都没留下…
展开
-
盒子水平垂直居中的五大方案
页面结构代码:<style> .father { width: 500px; height: 500px; background-color: blue; } .child { width: 100px; height: 100px; background-color: #fff; }</style><div class="father" id="father"> <div clas原创 2021-07-14 11:00:48 · 239 阅读 · 0 评论 -
阻止H5左右滑动,保留上下滑动
let startX,startY;document.addEventListener("touchstart",function(e){ startX = e.touches[0].pageX; startY = e.touches[0].pageY;});document.addEventListener("touchmove",function(e){ var moveX = e.touches[0].pageX; var moveY = e.to...原创 2020-07-21 14:24:00 · 1927 阅读 · 0 评论 -
antd的form 的input输入框怎么限制不能输入空格
AntDesign中的Form表单其实提供了非常丰富的校验方式,有两种方式解决input不能输入空格的问题(具体看自己的需求),其它的校验也是大同小异,直接上代码<Form.Item label="名字"> {getFieldDecorator('name', { rules: [ { required: true, message: '请输入名字', }, // 方式一:正则匹配(转载 2020-06-23 10:10:32 · 10348 阅读 · 0 评论 -
如何通过Html网页调用本地安卓app并且获取从html传递过来的数据
一、通过html页面打开Android本地的app1、首先在编写一个简单的html页面<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert ti...原创 2019-12-19 14:18:33 · 975 阅读 · 0 评论 -
AntDesign 之Input控件,禁止用户输入空格
有两种解决方案,下面上代码<Form.Item> { getFieldDecorator("content",{ rules:[ { required:true, message:"内容不能为空" },...原创 2019-08-07 11:12:21 · 11737 阅读 · 0 评论 -
vue-demo示例
Vue-cnodejs- 基于vue重写Cnodejs.org的webapp NeteaseCloudWebApp- 高仿网易云音乐的webapp vue-zhihu-daily- 知乎日报 with Vuejs vue-wechat- vue.js开发微信app界面 vue2-demo- 从零构建vue2 + vue-router + vuex 开发环境 eleme-...转载 2019-08-15 13:48:21 · 13760 阅读 · 0 评论