profile
viewpoint
Li Mengjie lmjben iQIYI, Inc Beijing, China 微信公众号:前端日志

lmjben/cdfang-spider 942

成都房协网爬虫,可视化数据分析,欢迎 star 支持。

lmjben/front-end-navigation 91

前端导航,搜集前端开发有价值的网站,欢迎提交链接,让导航更完善。

lmjben/blog 72

我的博客源码,欢迎 star 支持!

lmjben/antd-form-demo 4

rc-form源码分析

lmjben/diy-webpack 4

手写webpack模块解析器

lmjben/mood-daily 4

a smallest daily about mood

lmjben/angular-kandian 3

angular-kandian

lmjben/awesome-f2e-libs 1

🎉 整理下我平时关注的前端库。

lmjben/common-framework 1

koa+swig搭建的通用前端框架。

lmjben/diy-react 1

手工做一个react

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 66c22378a0f3680cfa55899aab3ccb285176eaa0

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 5 days

push eventlmjben/blog

lmjben

commit sha e3bae088fab2ace443d5b29a8f13c5c01e8bb864

docs: 图解 Vue 响应式原理

view details

push time in 5 days

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 9c0ceb57d8b402fcb0b99859ae0d0e8680cebbb8

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 14 days

push eventlmjben/blog

lmjben

commit sha 67ead6c9bb299f36571f3a20ea078129feae292d

docs: 一文读懂 web 安全

view details

push time in 14 days

issue commentumijs/qiankun

子服务使用element-ui: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

上述的方案都试过,并没有生效,还有什么好的方案吗?

liuzhen88

comment created time in 14 days

issue commentumijs/qiankun

子服务使用element-ui: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

可以把以下代码插入到容器中,暂时来解决这个问题,但从长远来看,还是得想办法解决递归 parentNode 会访问到沙箱外原始 document 对象的问题

// 解决报错问题
var rawGetComputedStyle = window.getComputedStyle;
window.getComputedStyle = function (el, pseudoElt) {
  if (el === document) return {'overflow': 'auto'};
  return rawGetComputedStyle(el, pseudoElt);
}

// 解决定位问题
// 既然 popper.js 拿了 document 作为 offsetParent 对象,那将错就错,把 document 对象模拟成 document.documentElement 对象,使它可以正常运作
Object.defineProperty(document, 'scrollLeft', {
  get () {
    return document.documentElement.scrollLeft;
  }
});
Object.defineProperty(document, 'scrollTop', {
  get () {
    return document.documentElement.scrollTop;
  }
});

这段代码加在哪个地方呢?

liuzhen88

comment created time in 17 days

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha dad6ae37d622f622647cf8746b8ec0e46c1420c0

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 23 days

push eventlmjben/blog

lmjben

commit sha 0e65fc4c95aec7181e86b472f861a51e4e71f3ed

docs: 微前端自检清单

view details

push time in 23 days

startedfingerprintjs/fingerprintjs2

started time in a month

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 2df60f72cefb1cd7dff2bc44f67fe4b64001c481

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in a month

push eventlmjben/blog

lmjben

commit sha 36ebb7516a1d0a6452f0f699ca515901a7fb47fd

docs: 上半年总结

view details

lmjben

commit sha 7cf0c9b8d7e2df1de420c4a771cfdeacc8fab0c6

docs: 2020 上半年总结

view details

push time in a month

startedSHERlocked93/blog

started time in a month

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 662db8ca9d5a4ae8d1d705acd984835b61f342b8

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in a month

push eventlmjben/blog

lmjben

commit sha be043b0d69302008c4bd8640afcd8b9c168416fc

docs: JS 原型链

view details

push time in a month

startedlgwebdream/FE-Interview

started time in a month

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 23befc897f773ce8d13195bf147c9a7b48b959ae

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in a month

push eventlmjben/blog

lmjben

commit sha d0bf594ac4638ffd074c8c9f314b8d3a6ce4e4c2

docs: 前端登录文章

view details

push time in a month

startedBetaSu/just-react

started time in a month

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 062113b6c92a12d25363ec81908d7e59a6a48ea8

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in a month

push eventlmjben/blog

lmjben

commit sha 2387b753ba9f83749b80af577a9685db137a8738

docs: 读《博弈论》

view details

push time in a month

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 69ce7d23385c8710503b91e07d7478833183b9ea

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha 087c1317fcfd468e8a7fc2c9c825e6e7d70a9244

docs: 增加图片碎片化效果

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 59180027c981363302ba250e483d35da696ab056

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha 24b95b576c9aff5a1b8e83650750dd1b4c8383a3

docs: 增加翻译菜单

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 164491e07223bbb573f67fce92e6cc541be0f606

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha ec28367c32aeffb3908123497a67812426fbe88a

docs: 刷算法题

view details

push time in 2 months

push eventlmjben/front-end-navigation

