摘要: 关闭下拉框的动画样式 .ant-select-dropdown.slide-up-appear.slide-up-appear-active.ant-select-dropdown-placement-bottomLeft, .ant-select-dropdown.slide-up-enter.s 阅读全文
posted @ 2024-04-09 10:29 你风致 阅读(3) 评论(0) 推荐(0) 编辑
摘要: function getClose(url:string){ const openObj = window.open(url,"_blank"); //如果你是在另一个组件想关闭某窗口,需要定义个变量挂载到window下面,挂载到this下面不生效 (window as any).closeObj 阅读全文
posted @ 2024-03-11 10:19 你风致 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 当原生button没有定义type类型时,会自动触发表单的提交,大多数浏览器会认为它的type=“submit”; 这可能会导致一些表单验证不是在提交按钮的时候触发,而是点击其他按钮就触发了; 解决方式:将type的类型改为button,type="button"。 阅读全文
posted @ 2024-02-23 10:11 你风致 阅读(6) 评论(0) 推荐(0) 编辑
摘要: position属性中最有意思的就是sticky了,设置了sticky的元素,在屏幕范围内(viewport)时该元素的位置并不受到定位影响(设置是top、left等属性无效),当该元素的位置将要移出偏移范围时,定位又会变成fixed,根据设置的left、top等属性成固定位置的效果。(不会脱离文档 阅读全文
posted @ 2024-01-03 15:49 你风致 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 其实主要就是要定义content:""; before或after会相对定义position:relative;最近的元素去定位; 比如实现一个文本前的黑色圆点: p::before { content: ""; width: 4px; height: 4px; background-color: 阅读全文
posted @ 2023-12-04 10:21 你风致 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import AMapLoader from '@amap/amap-jsapi-loader'; export default class AMaps { options: any; //初始参数 instance: any; //实例 geocoder: any; //地理编码 placeSea 阅读全文
posted @ 2023-11-07 15:57 你风致 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 当我们更改了我们的一个entry入口起点的名称,甚至添加了一个新的入口,会发生什么? 会在构建时重新命名生成的 bundle,但是我们的 index.html 文件仍然引用旧的名称。 此时就可以用 HtmlWebpackPlugin 来解决这个问题。 在我们构建之前,虽然在 dist/ 文件夹我们已 阅读全文
posted @ 2023-10-11 09:45 你风致 阅读(47) 评论(0) 推荐(0) 编辑
摘要: flex布局,按行排列,让justify-content:center;的最后一行布局从最左边开始,而不是最后一行也居中 父元素:after{ content:''; flex:1 } 阅读全文
posted @ 2023-09-05 15:52 你风致 阅读(64) 评论(0) 推荐(0) 编辑
摘要: //调接口后端返回文件流 fetch(`downloadTemplate`, { method: 'POST', mode: 'cors', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(body), c 阅读全文
posted @ 2023-08-08 11:14 你风致 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 对于现代浏览器,例如webkit内核的浏览器,或者移动端,是可以实现多行文本内容超出点点点…最后一行显示的,典型的CSS组合如下: .box {display: -webkit-box;-webkit-line-clamp: 3;-webkit-box-orient: vertical;}其中-we 阅读全文
posted @ 2023-07-10 18:30 你风致 阅读(30) 评论(0) 推荐(0) 编辑