mirror of
https://github.com/SunnyQjm/taro-cropper.git
synced 2026-06-03 08:16:46 +08:00
fix: 修复hideFinishText属性无效的bug
This commit is contained in:
+23
-23
@@ -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"
|
||||
},
|
||||
|
||||
@@ -534,12 +534,12 @@ class TaroCropperComponent extends Taro.PureComponent<TaroCropperComponentProps,
|
||||
disableScroll
|
||||
>
|
||||
{
|
||||
isWeapp &&
|
||||
isWeapp && !hideFinishText &&
|
||||
finish
|
||||
}
|
||||
</Canvas>
|
||||
{
|
||||
!isWeapp &&
|
||||
!isWeapp && !hideFinishText &&
|
||||
finish
|
||||
}
|
||||
</View>
|
||||
|
||||
+13
-12
@@ -48,18 +48,19 @@ export default class Index extends Component<IndexProps, IndexState> {
|
||||
return (
|
||||
<View className='index'>
|
||||
<TaroCropper
|
||||
height={1000} src={src}
|
||||
cropperWidth={400}
|
||||
cropperHeight={400}
|
||||
ref={this.catTaroCropper}
|
||||
// themeColor={'#f00'}
|
||||
fullScreen
|
||||
onCut={res => {
|
||||
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
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<Button onClick={() => {
|
||||
Taro.chooseImage({
|
||||
count: 1
|
||||
|
||||
Reference in New Issue
Block a user