From b8dc50a06a897f252bec365cfca796ff52e2d06b Mon Sep 17 00:00:00 2001 From: SunnyQjm Date: Mon, 7 Oct 2019 16:03:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DhideFinishText?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=97=A0=E6=95=88=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 46 +++++++++++++-------------- src/components/taro-cropper/index.tsx | 4 +-- src/pages/index/index.tsx | 25 ++++++++------- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index b26bab4..55d19f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "taro-cropper", - "version": "1.0.5", + "version": "1.0.6", "private": false, "description": "Taro框架下的图片裁剪组件封装,开箱即用", "main": "dist/index.js", @@ -34,26 +34,26 @@ "license": "MIT", "dependencies": {}, "devDependencies": { - "@tarojs/cli": "1.3.14", - "@tarojs/components": "1.3.14", - "@tarojs/router": "1.3.14", - "@tarojs/taro": "1.3.14", - "@tarojs/taro-alipay": "1.3.14", - "@tarojs/taro-h5": "1.3.14", - "@tarojs/taro-qq": "1.3.14", - "@tarojs/taro-quickapp": "1.3.14", - "@tarojs/taro-swan": "1.3.14", - "@tarojs/taro-tt": "1.3.14", - "@tarojs/taro-weapp": "1.3.14", - "nervjs": "^1.4.4", - "nerv-devtools": "^1.4.4", + "@tarojs/cli": "1.3.19", + "@tarojs/components": "1.3.19", + "@tarojs/router": "1.3.19", + "@tarojs/taro": "1.3.19", + "@tarojs/taro-alipay": "1.3.19", + "@tarojs/taro-h5": "1.3.19", + "@tarojs/taro-qq": "1.3.19", + "@tarojs/taro-quickapp": "1.3.19", + "@tarojs/taro-swan": "1.3.19", + "@tarojs/taro-tt": "1.3.19", + "@tarojs/taro-weapp": "1.3.19", + "nervjs": "^1.4.6", + "nerv-devtools": "^1.4.6", "@types/react": "^16.4.6", "@types/webpack-env": "^1.13.6", - "@tarojs/plugin-babel": "1.3.14", - "@tarojs/plugin-csso": "1.3.14", - "@tarojs/plugin-sass": "1.3.14", - "@tarojs/plugin-uglifyjs": "1.3.14", - "@tarojs/webpack-runner": "1.3.14", + "@tarojs/plugin-babel": "1.3.19", + "@tarojs/plugin-csso": "1.3.19", + "@tarojs/plugin-sass": "1.3.19", + "@tarojs/plugin-uglifyjs": "1.3.19", + "@tarojs/webpack-runner": "1.3.19", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-jsx-stylesheet": "^0.6.5", @@ -61,14 +61,14 @@ "babel-preset-env": "^1.6.1", "babel-eslint": "^8.2.3", "eslint": "^5.16.0", - "eslint-config-taro": "1.3.14", + "eslint-config-taro": "1.3.19", "eslint-plugin-react": "^7.8.2", "eslint-plugin-react-hooks": "^1.6.1", "eslint-plugin-import": "^2.12.0", "stylelint": "9.3.0", - "stylelint-config-taro-rn": "1.3.14", - "stylelint-taro-rn": "1.3.14", - "eslint-plugin-taro": "1.3.14", + "stylelint-config-taro-rn": "1.3.19", + "stylelint-taro-rn": "1.3.19", + "eslint-plugin-taro": "1.3.19", "@typescript-eslint/parser": "^1.6.0", "typescript": "^3.0.1" }, diff --git a/src/components/taro-cropper/index.tsx b/src/components/taro-cropper/index.tsx index 09abbc5..c953079 100644 --- a/src/components/taro-cropper/index.tsx +++ b/src/components/taro-cropper/index.tsx @@ -534,12 +534,12 @@ class TaroCropperComponent extends Taro.PureComponent { - isWeapp && + isWeapp && !hideFinishText && finish } { - !isWeapp && + !isWeapp && !hideFinishText && finish } diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 3bcf4b4..51e9699 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -48,18 +48,19 @@ export default class Index extends Component { return ( { - this.setState({ - cutImagePath: res - }) - }} - /> + height={1000} src={src} + cropperWidth={400} + cropperHeight={400} + ref={this.catTaroCropper} + // themeColor={'#f00'} + // hideFinishText + fullScreen + onCut={res => { + this.setState({ + cutImagePath: res + }) + }} + />