会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
AlanTao
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
26
下一页
2020年8月7日
vue项目中抽离.vue文件中的js代码
摘要: 1.vue文件 <template> <div class="alipayOrWxpay-wrapper"> </div> </template> <script> import alipayOrWxpay from './alipayOrWxpay' export default { ...ali
阅读全文
posted @ 2020-08-07 10:42 AlanTao
阅读(1014)
评论(0)
推荐(0)
2020年8月6日
监听用户点击浏览器后退按钮
摘要: var detectBack = { initialize: function() { //监听 hashchange 事件 window.addEventListener('hashchange', function() { //为当前导航页附加一个 tag this.history.replac
阅读全文
posted @ 2020-08-06 16:43 AlanTao
阅读(552)
评论(0)
推荐(0)
2020年7月2日
js数字精度补位
摘要: fixD: function(num, precision) { if (num + '' '0') { return num; } if (!num) { return '--'; } var newnum = parseFloat(num) + ''; if (newnum 'NaN') { r
阅读全文
posted @ 2020-07-02 13:41 AlanTao
阅读(409)
评论(0)
推荐(0)
2020年6月6日
cordova 热更新
摘要: 1.根目录.chcpenv { "content_url": "http://106.13.216.173:5636/hotpush", "config_url": "http://106.13.216.173:5636/hotpush/chcp.json" } // 线上 { "content_u
阅读全文
posted @ 2020-06-06 13:00 AlanTao
阅读(371)
评论(0)
推荐(0)
2020年5月30日
桌面快捷方式去掉小箭头
摘要: 去掉小箭头 reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,197" /t
阅读全文
posted @ 2020-05-30 23:07 AlanTao
阅读(221)
评论(0)
推荐(0)
2020年5月23日
重写js文件
摘要: 'use strict'; /** * 动态设置环境host.js的地址 * hostUrl => host.js路径 * process.env.npm_config_argv => 返回 {"remain":[],"cooked":["run","dev"],"original":["run",
阅读全文
posted @ 2020-05-23 16:19 AlanTao
阅读(383)
评论(0)
推荐(0)
vue webpack文件打包后的文件如何本地运行
摘要: (一)搭建express本地服务器 1、安装express-generator npm i express-generator -g 2、创建一个express项目 express my-express-project 3、进入项目目录 cd my-express-project 这时候能看到my-
阅读全文
posted @ 2020-05-23 15:24 AlanTao
阅读(10031)
评论(0)
推荐(1)
axios封装
摘要: axios.js import axios from 'axios'; import api from './api'; // 创建一个axios实例 const axiosService = axios.create({ timeout: 5000, // 设置超时时间为5s }); // 添加请
阅读全文
posted @ 2020-05-23 14:14 AlanTao
阅读(271)
评论(0)
推荐(1)
2020年5月10日
prettier.config.js
摘要: module.exports = { printWidth: 120, // 行长规则通常设置为100或120 singleQuote: true, // 使用单引号, 默认false semi: true, // 使用分号, 默认true arrowParens: 'avoid', // 箭头函数
阅读全文
posted @ 2020-05-10 23:32 AlanTao
阅读(2510)
评论(0)
推荐(0)
2020年4月19日
vue页面切换时,页面中的方法执行的顺序踩的坑
摘要: 当前有个需求:页面相互跳转中,在上一个页面(A页面)结束时使用$emit给父组件传值重置某些数据,在下一个页面(B页面)加载的时候也会给父组件传值给数据赋值。 我的做法是在A中使用 beforeDestroy() 在页面摧毁之前向父页面发送重置的信号,在B页面的 created() 方法中给父页面发
阅读全文
posted @ 2020-04-19 18:30 AlanTao
阅读(1959)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
26
下一页
公告