摘要: CSS-grid属性: value(可选值): <'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-a 阅读全文
posted @ 2024-05-10 14:35 追风不跟风 阅读(17) 评论(0) 推荐(0)
摘要: function getDataType(obj) { let type = typeof obj // 先判断是否为基础数据类型,直接返回 if (type !== 'object') return type; // 对于typeof返回结果是'object'的,在进行如下的判断,正则返回结果 r 阅读全文
posted @ 2023-12-07 14:48 追风不跟风 阅读(14) 评论(0) 推荐(0)
摘要: 本地开发跨域 本地开发一般使用下面 3 种方式进行处理 vite 的 proxy 进行代理 后台开启 cors 使用 nginx 转发请求 项目内部自带第一种方式,具体可以参考服务端交互-本地开发环境接口地址修改 生产环境跨域 生产环境一般使用下面 2 种方式进行处理 后台开启 cors 使用 ng 阅读全文
posted @ 2023-10-24 11:45 追风不跟风 阅读(17) 评论(0) 推荐(0)
摘要: 前提条件:iframe加载完后 let iframe = document.getElementById('iframeId').contentWindow; // 测试往里添加内容 iframe.document.body.innerText = 'hello' 阅读全文
posted @ 2023-08-28 19:06 追风不跟风 阅读(231) 评论(0) 推荐(0)
摘要: function dateFormat(time, fmStr) { const weekCN = '一二三四五六日' const weekEN = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunda 阅读全文
posted @ 2023-04-21 16:24 追风不跟风 阅读(106) 评论(0) 推荐(0)
摘要: // 计算数组中最大值 const arr = [1,2,3,4,5,6,7,8,9] let max = arr.reduce((max, age) => { return max > age ? max : age },0) <!--console.log(max)--> // 数组转哈希对象 阅读全文
posted @ 2022-10-28 11:30 追风不跟风 阅读(73) 评论(0) 推荐(0)
摘要: 1 <div class="outLayer"> 2 <div class="midLayer"> 3 <div class="contentLayer"> 4 ...内容... 5 </div> 6 </div> 7 </div> 1 .outLayer { 2 max-height: 40vh; 阅读全文
posted @ 2022-10-17 16:14 追风不跟风 阅读(182) 评论(0) 推荐(0)
摘要: let y = new Date().getFullYear() + '-' let m = (new Date().getMonth() + 1 < 10) ? '0' + (new Date().getMonth() + 1) + '-' : (new Date().getMonth() + 1 阅读全文
posted @ 2022-05-13 18:11 追风不跟风 阅读(1866) 评论(0) 推荐(0)
摘要: window.postMessage() 该window.postMessage()方法可以安全地实现对象之间的跨域通信Window;例如,在页面和它生成的弹出窗口之间,或者在页面和嵌入其中的 iframe 之间。 通常,当且仅当它们源自的页面共享相同的协议、端口号和主机(也称为“同源策略”)时,不 阅读全文
posted @ 2022-05-10 18:06 追风不跟风 阅读(714) 评论(0) 推荐(0)
摘要: .login_box{ width: 450px; height: 300px; background-color: white; border-radius: 3px; position: absolute; left: 50%; top: 50%; transform: translate(-5 阅读全文
posted @ 2022-01-02 17:12 追风不跟风 阅读(57) 评论(0) 推荐(0)