会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zeroRic
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
14
下一页
2021年9月9日
css处理ios刘海屏问题
摘要: <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" /> viewport-fit 设置为cover .hom
阅读全文
posted @ 2021-09-09 12:22 吃饭七分饱
阅读(497)
评论(0)
推荐(0)
2021年9月6日
bignumber.js处理小数高精度问题
摘要: import BigNumber from 'bignumber.js'; /** * 加法 * @param num { number } * @param rest { number } * @return {number} */ export const add = (num, ...rest
阅读全文
posted @ 2021-09-06 20:26 吃饭七分饱
阅读(284)
评论(0)
推荐(0)
JS toFixed四舍五入精度问题
摘要: 重写toFixed方法 function toFixed(num, precision) { precision = Math.pow(10, precision); return Math.floor(num * precision) / precision;}
阅读全文
posted @ 2021-09-06 20:12 吃饭七分饱
阅读(109)
评论(0)
推荐(0)
2021年9月4日
前端实现页面换肤功能
摘要: /** 项目背景切换设计;默认明亮模式,如果需要切换到暗黑模式只需要在设置<body mode="dark"></body> *定义根dom body下的css变量 */ // 明亮模式颜色设置 body { --font-color: #fff; } 页面中通过var(--font-color)可
阅读全文
posted @ 2021-09-04 16:12 吃饭七分饱
阅读(383)
评论(0)
推荐(0)
2021年8月28日
axios接口请求取消功能
摘要:
阅读全文
posted @ 2021-08-28 14:35 吃饭七分饱
阅读(35)
评论(0)
推荐(0)
2021年8月27日
collapse快速折叠文字自动选中问题
摘要: css设置 user-select: none;
阅读全文
posted @ 2021-08-27 13:51 吃饭七分饱
阅读(49)
评论(0)
推荐(0)
2021年8月25日
vue 点击非自身dom判断,使用directive
摘要: 通过mixin引入 const clickoutside = { // 初始化指令 bind(el, binding, vnode) { function documentHandler(e) { // 这里判断点击的元素是否是本身,是本身,则返回 if (el.contains(e.target)
阅读全文
posted @ 2021-08-25 14:29 吃饭七分饱
阅读(241)
评论(0)
推荐(0)
2021年8月24日
vue长列表虚拟滚动封装
摘要: <template> <div ref="virtual" class="virtual-empty" :style="{ height: height + 'px' }"> <div class="virtual-container" :style="{ height: clacHeight +
阅读全文
posted @ 2021-08-24 18:25 吃饭七分饱
阅读(319)
评论(3)
推荐(0)
2021年8月23日
Vue-cli4 全局less配置
摘要: 在vue.config.js中设置 css: { loaderOptions: { less: { globalVars: { hack: `true; @import '~@/assets/css/common.less';`, }, }, }, }, 设置多个全局文件
阅读全文
posted @ 2021-08-23 10:20 吃饭七分饱
阅读(304)
评论(0)
推荐(0)
2021年8月20日
vue collapse折叠动画组件(element transition文件)
摘要: // import { addClass, removeClass } from 'element-ui/src/utils/dom'; export function addClass(el, cls) { if (!el) return; var curClass = el.className;
阅读全文
posted @ 2021-08-20 15:05 吃饭七分饱
阅读(1270)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
14
下一页
公告