CSS-盒模型

盒模型一个盒子由四个部分组成:content、padding、border、margincontent,即实际内容,显示文本和图像content 属性大都是用在::before/::after这两个「伪元素」中padding,即内边距,内容周围的区域内边距是「透明」的取值「不能为负」受盒子的background属...

时间格式化

12ex: "dayjs": "^1.11.0",npm install dayjs --save utils/data.js 12345678910111213141516171819import dayjs from 'dayjs';const ...

Vue3 封装展开收起组件

父组件 import ShowMore from ‘@/components/ShowMore.vue’; 123<show-more :show-height="338"> content </show-more> 子组件 123456789101...

页面置灰 uni-app为例

Css 123.filter-gray{ filter: grayscale(1);} Js 123456onShow() { document.querySelector('html').setAttribute('class',...

H5使用location.href跳转外部链接返回显示空白页,需要刷新才行

H5使用location.href跳转到外部链接,然后点击返回的时候显示的是空白页,要刷新才可以显示原本的页面。解决方案: 1234openLink(url) { window.history.pushState(null,null,window.location.href); window.locat...

H5 - iOS和安卓时间显示不一致(显示NAN问题)

问题:返回的时间格式为yyyy-MM-dd hh:mm:ss 安卓显示正常,IOS显示NAN解决办法: 把 - 转成 / 即可 var time = time.replace(/-/g,’/‘); 这行代码加上则可解决该问题

MarkDown

是一种轻量级标记语言,它允许人们使用易学易读的纯文本格式编辑文档,转换成有效的HTML或XHTML。 为什么不用word? word 优点:样式多,功能强大,可设置字体,字号,颜色等。 缺点:功能复杂,可能容易在字号等功能上纠结。 MarkDown 优点:注重自身结构,而不是样式,而不是样式 缺...

nodejs vue 动态加载出错Cannot find module '@/views/user/index'

123Error: Cannot find module '@/views/user/index' at webpackEmptyContext (index.js:39) at permission.js:61 原来写法 123export const loadView = (v...

Vue.extend 实现Tips提示组件封装

在components目录下新建 Tips文件夹作为 Tips 组件文件,新建 index.vue 和 index.js 文件进行组件封装,并在 main.js 中将组件挂载到vue原型上实现全局使用(只使用一次 可在request.js引用) components/Tips/index.vue: 1234567...

H5与APP混合开发问题

1.H5向APP界面跳转 1234567891011121314151617goTo() { const u = navigator.userAgent; const isAndroid = u.indexOf("Android") > -1 || u.indexOf(&q...