- 博客(78)
- 收藏
- 关注
转载 Android 中WebView中video视频自动播放
转载于https://juejin.im/post/5d5ac7eb51882562744fae37如果有使用过Android的WebView 播放视频的伙伴们一定会发现,在点开视频网页的时候并没有自动播,这时候如果要实现打开网页自动播放视频的话该怎么做呢?webView.getSettings().setMediaPlaybackRequiresUserGest...
2019-09-26 14:03:00
1100
转载 vue长按事件
来源https://github.com/OFED/translation/issues/3Vue.directive('longpress', { bind: function(el, binding, vNode) { // 确保提供的表达式是函数 if (typeof binding.value !== 'function') { /...
2019-09-05 10:08:00
340
转载 学习如何写一个vue插件【入门篇】
#### 疑答 1、市面上已经有那么多插件可用,为什么还要造轮子?学习、借鉴思想、应用到开发 2、能否在项目中使用?与网上插件使用相同 更新维护问题怎么解决? 自身动力,使用者反馈等#### 准备工具1.官方文档https://cn.vuejs.org/v2/guide/plugins.html2.github、npm网站账号、node/npm、git3.代码工具...
2019-08-29 22:38:00
257
转载 不想升级系统,mac安装xcode老版本
https://developer.apple.com/download/more/转载于:https://www.cnblogs.com/lanshengzhong/p/11269200.html
2019-07-30 12:00:00
2463
转载 【转】安卓模拟器连接端口一览表
模拟器名称 端口号-------------------------------------逍遥游 21503夜神模拟器 62001海马玩模拟器 26944网易mumu模拟器 ...
2019-06-14 11:55:00
329
转载 H5微信分享相关规范
微信分享用户调用微信的分享功能,可以自定义分享的title和描述,以及小图标和链接。可以分享到群、好友、朋友圈、QQ、QQ空间等。分享设计规范 分享标题:14字以内,建议使用朋友般亲切的口吻 分享图标:尺寸120*120,大小不超过10K,不支持GIF格式。必须采用https协议。 分享描述:20字以内,对标题的简要解读。 分享链接:外链页面所在服...
2019-05-30 09:41:00
625
转载 fastclick无需对IOS11及以上做处理
// 解决click点击300毫秒延时问题 (IOS11及以上无需处理)import FastClick from 'fastclick'const device = navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/)if (!device || parseInt(devic...
2019-04-23 10:30:00
300
转载 vue设置全局query参数
router.beforeEach((to, from, next) => { // 设置全局店铺ID shopid const shopid = from.query.shopid // 如果没有shopid 先跳转到总店 shopid为1 if (!shopid && !to.query.shopid) { router.r...
2019-04-17 10:16:00
855
转载 vue使用echart中国地图
/* 引入 ECharts (按需加载) 文档:http://echarts.baidu.com/tutorial.html#%E5%9C%A8%20webpack%20%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts */const echarts = require('echarts/lib/echarts')// 引入中国地图数...
2019-04-03 11:17:00
539
转载 页面缓存更新问题
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires -1; error_log off; access_log /dev/null; } location ~ .*\.(js|css|html)?$ { ...
2019-04-01 14:43:00
163
转载 vue data数据恢复初始化
Object.assign(this.$data, this.$options.data())转载于:https://www.cnblogs.com/lanshengzhong/p/10531573.html
2019-03-14 17:15:00
120
转载 vue中前进刷新、后退缓存方案收集
来源掘金: https://juejin.im/post/5b2ce07ce51d45588a7dbf76来源博客园 https://www.cnblogs.com/wonyun/p/8763314.html来源segmentfault https://segmentfault.com/a/1190000012083511转载于:h...
2019-03-05 14:50:00
274
转载 vue cli3 项目配置
【转】https://juejin.im/post/5c63afd56fb9a049b41cf5f4基于vue-cli3.0快速构建vue项目本章详细介绍使用vue-cli3.0来搭建项目。 本章使用vue-cli3.0构建的项目是基于webpack的模板文件,构建后的项目属于单页面(SPA)应用。因此,该文档后续操作与说明不适用于构建一个多页面应用。相比于之前有...
2019-02-16 10:43:00
145
转载 CSS 多行省略失效 (-webkit-box-orient 失效) Second Autoprefixer control comment was ignored. Autoprefixer app...
webpck不能编译这个属性-webkit-box-orient: verticalhttps://github.com/fanyifanbumaimeng/Articles/issues/48/* autoprefixer: ignore next */-webkit-box-orient: vertical;转载于:https://www.cnbl...
2019-02-14 10:14:00
569
转载 vue 设置当前页背景色
beforeRouteEnter(to, from, next) { // 添加背景色 document.querySelector('body').setAttribute('style', 'background-color:#f9f9f9') next() }, beforeRouteLeave(to, from, next) { ...
2019-01-23 14:17:00
1076
转载 vue history模式下的微信支付,及微信支付授权目录的填写,处理URL未注册
微信公众号配置网页授权域名:填写网址域名微信开发者平台配置url:访问url:http://www.baidu.com/pay/ment支付授权目录:http://www.baidu.com/pay/访问url:http://www.baidu.com/pay支付授权目录:http://www.baidu.com/访问url:http://www.baidu....
2019-01-23 14:13:00
321
转载 h5 audio播放问题,audio获取缓存进度条
<!--全局 audio --> <audio id="audio" @playing="audioReady" @timeupdate="audioUpdateTime" @pause="audioPaused" @ended="audioEnd" @error="aud...
2019-01-23 12:25:00
1063
转载 h5页面ios键盘弹出收起后页面底部留白问题
<input placeholder="验证码" type="tel" v-model="verify" maxlength="4" @input="change()" @focus="focusIn" @blur="blurIn" />focusIn() { // ios键盘弹出底部留白问题 const body = document.query...
2019-01-23 12:20:00
745
转载 vue项目中引入vant 使用rem布局问题
postcss.config.jsconst autoprefixer = require('autoprefixer')const pxtorem = require('postcss-pxtorem')module.exports = ({ file }) => { let rootValue // vant 37.5 https://g...
2019-01-23 12:15:00
999
转载 vue history模式下的微信分享
// 微信验证export function requireConfig() { let url = window.location.href systemApi.wxoption({ url: url }).then(res => { if (res.code === 200) { wx.config({ ...
2019-01-23 12:11:00
311
转载 基于element ui 实现七牛云自定义key上传文件,并监听更新上传进度
借助上传Upload 上传组件的http-request 覆盖默认的上传行为,可以自定义上传的实现 <el-upload multiple ref="sliderUpload" :data="uploadData" :action="uploadData.ur...
2019-01-23 11:56:00
419
转载 axios获取响应头
【转载】来源:https://segmentfault.com/a/1190000009125333在用 axios 获取 respose headers 时候获取到的只有的Object { cache-control:"private, must-revalidate", content-type:"application/json"}下面是服务...
2018-12-21 17:09:00
4220
转载 vue项目history模式下微信分享相关问题
import wx from '@/utils/wx'import { shareApi } from '@/api'// 微信验证export function requireConfig() { let url = window.location.href shareApi.share({ url: url }).then(res ...
2018-11-21 16:26:00
147
转载 深入理解Java的接口和抽象类
写的很好,容易理解 原文链接: http://www.cnblogs.com/dolphin0520/p/3811437.html一.抽象类 在了解抽象类之前,先来了解一下抽象方法。抽象方法是一种特殊的方法:它只有声明,而没有具体的实现。抽象方法的声明格式为:1abstractvoidfun();...
2018-11-06 21:57:00
66
转载 Java数组反转
public static void reverseArr(int[] arr) { /* 循环中定义变量min=0最小索引 max=arr.length‐1最大索引 min++,max‐‐ */ for (int min = 0, max = arr....
2018-11-05 11:26:00
196
转载 js时间转时间戳
转换成时间戳new Date('2018-10-11 14:28:47'.replace(/-/g, '/')).getTime() //1539239327000转载于:https://www.cnblogs.com/lanshengzhong/p/9803079.html
2018-10-17 11:32:00
74
转载 深入理解Java的接口和抽象类
作者:海子出处:https://www.cnblogs.com/dolphin0520/p/3811437.html一.抽象类 在了解抽象类之前,先来了解一下抽象方法。抽象方法是一种特殊的方法:它只有声明,而没有具体的实现。抽象方法的声明格式为:1abstractvoidfun();...
2018-10-16 17:05:00
89
转载 git提示Please enter a commit message to explain why this merge is necessary
Please enter a commit message to explain why this merge is necessary.请输入提交消息来解释为什么这种合并是必要的(提交信息)git 在pull或者合并分支的时候有时会遇到这个界面。可以不管(直接下面3,4步),如果要输入解释的话就需要:1.按键盘字母 i 进入insert模式2.修改最上面那行黄色合并...
2018-08-04 15:54:00
163
转载 webview默认是不开启localstorage的
.setDomStorageEnabled(true);// 打开本地缓存提供JS调用,至关重要转载https://blog.youkuaiyun.com/xhf_123/article/details/77893645转载于:https://www.cnblogs.com/lanshengzhong/p/9402289.html...
2018-08-01 16:58:00
720
转载 safari兼容时间格式 NAN
问题:safari中不支持2018-08-01这种格式转为时间戳会显示NaN方案:new Date('2018/08/01').getTime()将-转化为/// 正则替换new Date('2018-10-11 14:28:47'.replace(/-/g, '/'))八月伊始,我们都要好好的。转载于:https://www.cn...
2018-08-01 10:56:00
224
转载 高阶组件
高阶组件就是一个函数,传给它一个组件,它返回一个新的组件。新的组件使用传入的组件作为子组件。高阶组件的作用是用于代码复用,可以把组件之间可复用的代码、逻辑抽离到高阶组件当中。新的组件和传入的组件通过props传递信息。来源转载于:https://www.cnblogs.com/lanshengzhong/p/9391511.html...
2018-07-30 17:01:00
73
转载 浅析为什么用高阶组件代替 Mixins
转载来源感谢分享Mixins 引入了无形的依赖应尽量构建无状态组件,Mixin 则反其道而行之Mixin 可能会相互依赖,相互耦合,不利于代码维护不同的 Mixin 中的方法可能会相互冲突举个例子Mixins 有个主要用途是组件从其它数据源订阅数据:class CommentList extends React.Component { th...
2018-07-30 15:59:00
214
转载 github readme 添加图片预览
注意:图片是网络地址 所以我们要先把图片上传到github可以参考我的项目:https://github.com/lanshengzhong/mina_al...
2018-07-25 16:59:00
273
转载 vue打包多页报错webpackJsonp is not defined
找到build→webpack.prod.conf.js→找到HtmlWebpackPlugin插件,添加如下配置即可chunks: ['manifest', 'vendor', 'app']转载于:https://www.cnblogs.com/lanshengzhong/p/9345588.html...
2018-07-21 09:27:00
856
转载 MegaPixImage插件代码(new MegaPixImage)
/** * Mega pixel image rendering library for iOS6 Safari * * Fixes iOS6 Safari's image file rendering issue for large size image (over mega-pixel), ...
2018-07-20 14:43:00
310
转载 【react学习二】create-react-app 接入antd 并按需加载组件
1.安装cnpm i babel-plugin-import --save-dev2.使用在根目录下的package.json下的bable中添加相应代码"babel": { "presets": [ "react-app" ], "plugins": [ "transform-runtime", ...
2018-07-17 10:45:00
93
转载 canvas 计算文字宽度(常用于文字换行)
var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.font="30px Arial";var txt="Hello World"ctx.fillText("width:" + ctx.measureText(txt).width,10,50)ctx.fillText(t...
2018-07-16 09:34:00
802
转载 【react学习一】首先先create-react-app 配置less、sass
1.安装初始化npm create-react-app react-demo2.安装初始化npm run eject3.配置sass / lesscnpm i sass-loader node-sass -d代码片段1: exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/, /.scss$...
2018-07-12 15:52:00
89
转载 在vue-cli中使用px2rem,配合lib-flexible使用
原文地址附上github源码 看这里1.下载lib-flexiblenpm安装npm i lib-flexible --save2.引入lib-flexible在main.js中引入lib-flexibleimport 'lib-flexible/flexible'3.设置meta标签通过meta标签,设置设备宽度以及缩放比例...
2018-07-07 14:27:00
152
转载 【优化】SPA项目的基础优化
开启gzip压缩功能引入CDN路由懒加载某些第三方组件按需加载而不是全部加载较小的图片资源用base64嵌入src中,减少http请求转载于:https://www.cnblogs.com/lanshengzhong/p/9258686.html...
2018-07-03 15:07:00
146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人