profile
viewpoint
bukas huanz Bytedance China,Beijing https://www.noonme.com/ stay hungry, stay foolish

huanz/gulp-devserver 14

a gulp plugin for static server with livereload,ajax cross domain handler,simulation data generator

huanz/blog 5

个人博客

huanz/angular-lazy-render 2

angular lazy render page, speed up first screen

huanz/gulp-f2e-structure 2

gulp前端构建工具

huanz/ChromeExtensionDocument 1

chrome extension中文api文档

huanz/express-static-livereload 1

a express middleware to livereload static files

huanz/fe 1

fe resources collection前端资源搜藏集

huanz/gdown 1

a github repo download tool which support sub dirs or files/github项目下载工具,支持多项目单文件下载以及多级目录下载

huanz/30-seconds-of-code 0

Curated collection of useful Javascript snippets that you can understand in 30 seconds or less.

huanz/ads 0

ad domain collection

issue commentNervJS/taro

Taro 3.0.8 H5路由未找不触发componentDidNotFound

@Chen-jj 是 H5 ,希望支持下

huanz

comment created time in 4 days

issue commentNervJS/taro

Taro 3.0 没有 useScope 这个Hook了么?该怎么替代

createSelectorQuery 如何限制获取组件内的 节点呢?

wyx1818

comment created time in 7 days

starteddennis-jiang/Front-End-Knowledges

started time in 17 days

starteduiwjs/react-amap

started time in a month

startedAttackXiaoJinJin/reactExplain

started time in a month

pull request commentNervJS/taro

chore(release): publish 3.0.12

@ZakaryCode 3.0.12 包发的有问题啊,都多了一个dist里面都多了个 src 目录呢?

ZakaryCode

comment created time in a month

Pull request review commentNervJS/taro

fix(h5): uncompiled es syntax

 export const getModule = (appPath: string, {   const styleLoader = getStyleLoader([defaultStyleLoaderOption, styleLoaderOption])
   const topStyleLoader = getStyleLoader([defaultStyleLoaderOption, {
     insert: function insertAtTop (element) {
-      const parent = document.querySelector('head')
+      // eslint-disable-next-line no-var
+      var parent = document.querySelector('head')

@ZakaryCode 这里也需要改,这里的代码是源码插入进去的,一样存在未编译的 const ,你可以打包一下试试

huanz

comment created time in a month

PullRequestReviewEvent

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@ZakaryCode 这里也需要改,这里的代码是源码插入进去的,一样存在未编译的 const ,你可以打包一下试试

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

这只是其中一个地方的,其它几个地方 taroStyle 我在 webpack 里改掉了

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@ZakaryCode __taroAppConfig 你可以直接搜这个

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@ZakaryCode 在APP.js里面

image

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@ZakaryCode 你看下H5打出来的包prod包,里面是不是有 let

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

改 var 的地方都是这些代码没有被编译的,不改编译出来的代码里面会有 let ,你可以看下h5编译后的代码

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@Chen-jj 这个下个版本能合下么

huanz

comment created time in a month

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@Chen-jj 看下呗?

huanz

comment created time in 2 months

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@Chen-jj 因为里面有一些 es 语法又没有编译,web 上低版本浏览器有问题

huanz

comment created time in 2 months

pull request commentNervJS/taro

fix(h5): uncompiled es syntax

@Chen-jj

huanz

comment created time in 2 months

push eventhuanz/taro

yuhuanzhu

commit sha b8f947dec3bc87b2ba3565f59c1f04cd50ad26ee

fix(h5): eslint

view details

push time in 2 months

PR opened NervJS/taro

fix(h5): uncompiled es syntax

<!-- 请务必阅读贡献者指南: https://github.com/NervJS/taro/blob/master/CONTRIBUTING.md -->

<!-- PULL REQUEST TEMPLATE --> <!-- (Update "[ ]" to "[x]" to check a box) -->

这个 PR 做了什么? (简要描述所做更改)

修复打包H5部分es语法未编译

这个 PR 是什么类型? (至少选择一个)

  • [x] 错误修复(Bugfix) issue id #
  • [ ] 新功能(Feature)
  • [ ] 代码重构(Refactor)
  • [ ] TypeScript 类型定义修改(Typings)
  • [ ] 文档修改(Docs)
  • [ ] 代码风格更新(Code style update)
  • [ ] 其他,请描述(Other, please describe):

这个 PR 满足以下需求:

  • [ ] 提交到 master 分支
  • [x] Commit 信息遵循 Angular Style Commit Message Conventions
  • [x] 所有测试用例已经通过
  • [x] 代码遵循相关包中的 .eslintrc, .tslintrc, .stylelintrc 所规定的规范
  • [x] 在本地测试可用,不会影响到其它功能

这个 PR 涉及以下平台:

  • [ ] 微信小程序
  • [ ] 支付宝小程序
  • [ ] 百度小程序
  • [ ] 头条小程序
  • [ ] QQ 轻应用
  • [ ] 快应用平台(QuickApp)
  • [x] Web 平台(H5)
  • [ ] 移动端(React-Native)

其它需要 Reviewer 或社区知晓的内容:

+119 -15

0 comment

5 changed files

pr created time in 2 months

push eventhuanz/taro

yuhuanzhu

commit sha 226ac7f496a596ff3a7c9f8e2a50b5ed65dc2e9e

fix(h5): uncompiled es syntax

view details

push time in 2 months

fork huanz/taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5 等应用。 https://taro.jd.com/

https://taro-docs.jd.com/

fork in 2 months

startedelement-plus/element-plus

started time in 2 months

issue commentNervJS/taro

Taro 3.0.8 H5路由未找不触发componentDidNotFound & config.h5.router.mode = 'hash' 不生效

https://github.com/kriasoft/universal-router/blob/master/docs/api.md#const-router--new-universalrouterroutes-options 支持配置 errorHandler 捕获错误

huanz

comment created time in 2 months

issue openedNervJS/taro

Taro 3.0.8 H5路由未找不触发componentDidNotFound & config.h5.router.mode = 'hash' 不生效

<!-- 请不要删除自动生成的 Issue 标签 --> <!-- 请不要删除自动生成的 Issue 标签 -->

相关平台

H5

复现仓库

浏览器版本: Chrome 84 使用框架: React

复现步骤

taro3.0.8版本 h5 打开一个不存在的路由,只会报错 Uncaught (in promise) Error: Route not found,不会触发 componentDidNotFound

另外配置 h5: { // ... router: { mode: 'hash' // 或者是 'browser' } }

hash模式不生效

期望结果

  1. componentDidNotFound 能够监听到 H5路由不存在
  2. hash模式生效

实际结果

  1. 不触发
  2. 不生效

环境信息

👽 Taro v3.0.8


  Taro CLI 3.0.8 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.5.0 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.8 => 3.0.8 
      @tarojs/components: 3.0.8 => 3.0.8 
      @tarojs/mini-runner: 3.0.8 => 3.0.8 
      @tarojs/react: 3.0.8 => 3.0.8 
      @tarojs/runtime: 3.0.8 => 3.0.8 
      @tarojs/taro: 3.0.8 => 3.0.8 
      @tarojs/webpack-runner: 3.0.8 => 3.0.8 
      babel-preset-taro: 3.0.8 => 3.0.8 
      react: ^16.13.1 => 16.13.1 

<!-- generated by taro-issues. 请勿修改或删除此行注释 --><!--labels=T-h5,V-3,F-react-->

created time in 2 months

more