helondeng
helondeng
waiting for it. @jeremypele 's method has an effect on drag event. My method is to cacalate the diff time between mouse down and mouse up event to detect the...
another problem is that e.offsetX is the relative distance of current mouse positoin and the e.target 's position (not the position of element. As jslider add four element into DOM)
>  乾坤嵌入后,engine-core.js中调用getPublicPath得到的路径为空''; 查找源码后, 发现 > > ```js > const publicPath = (document.currentScript as HTMLScriptElement)?.src.replace(/^(.*\/)[^/]+$/, '$1'); > > export function getPublicPath(): string { > return publicPath || ''; > }...
# Listview 太长引起的手机性能问题 内存中存留的DOM结构太多,导致滚动的 Listview 后面,点击响应会延迟,甚至无响应。 ### 解决方法是: 1. 在 li 外面包裹一层,将前面页码的 dom 移除,同时设置外层容器的高度(这样不至于影响滚动条)  2. 下拉滚动翻页过程中,对之前页码的数据进行隐藏。  向上滚动时,采取一定的策略将隐藏的数据显示 ``` var $lastHidden = $teacherList.find('li[data-show="hidden"]').last(), lastHiddenPage =...
require.resourceMap({ "res": {}, "pkg":{} }); 这个html的依赖的异步js不是loader分析出来的么?
另外这里asyncs的文件怎么没有打包了?
1. includeAsyncs 这货不是被注释了吗? 2. 考虑同步资源 allInOne 的同时,资源是否也直接 allInOne?这样开发不需要关注require, require.async打包的问题。在你的pack.js文件里面试着加上下面的语句,是可行了(loader的功能还是很强大的)。但是这里有一个引入的问题,即如何引入这个异步的JS。粗暴的逻辑是:**同步js加载完成后,就直接加载异步js(预加载),可以放在html 里面,也可以在同步js中require加载** ``` pack(resource,asyncs, 'pkg/${filepath}_async.js'); ``` 个人观点,欢迎指正。
依赖css的文件里面,require的是moduleId,但是分析时,用的是id,这两个不相等,就找不到依赖了