导航

    Taro 社区

    Taro

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    • 话题
    • 热门
    • 群组
    1. 主页
    2. jd_422b8bf7ee726
    • 资料
    • 关注
    • 粉丝
    • 主题
    • 帖子
    • 最佳
    • 群组

    jd_422b8bf7ee726

    @jd_422b8bf7ee726

    我真的不浪~

    0
    声望
    4
    帖子
    1850
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录
    网站 juejin.cn/user/1697301684048200 位置 上海

    jd_422b8bf7ee726 关注

    jd_422b8bf7ee726 发布的帖子

    • taro2转taro3,typescript编译报错

      报错图片:
      791e71f0-080d-49f6-b712-ab4fab32184d-image.png
      8ef6accc-3429-447c-92e2-a517d202200b-image.png

      报错代码:

      import { PureComponent } from 'react'
      import PropTypes, { InferProps } from 'prop-types'
      import { View } from '@tarojs/components'
      import { CountdownProps, CountdownState } from '@/types/countdown'
      import CountdownItem from './item/index'
      
      const DAY_TO_SECONDS = 24 * 60 * 60
      const HOUR_TO_SECONDS = 60 * 60
      
      export default class ZtCountdown extends PureComponent<CountdownProps, CountdownState> {
        public static propTypes: InferProps<CountdownProps>
        public static defaultProps: CountdownProps
      
        constructor(props: CountdownProps) {
          super(props)
          this.state = {
            day: 0,
            hour: 0,
            minute: 0,
            second: 0,
          } as CountdownState
        }
      
        componentDidMount(): void {
          this.startCountDown()
        }
        // ...
      }
      
      // package.json
      "@babel/core": "^7.1.2",
          "@babel/plugin-proposal-class-properties": "^7.1.0",
          "@babel/plugin-transform-react-jsx": "^7.0.0",
          "@babel/preset-env": "^7.1.0",
          "@jiahuix/mini-html-parser2": "^0.1.6",
          "@tarojs/cli": "~3.0.2",
          "@tarojs/components": "~3.0.2",
          "@tarojs/mini-runner": "~3.0.2",
          "@tarojs/plugin-babel": "^2.2.2",
          "@tarojs/plugin-csso": "^2.2.2",
          "@tarojs/plugin-sass": "^2.2.2",
          "@tarojs/plugin-uglifyjs": "^2.2.2",
          "@tarojs/react": "~3.0.2",
          "@tarojs/router": "^2.2.2",
          "@tarojs/runtime": "~3.0.2",
          "@tarojs/taro": "~3.0.2",
          "@tarojs/taro-alipay": "^2.2.2",
          "@tarojs/taro-h5": "^2.2.2",
          "@tarojs/taro-swan": "^2.2.2",
          "@tarojs/taro-weapp": "^2.2.2",
          "@tarojs/webpack-runner": "^2.2.2",
          "@types/react": "^16.8.20",
          "@types/react-dom": "^17.0.0",
          "@types/sinon": "^5.0.5",
          "@types/webpack-env": "^1.13.6",
          "@typescript-eslint/eslint-plugin": "^2.26.0",
          "@typescript-eslint/parser": "^2.26.0",
          "@vuepress/plugin-active-header-links": "^1.0.0-rc.1",
          "@vuepress/plugin-back-to-top": "^1.0.0-rc.1",
          "@vuepress/plugin-nprogress": "^1.0.0-rc.1",
          "@vuepress/plugin-search": "^1.0.0-rc.1",
          "axios": "^0.21.1",
          "babel-core": "^7.0.0-bridge.0",
          "babel-eslint": "^10.0.1",
          "babel-jest": "^23.6.0",
          "babel-plugin-transform-class-properties": "^6.24.1",
          "babel-plugin-transform-decorators-legacy": "^1.3.4",
          "babel-plugin-transform-jsx-stylesheet": "^0.6.5",
          "babel-plugin-transform-object-rest-spread": "^6.26.0",
          "babel-plugin-transform-runtime": "^6.23.0",
          "babel-preset-env": "^1.6.1",
          "classnames": "^2.2.6",
          "cross-env": "^5.2.1",
          "eslint": "^6.8.0",
          "eslint-plugin-import": "^2.20.2",
          "eslint-plugin-react": "^7.19.0",
          "eslint-plugin-react-hooks": "^3.0.0",
          "highlight": "^0.2.4",
          "highlight.js": "^9.15.10",
          "husky": "^4.2.3",
          "jest": "^23.6.0",
          "lint-staged": "^8.0.3",
          "marked": "^1.2.8",
          "nerv-server": "^1.4.3",
          "nerv-test-utils": "^1.4.3",
          "nervjs": "^1.4.3",
          "prettier": "^2.2.1",
          "prop-types": "^15.7.2",
          "react": "^17.0.1",
          "regenerator-runtime": "^0.12.1",
          "simulant": "^0.2.2",
          "sinon": "^7.1.0",
          "stylus": "^0.54.8",
          "typescript": "~3.7.2",
          "vuepress": "^1.0.3"
      
      发布在 Taro
      jd_422b8bf7ee726
    • RE: 编译h5失败

      我app.less里边都是空的。。。我也是醉了。

      发布在 H5
      jd_422b8bf7ee726
    • 编译h5失败

      7fd8c804-a8c7-4791-9d70-359efa475b73-image.png
      这个是什么原因导致的?

      发布在 H5
      jd_422b8bf7ee726
    • 公共开发代码es6编译之后全部自动转成了es5,为什么?

      公共开发代码用es6开发的,在微信端编译之后开发文件的代码全部自动被转为es5了,微信客户端工具并没有开启es6转es5。请问这是为什么,转成es5之后再开发会比较别扭。。。

      发布在 微信小程序
      jd_422b8bf7ee726