![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
html
RubyLinT
这个作者很懒,什么都没留下…
展开
-
vue 返回上一页不刷新页面且滚动条位置不变
1.不刷新页面:设置路由:{ path: '/room/polling',name: 'roomList',component:()=>import("@/views/room/list.vue"),meta:{ title:'title', keepAlive: true // 需要缓存 }},设置原创 2021-06-10 14:24:13 · 1251 阅读 · 0 评论 -
前端实现调用手机照相机并加辅助框
首先必须是https服务代码如下:<!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"&g.原创 2021-05-26 11:11:55 · 1586 阅读 · 7 评论 -
移动端输入框获取焦点后,键盘弹出遮住内容问题
focus(name){this.$nextTick(()=>{letdom=document.getElementById(name)setTimeout(()=>{dom.scrollIntoView(true)},500);})}原创 2021-05-06 18:16:07 · 231 阅读 · 0 评论 -
浏览器返回事件监听
mounted(){ //监听注册history.pushState(null,null,document.URL);window.addEventListener('popstate',this.popstate,false)},//监听销毁beforeDestroy(){window.removeEventListener('popstate',this.popstate())},methods:{//监听处理...原创 2021-05-06 11:35:17 · 419 阅读 · 0 评论 -
移动端输入框,苹果手机无法输入,部分安卓手机获取焦点自动清空数据问题
1.苹果手机无法输入问题,解决办法:将*{-webkit-user-select:none;-moz-user-select:none;user-select:none;}改成*{-webkit-user-select:text!important;-moz-user-select:text!important;user-select:text!important;}2.部分安卓手机获取焦点自动清空数据问题:&l...原创 2021-01-08 20:20:43 · 404 阅读 · 0 评论 -
前端去除浏览器账号密码提示
在输入框前加上代码:<input type="password" name="oldPwdInput" placeholder="" maxlength="20" autocomplete="off" style="position: fixed;top:-1000px"><input style="display:none"><input type="password" style="display:none">去除输入框的name属性...原创 2020-06-30 11:49:20 · 1516 阅读 · 2 评论