
H5
晓_枫
路漫漫其修远兮
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
echart 参数配置
let option = { color: ["#07BFE4", "#39FFAB", "#6C00FF",], //图例颜色 tooltip:{ // 鼠标放上去 提示框显示横坐标的数据 trigger:"axis", }, legend: [ // 图例可以为数组 或者 对象 ...原创 2020-09-16 17:23:13 · 425 阅读 · 0 评论 -
vue中使用layui
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" /> <script src="https://www.layuicdn.com/layui/layui.js"></script> 这里 我在index.html 中直接加载了...原创 2020-03-18 15:28:25 · 1404 阅读 · 0 评论 -
公众号 vue使用f2 总结
安装 npminstall@antv/f2--save 引入importF2from"@antv/f2";; html <canvas :id="f2id"></canvas> js this.chart = new F2.Chart({ id: this.f2id, // f2id 为...原创 2019-12-16 10:06:41 · 635 阅读 · 0 评论 -
小程序 自定义组件使用总结
根目录 新建component 文件夹 新建文件夹 名字为自己要写的组件 右键文件夹 新建 Component .wxss与.wxml 与 页面相同 .json { "component": true, //声明为组件 "usingComponents": {} } //自动生成的 .js Component({ /** * 组件的属性...原创 2019-12-05 16:55:24 · 190 阅读 · 0 评论 -
小程序使用 f2 总结
使用 npm 模块 在小程序根目录中 npm init 初始化 npm install @antv/f2-canvas 加载模块 在微信开发者工具中 菜单栏>工具>构建npm (要先加载模块然后再构建) 在要使用图表的页面 .json中的usingComponents 下添加 "ff-canvas": "@antv/f2-canvas" ...原创 2019-12-05 16:31:18 · 2314 阅读 · 0 评论 -
css样式重置
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0} html{color:#333;overflow-y:scroll;overflow:-moz-scrollbars-vertical;f...原创 2019-11-22 10:07:20 · 318 阅读 · 0 评论 -
vue 使用总结
import router from './router' // 根据路由设置标题 router.beforeEach((to, from, next) => { /*路由发生改变修改页面的title */ if(to.meta.title) { document.title = to.meta.title } next(); }) 在App.vue 中这...原创 2019-11-21 17:12:12 · 177 阅读 · 0 评论 -
vue-html5-editor中initHTMLEditor.js 文件配置
export default { // 全局组件名称,使用new VueHtml5Editor(options)时该选项无效 // global component name name: "vue-html5-editor", // 是否显示模块名称,开启的话会在工具栏的图标后台直接显示名称 // if set true,will append module name to...原创 2019-11-21 16:56:08 · 690 阅读 · 0 评论 -
vue-html5-editor 使用
安装 npm install vue-html5-editor 在main.js中 import VueHtml5Editor from 'vue-html5-editor' import '../src/assets/css/font-awesome.min.css' //引入样式 需要单独下载 import oedit from './components/initHTM...原创 2019-11-21 16:53:44 · 1618 阅读 · 0 评论 -
vue 高德地图使用
在 index.html 中引入 <scriptsrc="https://webapi.amap.com/maps?v=1.4.15&key=秘钥"></script> 在 vue.config.js 中 添加 configureWebpack:config=>{ config.externals={ AMa...原创 2019-11-21 15:55:42 · 1903 阅读 · 0 评论 -
以节点为目标滑动页面
document.getElementById("re_"+reply.id).scrollIntoView({behavior:"smooth",block:"center"}); 参考:https://developer.mozilla.org/zh-CN/docs/Web/API/Element/scrollIntoView原创 2019-11-11 15:34:20 · 180 阅读 · 0 评论 -
让浮层滑动 不影响底部页面滑动
var oBody = document.querySelector("body"); oBody.addEventListener("touchmove", preventDefault,{ passive: false }) function preventDefault(e){ e.preventDefault() } var collection = document.queryS...原创 2019-08-29 13:40:06 · 637 阅读 · 0 评论 -
动画效果 上下浮动,渐隐渐出
@keyframes start{ 0%, 30% { opacity: 0; transform: translateY(10px); } 60% { opacity: 1; transform: translate(0); } 100% { ...原创 2019-07-22 16:01:50 · 463 阅读 · 0 评论 -
网址的编码解码
编码 encodeURI(); encodeURIComponent(); 解码 decodeURI(); decodeURIComponent();原创 2019-07-13 10:34:08 · 347 阅读 · 0 评论 -
input 类型
https://www.cnblogs.com/haocool/p/3431181.html转载 2019-05-13 17:14:46 · 340 阅读 · 0 评论 -
手机号正则替换 中间4位为****
var reg = /^(\d{3})\d{4}(\d{4})$/; var a = 18731230865; a = a.replace(reg, '$1****$2');原创 2019-05-13 17:13:22 · 2013 阅读 · 0 评论 -
Html5的video标签自动填充满父div的大小
想要video能自动填充慢父div的大小,只要给video标签加上style="width= 100%; height=100%; object-fit: fill"即可。 object-fit语法 object-fit属性的语法非常的简单: object-fit:fill | contain | cover | none | scale-down object-fit取值说明 object-...转载 2019-05-13 17:11:10 · 2025 阅读 · 0 评论 -
移动端页面 适配
背景图background-size:cover 等比充满背景图 多余的隐藏原创 2019-05-13 17:10:06 · 142 阅读 · 0 评论 -
弹出层可以滚动 禁止底层滚动
document.querySelector('.outer').addEventListener('touchmove', function (event) { $("body").scrollTop(0) },false) 监听滚动并赋值原创 2019-05-13 12:00:27 · 2813 阅读 · 0 评论 -
动态添加js 在sources中显示
在js文件中顶部添加 //# sourceURL=exportquestionnaire.js转载 2019-05-16 13:22:25 · 912 阅读 · 0 评论 -
加载数据 下载Excel文件
/** * 导出列表方法 * @param {*} data 需要导出的数据 数组形式 [[表头],[数据1],[数据2]...] * @param {*} fileName 下载的文件名称 * @param {*} titleName 表格标题 * @param {*} type */ function downloadExl(data, fileNa...转载 2018-12-28 15:26:24 · 299 阅读 · 0 评论 -
复制 日期、数组、对象
此文章为转载,出处忘记了、、、 function clone(obj) { // Handle the 3 simple types, and null or undefined if (null == obj || "object" != typeof obj) return obj; // Handle Date i...转载 2018-12-11 14:17:33 · 152 阅读 · 0 评论 -
返回指定时间格式
// 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-0...转载 2018-12-26 18:18:29 · 809 阅读 · 0 评论 -
replaceAll 全局替换
String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); } 转自:https://www.jb51.net/article/40269.htm转载 2018-12-13 11:16:42 · 1044 阅读 · 0 评论 -
禁止选择文本
.noselect { -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Chrome/Safari/Opera */ -khtml-user-select: none; /* Konqueror */ -moz-user-select: none; /* Firefox */ -ms-user...转载 2018-11-20 11:46:46 · 682 阅读 · 0 评论 -
生成指定数量,指定范围,不重复的随机数
function randNum2(min,max,num){ if(num > max - min){ console.error('范围太小'); return false; } var range = max - min, minV = min +1, //实际上可以取的最小值 arr = [], tmp = ""; function ...转载 2018-11-19 09:24:12 · 1255 阅读 · 0 评论 -
根据URL地址生成二维码
下载qrcodejs URL:http://davidshimjs.github.io/qrcodejs/ 在页面中引用jq和qrcodejs var qrcode = new QRCode("qrcode", { text: data.shortURL, //URL地址 width: 260, height: 260, colorDark: '#000', ...原创 2018-10-18 18:35:27 · 11347 阅读 · 2 评论 -
jq ajax实现文件上传
html <input type="file" id="coverPhoto-file" onchange="submit()"> js function submit() { var formData = new FormData(); var file = document.getElementById("coverPhoto-file").fi...原创 2018-05-26 21:31:41 · 8462 阅读 · 0 评论 -
图表绘制插件
https://www.echartsjs.com/index.html原创 2019-01-22 09:15:17 · 678 阅读 · 0 评论 -
微信浏览器禁止下拉查看网址
var overscroll = function(el) { el.addEventListener('touchstart', function() { var top = el.scrollTop , totalScroll = el.scrollHeight , currentScroll = top + el.offsetHeig...转载 2019-02-12 11:31:12 · 2436 阅读 · 0 评论 -
flex下input不能自适应问题
input 自带最小宽度 当自适应宽度小于最小宽度是 会表现为最小宽度 解决:重置最小宽度原创 2019-04-27 10:45:13 · 993 阅读 · 0 评论 -
微信禁止转发
function onBridgeReady() { WeixinJSBridge.call('hideOptionMenu'); } if (typeof WeixinJSBridge == "undefined") { if (document.addEventListe...转载 2019-05-13 17:12:19 · 4212 阅读 · 0 评论 -
判断是否为PC
function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; ...原创 2019-04-02 12:18:28 · 954 阅读 · 0 评论 -
可以滑动,同时隐藏滚动条
::-webkit-scrollbar { display:none }转载 2019-04-01 10:34:51 · 581 阅读 · 0 评论 -
苹果字符串转时间
苹果只支持 2019/04/01 格式的时间 .replace(new RegExp("-","gm"),"/");转载 2019-04-01 10:33:31 · 197 阅读 · 0 评论 -
苹果输入框失去焦点页面下不来问题
$(".outer").on("blur","input",function(){ window.scrollTo(0,$(window).scrollTop()); })原创 2019-04-10 10:31:31 · 982 阅读 · 0 评论 -
锚链接 平稳滑动
滑动到顶部,底部 $( function () { var speed = 1000;//自定义滚动速度 //回到顶部 $( "#toTop").click( function () { $( "html,body").animate({ "scro...转载 2019-03-14 11:45:27 · 260 阅读 · 0 评论 -
layui table 点击行选中
$(document).on("click",".layui-table-body table.layui-table tbody tr",function(){ var obj = event ? event.target : event.srcElement; var tag = obj.tagName; var ...转载 2019-02-23 14:44:33 · 5772 阅读 · 1 评论 -
获取对象的属性和值
var names = "";for(var name in files[0]){ names+=name+": "+this[name]+", "; } alert(names);转载 2018-05-20 12:48:05 · 976 阅读 · 0 评论