上一页 1 ··· 7 8 9 10 11 12 13 14 下一页
摘要: <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 吃饭七分饱 阅读(451) 评论(0) 推荐(0) 编辑
摘要: import BigNumber from 'bignumber.js'; /** * 加法 * @param num { number } * @param rest { number } * @return {number} */ export const add = (num, ...rest 阅读全文
posted @ 2021-09-06 20:26 吃饭七分饱 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 重写toFixed方法 function toFixed(num, precision) { precision = Math.pow(10, precision); return Math.floor(num * precision) / precision;} 阅读全文
posted @ 2021-09-06 20:12 吃饭七分饱 阅读(87) 评论(0) 推荐(0) 编辑
摘要: /** 项目背景切换设计;默认明亮模式,如果需要切换到暗黑模式只需要在设置<body mode="dark"></body> *定义根dom body下的css变量 */ // 明亮模式颜色设置 body { --font-color: #fff; } 页面中通过var(--font-color)可 阅读全文
posted @ 2021-09-04 16:12 吃饭七分饱 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-08-28 14:35 吃饭七分饱 阅读(28) 评论(0) 推荐(0) 编辑
摘要: css设置 user-select: none; 阅读全文
posted @ 2021-08-27 13:51 吃饭七分饱 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 通过mixin引入 const clickoutside = { // 初始化指令 bind(el, binding, vnode) { function documentHandler(e) { // 这里判断点击的元素是否是本身,是本身,则返回 if (el.contains(e.target) 阅读全文
posted @ 2021-08-25 14:29 吃饭七分饱 阅读(214) 评论(0) 推荐(0) 编辑
摘要: <template> <div ref="virtual" class="virtual-empty" :style="{ height: height + 'px' }"> <div class="virtual-container" :style="{ height: clacHeight + 阅读全文
posted @ 2021-08-24 18:25 吃饭七分饱 阅读(279) 评论(3) 推荐(0) 编辑
摘要: 在vue.config.js中设置 css: { loaderOptions: { less: { globalVars: { hack: `true; @import '~@/assets/css/common.less';`, }, }, }, }, 设置多个全局文件 阅读全文
posted @ 2021-08-23 10:20 吃饭七分饱 阅读(281) 评论(0) 推荐(0) 编辑
摘要: // 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 吃饭七分饱 阅读(1134) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页