Skip to content

Commit

Permalink
Merge branch 'master' of github.com:NervJS/taro
Browse files Browse the repository at this point in the history
  • Loading branch information
Pines-Cheng committed Mar 27, 2019
2 parents 5d78b17 + 5e97f2f commit 3f6a7a7
Show file tree
Hide file tree
Showing 56 changed files with 166 additions and 143 deletions.
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
<a name=""></a>
# [](https://github.com/NervJS/taro/compare/v1.2.21...v) (2019-03-21)
# [](https://github.com/NervJS/taro/compare/v1.2.22...v) (2019-03-26)



<a name="1.2.22"></a>
## [1.2.22](https://github.com/NervJS/taro/compare/v1.2.21...v1.2.22) (2019-03-26)


### Bug Fixes

* **components-rn:** Picker date 格式 yyyy-MM-dd ([62b632c](https://github.com/NervJS/taro/commit/62b632c))
* **components-rn:** 大小写无法覆盖导致了引用问题 ([1dd42f3](https://github.com/NervJS/taro/commit/1dd42f3))
* **mobx:** 修复h5下,componentDidShow不触发的问题 ([#2583](https://github.com/NervJS/taro/issues/2583)) ([7076881](https://github.com/NervJS/taro/commit/7076881))
* **rn:** RN 下 navigationBarTextStyle 无效 close [#2119](https://github.com/NervJS/taro/issues/2119) ([0539c8e](https://github.com/NervJS/taro/commit/0539c8e))
* **rn:** RN端编译时提示Warning: isMounted(...) is deprecated close [#642](https://github.com/NervJS/taro/issues/642) ([5a9b66a](https://github.com/NervJS/taro/commit/5a9b66a))
* **rn:** 修复 Android 端 navigation header title 不居中的问题 ([5fb6fab](https://github.com/NervJS/taro/commit/5fb6fab))
* **rn:** 生成的 index 入口的 entryFileName 带文件后缀导致 ts 模版启动异常 ([7791edb](https://github.com/NervJS/taro/commit/7791edb))
* **rn:** 编译成rn之后,navigateBack delta参数无效,reLaunch提示不支持 close [#2494](https://github.com/NervJS/taro/issues/2494) ([cdeed45](https://github.com/NervJS/taro/commit/cdeed45))
* **taro-components:** H5 & Weapp统一pagePath. ([#2575](https://github.com/NervJS/taro/issues/2575)) ([cdd1370](https://github.com/NervJS/taro/commit/cdd1370))
* **taro-redux:** close [#2595](https://github.com/NervJS/taro/issues/2595),reopen [#1125](https://github.com/NervJS/taro/issues/1125) ([c93dbd5](https://github.com/NervJS/taro/commit/c93dbd5))
* **taro-swan:** 绕过百度小程序合并 setData 导致 properties observer 不触发的问题 ([d18c582](https://github.com/NervJS/taro/commit/d18c582))
* **taroize:** if 和 for 同在一个 tag 时报错,close [#2528](https://github.com/NervJS/taro/issues/2528) ([b366202](https://github.com/NervJS/taro/commit/b366202))
* **taroize:** template import 为兄弟关系时报错, close [#2535](https://github.com/NervJS/taro/issues/2535) ([65504ba](https://github.com/NervJS/taro/commit/65504ba))
* **taroize:** wxml 中包含单个花括号需要转换成 JSX 可以接受的格式 ([649800a](https://github.com/NervJS/taro/commit/649800a))
* **taroize:** 当 state/props 不是一个合法变量名时报错 ([e318812](https://github.com/NervJS/taro/commit/e318812)), closes [#2532](https://github.com/NervJS/taro/issues/2532)
* **transformer:** idea 系内置终端某些情况会乱码,close [#2530](https://github.com/NervJS/taro/issues/2530) ([2cb97b9](https://github.com/NervJS/taro/commit/2cb97b9))
* issue [#2534](https://github.com/NervJS/taro/issues/2534) ([418c6b2](https://github.com/NervJS/taro/commit/418c6b2))
* onError 对应的生命周期应是 componentDidCatchError ([#2571](https://github.com/NervJS/taro/issues/2571)) ([abbe73f](https://github.com/NervJS/taro/commit/abbe73f))
* **transformer:** 支持替换 jsx 中的属性名, close [#2077](https://github.com/NervJS/taro/issues/2077) ([443b1dc](https://github.com/NervJS/taro/commit/443b1dc))
* **webpack-runner:** 修复h5.imageUrlLoaderOption失效的问题 ([abbe23e](https://github.com/NervJS/taro/commit/abbe23e))
* **webpack-runner:** 升级webpack,fix [#2539](https://github.com/NervJS/taro/issues/2539) ([e013892](https://github.com/NervJS/taro/commit/e013892))


### Features

* **cli:** 去除页面默认标题 ([76344f0](https://github.com/NervJS/taro/commit/76344f0))
* **webpack-runner:** cssModules的module模式不再排除node_modules目录 ([c7f6a92](https://github.com/NervJS/taro/commit/c7f6a92))



Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

Taro 已经投入了我们的生产环境中使用,业界也在广泛地使用 Taro 开发多端应用。

[![案例](https://storage.360buyimg.com/taro-resource/user-cases.jpg?v4)](https://nervjs.github.io/taro-user-cases/)
[![案例](https://storage.360buyimg.com/taro-resource/user-cases.jpg?v5)](https://nervjs.github.io/taro-user-cases/)

[征集更多优秀案例](https://github.com/NervJS/taro/issues/244)

Expand Down Expand Up @@ -104,7 +104,7 @@ Taro 立足于微信小程序开发,众所周知小程序的开发体验并不

Taro 方案的初心就是为了打造一个多端开发的解决方案。目前 Taro 代码可以支持转换到 **微信/百度/支付宝/字节跳动小程序****H5 端** 以及 **移动端(React-Native)**

<div align="center"><img src="https://storage.360buyimg.com/taro-resource/platforms.jpg"/></div>
<div align="center"><img src="https://storage.360buyimg.com/taro-resource/platforms.jpg?v=1"/></div>

## 更多功能
如果你还想 Taro 支持新的特性,请使用 [FeatHub](https://feathub.com/NervJS/taro) 进行投票,我们将综合考虑投票结果等因素来确定开发的优先级。
Expand Down
10 changes: 5 additions & 5 deletions docs/component-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ button { } /* 在组件中不能使用 */

```jsx
/* CustomComp.js */
export default CustomComp extends Component {
export default class CustomComp extends Component {
static defaultProps = {
className: ''
}
Expand All @@ -45,7 +45,7 @@ export default CustomComp extends Component {

```jsx
/* MyPage.js */
export default MyPage extends Component {
export default class MyPage extends Component {
render () {
return <CustomComp className="red-text" />
}
Expand All @@ -63,7 +63,7 @@ export default MyPage extends Component {

```jsx
/* CustomComp.js */
export default CustomComp extends Component {
export default class CustomComp extends Component {
static externalClasses = ['my-class']

render () {
Expand All @@ -74,7 +74,7 @@ export default CustomComp extends Component {

```jsx
/* MyPage.js */
export default MyPage extends Component {
export default class MyPage extends Component {
render () {
return <CustomComp my-class="red-text" />
}
Expand All @@ -96,7 +96,7 @@ export default MyPage extends Component {

```jsx
/* CustomComp.js */
export default CustomComp extends Component {
export default class CustomComp extends Component {
static options = {
addGlobalClass: true
}
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"message": "chore(release): publish %s"
}
},
"version": "1.2.21",
"version": "1.2.22",
"npmClient": "npm"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-jsx-to-stylesheet",
"version": "1.2.21",
"version": "1.2.22",
"description": "Transform stylesheet selector to style in JSX Elements.",
"license": "MIT",
"main": "src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-transform-taroapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-taroapi",
"version": "1.2.21",
"version": "1.2.22",
"main": "dist/index.js",
"license": "MIT",
"scripts": {
Expand All @@ -10,7 +10,7 @@
"test": "jest"
},
"devDependencies": {
"@tarojs/taro-h5": "1.2.21",
"@tarojs/taro-h5": "1.2.22",
"@types/babel-core": "^6.25.5",
"@types/babel-traverse": "^6.25.4",
"@types/babel-types": "^7.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-taro",
"version": "1.2.21",
"version": "1.2.22",
"description": "Taro specific linting rules for ESLint",
"main": "index.js",
"files": [
Expand All @@ -27,6 +27,6 @@
"author": "O2Team",
"license": "MIT",
"dependencies": {
"eslint-plugin-taro": "1.2.21"
"eslint-plugin-taro": "1.2.22"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-taro",
"version": "1.2.21",
"version": "1.2.22",
"description": "Taro specific linting plugin for ESLint",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-plugin-constparse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-plugin-constparse",
"version": "1.2.21",
"version": "1.2.22",
"description": "parse constants defined in config",
"main": "index.js",
"author": "Simba",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-pxtransform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-pxtransform",
"version": "1.2.21",
"version": "1.2.22",
"description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
"keywords": [
"postcss",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-unit-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-taro-unit-transform",
"version": "1.2.21",
"version": "1.2.22",
"description": "小程序单位转换",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-config-taro-rn",
"version": "1.2.21",
"version": "1.2.22",
"description": "Shareable stylelint config for React Native CSS modules",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -28,7 +28,7 @@
"jest": "^23.6.0",
"npmpub": "^4.1.0",
"stylelint": "^9.9.0",
"stylelint-taro-rn": "1.2.21"
"stylelint-taro-rn": "1.2.22"
},
"peerDependencies": {
"stylelint": "^8.0.0 || ^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stylelint-taro-rn",
"description": "A collection of React Native specific rules for stylelint",
"version": "1.2.21",
"version": "1.2.22",
"main": "dist/index.js",
"babel": {
"presets": [
Expand Down
6 changes: 3 additions & 3 deletions packages/taro-alipay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/taro-alipay",
"version": "1.2.21",
"version": "1.2.22",
"description": "Taro alipay framework",
"main": "index.js",
"files": [
Expand All @@ -23,8 +23,8 @@
"author": "O2Team",
"license": "MIT",
"dependencies": {
"@tarojs/taro": "1.2.21",
"@tarojs/utils": "1.2.21",
"@tarojs/taro": "1.2.22",
"@tarojs/utils": "1.2.22",
"lodash": "^4.17.10",
"prop-types": "^15.6.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-async-await/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/async-await",
"version": "1.2.21",
"version": "1.2.22",
"description": "taro async await",
"main": "index.js",
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions packages/taro-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/cli",
"version": "1.2.21",
"version": "1.2.22",
"description": "cli tool for taro",
"main": "index.js",
"scripts": {
Expand All @@ -23,16 +23,16 @@
"author": "O2Team",
"license": "MIT",
"dependencies": {
"@tarojs/taroize": "1.2.21",
"@tarojs/transformer-wx": "1.2.21",
"@tarojs/taroize": "1.2.22",
"@tarojs/transformer-wx": "1.2.22",
"autoprefixer": "^8.4.1",
"babel-core": "^6.26.3",
"babel-generator": "^6.26.1",
"babel-plugin-danger-remove-unused-import": "^1.1.1",
"babel-plugin-remove-dead-code": "^1.3.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-define": "^1.3.0",
"babel-plugin-transform-jsx-to-stylesheet": "1.2.21",
"babel-plugin-transform-jsx-to-stylesheet": "1.2.22",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
Expand Down Expand Up @@ -64,7 +64,7 @@
"postcss-modules-resolve-imports": "^1.3.0",
"postcss-modules-scope": "^1.1.0",
"postcss-modules-values": "^1.3.0",
"postcss-pxtransform": "1.2.21",
"postcss-pxtransform": "1.2.22",
"postcss-reporter": "^6.0.1",
"postcss-taro-unit-transform": "1.2.15",
"postcss-url": "^7.3.2",
Expand All @@ -74,8 +74,8 @@
"semver": "^5.5.0",
"shelljs": "^0.8.1",
"stylelint": "^9.10.1",
"stylelint-config-taro-rn": "1.2.21",
"stylelint-taro-rn": "1.2.21",
"stylelint-config-taro-rn": "1.2.22",
"stylelint-taro-rn": "1.2.22",
"through2": "^2.0.3",
"vinyl": "^2.1.0",
"vinyl-fs": "^3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-rn",
"version": "1.2.21",
"version": "1.2.22",
"description": "多端解决方案基础组件(RN)",
"main": "./dist/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components",
"version": "1.2.21",
"version": "1.2.22",
"description": "",
"main:h5": "src/index.js",
"main": "dist/index.js",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-react-jsx": "^7.0.0",
"@babel/preset-env": "^7.1.5",
"@tarojs/taro-h5": "1.2.21",
"@tarojs/taro-h5": "1.2.22",
"@types/react": "^16.4.6",
"@types/urijs": "^1.15.38",
"babel-core": "^7.0.0-bridge.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/taro-components/src/components/tabbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class Tabbar extends Nerv.Component {
this.customRoutes.push([key, customRoutes[key]])
}

list.forEach( item => {
if (item.pagePath.indexOf('/') !== 0){
item.pagePath = "/" + item.pagePath
}
})

this.state = {
list,
selectedIndex: -1,
Expand Down
4 changes: 4 additions & 0 deletions packages/taro-components/types/Canvas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { StandardProps, CommonEventFunction } from './common'

export interface CanvasProps extends StandardProps {

width: number | string,

height: number | string

/**
* canvas 组件的唯一标识符
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-h5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/taro-h5",
"version": "1.2.21",
"version": "1.2.22",
"description": "Taro h5 framework",
"main:h5": "src/index.js",
"main": "dist/index.js",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
"@babel/plugin-transform-react-jsx": "^7.2.2",
"@babel/preset-env": "^7.3.4",
"@tarojs/taro": "1.2.21",
"@tarojs/taro": "1.2.22",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.4.0",
"jest": "24.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-mobx-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/mobx-common",
"version": "1.2.21",
"version": "1.2.22",
"description": "mobx library for taro",
"keywords": [
"mobx",
Expand Down
Loading

0 comments on commit 3f6a7a7

Please sign in to comment.