shushu

Results 9 comments of shushu

https://github.com/NervJS/taro-ui/issues/1069#issuecomment-1255845400

`Taro v3.4.13` 开始支持 `designWidth` 传入函数 `taro-ui` 的设计稿是 750 的,项目的设计稿如果是 375 ,需要配置一下 `designWidth` ``` const config = { designWidth(input) { // taro-ui 的设计稿是 750 if (input.file.indexOf('taro-ui/dist') > -1) { return 750...

[https://wuba.github.io/taro-playground/#/pages/global/index](https://wuba.github.io/taro-playground/#/pages/global/index) 可操作复现,等待页面的 js 下载完了,才会跳转到对应页面 https://github.com/NervJS/taro/assets/6076072/6ca8dac4-9db6-43e2-a3c0-a6762f6611ae

> 可以使用 taro 的 eventcenter, 监听 '__taroRouterChange' 和 '__afterTaroRouterChange'即可 @ZEJIA-LIU 发版了么,Taro 哪个版本可以用了

> 感谢 PR~ 这里的判断逻辑不用修改,应该是修改以下代码吧 > > ```js > unstable_batchedUpdates(() => newEventHandler.call(this, e)) > ``` > > 改为 > > ```js > unstable_batchedUpdates(() => newEventHandler && newEventHandler.call(this, e)) > ``` newEventHandler...

> ```js > node.removeEventListener(eventName, undefined) > ``` 再这样改下就可以了 ``` oldEventHandler && node.removeEventListener(eventName, oldEventHandler) ```

加了一些 `polyfill` 可以在 IE 11 上显示了 ``` // 针对 antv 在 IE 11 下 remove 方法的 polyfill if (!('remove' in Element.prototype)) { Element.prototype['remove'] = function () { if (this.parentNode) {...

#### 6、使用 gulp-webserver 实现本地服务器及热更新 6.1 安装 `gulp-webserver` ``` $ cnpm install gulp-webserver --save-dev ``` gulp-webserver 继承自 gulp-connect,增加了更多的功能 6.2 使用 参考:[gulp-webserver](https://www.npmjs.com/package/gulp-webserver) ``` js var webserver = require('gulp-webserver') gulp.task('webserver', function() { gulp.src('dist')...

#### 使用 gulp.src 和 gulp.dest 批量处理目录 参考:[gulp API 文档](http://www.gulpjs.com.cn/docs/api/) ``` js var gulp = require('gulp'); var path = require('path'); var srcPath = { otherSource: ['src/css/*.css', 'src/fonts/*', 'src/images/*', 'src/js/*.js'] }; var...