- 博客(16)
- 收藏
- 关注
原创 html css 面试题
inline元素:水平:text-align:center。垂直:line-height的值等于height的值。垂直:top:50%+margin-top负值。absolute元素:水平:left:50%+margin-left负值。absoulte 依据最近一层的定位父元素定位。4,display为flex,inline-block。block元素:水平:margin:auto。3,overflow不是visible。rem,相对长度单位,相对于根元素。em,相对长度单位,相对于父元素。
2023-05-05 17:28:40
438
原创 uView报错Cannot read property ‘bottom‘ of null的解决方法
uViewUI报错Cannot read property 'bottom' of null的解决方法uViewUI在H5下报错’bottom’ of null,产生的原因是:吸顶组件u-sticky和底部导航栏tabbar切换页面时产生冲突,sticky组件创建了Observer监听,当切换页面且页面没有销毁时,导致组件仍然保持监听,所以出现Cannot read property ‘bottom’ of null报错解决办法...
2021-03-29 18:40:31
836
原创 ios上时间戳转换的bug
正常情况下时间戳的转换:new Date(startime).getTime();但是在ios上获取到的是NAN解决:new Date(date.replace(/-/g,'/')).getTime();
2020-04-23 16:51:30
486
原创 H5 微信分享设置自定义title与图片
先引入微信js文件 <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> wx.config({ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入...
2020-04-23 16:46:46
1550
原创 左边div宽度固定,右边宽度铺满;
1.使用float,盒子触发BFC(BFC详解:https://www.cnblogs.com/chen-cong/p/7862832.html)2.flex布局
2019-08-28 16:17:33
428
原创 自定义dialog
bootbox.dialog({ title: "<img src='/static/img/box_ques.png'/>", message: message, animate: false, // closeButton: false, buttons: { cancel: { label: '再想想',...
2019-06-04 15:43:04
136
原创 $.ajax向后台传file文件流
contentType: false,的解释请看https://segmentfault.com/a/1190000007207128;processData: false, 目前认识到的是序列化data数据的作用。
2019-06-04 15:16:56
3967
原创 文件大小限制
$(document).on('click', '.sign_up .file', function() { console.log($(".file").files) var max_size = 2 * 1024 * 1024; $(this).change(function(evt) { var files = evt.target.files; // 获得文件对象 ...
2019-06-04 14:56:31
510
原创 vue报错Error in render: "TypeError: Cannot read property 'name' of undefined"
因为请求是异步获取数据,所以最先开始item是一个空对象。item.tournament即为undefined。item.tournament.name就会报错解决办法:加一个v-if的判断条件
2019-04-10 16:14:43
13820
1
原创 vue 列表页传参跳转详情页,跳转后一级导航失去高亮
1.name与params结合使用,结果:2.path与query结合使用结果:router.js 配置如果跳转后一级导航不亮,/forecast是列表页,/plate是详情页
2019-03-27 15:13:58
2046
原创 vue-cli3 axios
添加axios: vue add axios main.js中引入 import axios from "axios";Vue.prototype.$axios = axios; get请求方式 post请求方式 axios.post('/api/news/matches', { page: 1, limit: 10, }) .then((re...
2019-02-28 15:58:37
5136
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人