robot (from Travis CI)

commit sha b577f4bd767066f54a64416bbd01aa4b04269074

Deploy lmjben/front-end-navigation to github.com/lmjben/front-end-navigation.git:gh-pages

view details

push time in 2 months

push eventlmjben/front-end-navigation

yhlben

commit sha bfefb722d4f8c1ef57701fb725522dc515df8b44

docs: 增加 svg 图片压缩工具

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 1bb441a6b17b966f8f5eececbe79593c0ea0dcd0

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha 38233e47b790aa467ceafb3d372af400c210c158

docs: 增加公众号图片

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 41652b9d38a49bab5e0b9e226dd4459b8fa245e4

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha e44b50b4f2f26d11aad4bab016e3b10891985153

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha d4338dbbdbacacde87331537106bfa82bdeb009f

docs: 新增 typescript 总结

view details

push time in 2 months

issue closedlmjben/cdfang-spider

寻求商务合作

您好,我们对您分享的“成都房源”项目十分感兴趣,想与您建立商务合作,可是您在github上没有留下联系方式,您方便留一下您邮箱或微信吗?方便我们与您取得联系~

closed time in 2 months

specialzxw

issue closedlmjben/cdfang-spider

网页失效了

closed time in 2 months

1278651995

issue commentlmjben/cdfang-spider

网页失效了

已恢复,谢谢

1278651995

comment created time in 2 months

issue closedlmjben/cdfang-spider

web端的docker拉不下来?

ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

closed time in 2 months

CZYAce

issue commentlmjben/cdfang-spider

寻求商务合作

您好,我们对您分享的“成都房源”项目十分感兴趣,想与您建立商务合作,可是您在github上没有留下联系方式,您方便留一下您邮箱或微信吗?方便我们与您取得联系~ 微信:yhl2016226

specialzxw

comment created time in 2 months

issue openedumijs/qiankun

[Feature Request] initGlobalState 返回值,支持 getGlobalState 方法获取当前的 globalState。

Background

主应用代码:

import { initGlobalState, MicroAppStateActions } from 'qiankun'
// 主应用中定义了全局对象
const actions = initGlobalState({
      data: {}
})
// 在子应用加载之前,修改了全局对象
actions.setGlobalState({
      data:{x:1,y:1}
})

子应用代码:

// 子应用 mount 生命周期的代码
export async function mount (props) {
  // 这里并不能捕获到全局变量的变化,因为主项目的状态在加载前已经变化了
  props.onGlobalStateChange((state, prev) => {
    console.warn('主项目状态变更')
  })
}

Proposal

子应用代码:

function render (props) {
  // 希望提供 getGlobalState 方法,获取最新的全局状态
  props.getGlobalState()
}

created time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 4cefe13dbab693f2b186345621d0d21564abbaa3

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 2 months

push eventlmjben/blog

lmjben

commit sha d3806e7829c9ad9eacfd1829acafc04c41997841

docs: 增加算法题

view details

push time in 2 months

push eventlmjben/cdfang-spider

lmjben

commit sha 2be1c8de953be4a3f58da83f6141967abe6e3a3c

chore: 优化 eslint 配置

view details

push time in 2 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 5371dae60614cf819b18eb2a7ab1a3ef5d33c4b4

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 3 months

push eventlmjben/blog

lmjben

commit sha 1bebb31667915d1ce0ae51300ee561d7bdce06cf

docs: 括号生成算法

view details

lmjben

commit sha 226b876cc41ab8e59b0d3721131a7c3faeeaa8ac

docs: 刷题

view details

push time in 3 months

startedEastWorld/wechat-app-mall

started time in 3 months

push eventlmjben/lmjben.github.io

Deployment Bot (from Travis CI)

commit sha 3f1ca28a29273f0641d9ae46d52eccc67b25950e

Deploy lmjben/lmjben.github.io to github.com/lmjben/lmjben.github.io.git:master

view details

push time in 3 months

push eventlmjben/blog

lmjben

commit sha f17fd383e220bc40674049b7ae4e317ab7459f3d

docs: 优化 flex 文章

view details

push time in 3 months

issue commentAdvanced-Frontend/Daily-Interview-Question

第 155 题:求最终 left、right 的宽度

先分析flex属性的信息 1.left容器 放大比例1,缩小比例 2 默认占500px 2.right容器 放大比例2,缩小比例 1 默认占400px

当子项目宽度总和大于父容器宽度时,如果有缩小比例将按照缩小比例进行压缩,比如子项目总和900px大于父容器600px,多出的300px将按照缩小比例进行压缩 left容器将会压缩2/3* 300 = 200px right容器将会压缩1/3* 300 =100px 所以最终left和right宽度都是300px

同理当子项目宽度总和小于父容器宽度时,如果有放大比例将按照放大比例进行扩张。

浏览器跑一下吧,不是这个结果

yygmind

comment created time in 3 months

more