自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 判断手机横屏竖屏

let _this = this let nav = document.getElementsByClassName('van-nav-bar') window.addEventListener("orientationchange", function() { if (window.orientation === 180 || window.orientation === 0) { // alert('竖屏状态!'); _this.sh...

2021-05-17 14:09:54 78

原创 vue瀑布流

<div ref="allBox" style="height: 430px; overflow-y: auto" @scroll="scrollEvent" >// 滚动条滚动事件 scrollEvent() { let boxHeight = this.$refs.allBox.scrollHeight; let scrollHeight = this.$refs.allBox.scrollTop + this.

2021-03-12 15:37:30 82

原创 localStorage

// 存储export const setLocalStorage = (key, data) => { window.localStorage.setItem(key, JSON.stringify(data))}// 获取export const getLocalStorage = (key) => { return JSON.parse(window.localStorage.getItem(key))}// 删除export const removeLo

2020-12-04 10:24:55 322

原创 有时会用到的 记录一下

// 判断一个字符串是否是数字类型isNumberString(ns) { if(isNaN(Number(ns))) { return alert('不是数字类型字符串') } else { return alert('是数字类型字符串') } },// 是否为jsonisJSON(str) { if (typeof str == "string") { try {

2020-12-04 10:16:00 91

原创 Object Method

用时粘贴// 删除某个数组下的对象 removeAaary(_arr, _obj) { var length = _arr.length; for (var i = 0; i < length; i++) { if (_arr[i] == _obj) { if (i == 0) { _arr.shift(); return _arr; } else if (i =

2020-12-04 10:11:03 123

原创 Date Frmat Method

用时直接粘贴// format=天 format=分function getCurrentDate(format) { var now = new Date(); var year = now.getFullYear(); //得到年份 var month = now.getMonth(); //得到月份 var date = now.getDate(); //得到日期 var day = now.getDay(

2020-12-04 10:03:18 91

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除