芊芊一隅

导航

2022年11月10日 #

Js 数字,科学计数互转

摘要: function toNonExponential(num) {let x = num.toExponential()console.log(x)var m = num.toExponential().match(/\d(?:\.(\d*))?e([+-]\d+)/);return num.toFi 阅读全文

posted @ 2022-11-10 11:46 芊芊一隅 阅读(54) 评论(0) 推荐(0) 编辑

2021年3月29日 #

vue路由跳转错误:Error: Redirected when going from “/login“ to “/home“ via a navigation guard

摘要: 新建项目的时候配置了vue-router,发现控制台报错。把vue-router降低版本到3.0.7,手动修改就行了。其他方法可以查看下面链接写的比较具体 https://blog.csdn.net/weixin_44039043/article/details/109400572?utm_medi 阅读全文

posted @ 2021-03-29 14:06 芊芊一隅 阅读(2845) 评论(0) 推荐(0) 编辑

2021年2月2日 #

js简化过多if判断

摘要: https://zeyu7.com/zhe-xie-you-hua-ji-qiao-ke-yi-bi-mian-wo-men-zai-js-zhong-guo-duo-de-shi-yong-if-yu-ju/ 阅读全文

posted @ 2021-02-02 13:34 芊芊一隅 阅读(514) 评论(0) 推荐(0) 编辑

2021年1月30日 #

flutter 和vue 交互

摘要: https://blog.csdn.net/qq_41110569/article/details/108845705 阅读全文

posted @ 2021-01-30 16:52 芊芊一隅 阅读(1263) 评论(0) 推荐(0) 编辑

2020年12月31日 #

Vue报错:TypeError: Cannot create property ‘xxx‘ on string ‘xxxx

摘要: data 里的数据创建是 赋值了空字符串,用的时候给这个data 当做对象用了,将data里的数据类型改为对象就可以了 阅读全文

posted @ 2020-12-31 10:41 芊芊一隅 阅读(9843) 评论(0) 推荐(0) 编辑

2020年11月25日 #

vue 动态添加页面背景色

摘要: 1.html <div class="brand_zone" :style="{backgroundColor:colorList[type-1]}"></div>2.css .brand_zone{ position: fixed; width: 100%; height: 100%; top:  阅读全文

posted @ 2020-11-25 15:32 芊芊一隅 阅读(2399) 评论(0) 推荐(0) 编辑

vue 打开新页面 页面滚动到顶部

摘要: 在 main.js 中添加 router.afterEach((to, from, next) => { window.scrollTo(0, 0); }); 让详情页滚动到顶部 document.body.scrollTop = 0; document.documentElement.scroll 阅读全文

posted @ 2020-11-25 12:08 芊芊一隅 阅读(311) 评论(0) 推荐(0) 编辑

2020年11月19日 #

ios 系统 h5 页面不发送请求

摘要: 请求域名 http 改为https 阅读全文

posted @ 2020-11-19 16:27 芊芊一隅 阅读(443) 评论(0) 推荐(0) 编辑

2020年11月11日 #

小程序返回上一页

摘要: 这个有点像子-->父传值 第一步,在子页面点击上一步或者保存数据请求成功以后添加如下代码、 var pages = getCurrentPages(); var prevPage = pages[pages.length - 2]; //上一个页面 //直接调用上一个页面的setData()方法,把 阅读全文

posted @ 2020-11-11 18:18 芊芊一隅 阅读(537) 评论(0) 推荐(1) 编辑

2020年10月31日 #

小程序动态设置页面背景色、

摘要: 1.当前页面下的html文件 给外层view 取个page 类名,下面是css .page { display: block; min-height: 100%; width: 100%; position: absolute; left: 0; top: 0; z-index: 1; } 2. 在 阅读全文

posted @ 2020-10-31 19:49 芊芊一隅 阅读(1041) 评论(0) 推荐(0) 编辑