We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
远程集成: "@candies/image_cropper": "^1.0.2" 代码:
import * as image_cropper from "@candies/image_cropper"; import { image } from '@kit.ImageKit'; @Entry @Component struct Index { @State image: image.ImageSource | undefined = undefined; private controller: image_cropper.ImageCropperController = new image_cropper.ImageCropperController(); @State config: image_cropper.ImageCropperConfig = new image_cropper.ImageCropperConfig( { maxScale: 8, cropRectPadding: image_cropper.geometry.EdgeInsets.all(20), controller: this.controller, initCropRectType: image_cropper.InitCropRectType.imageRect, cropAspectRatio: image_cropper.CropAspectRatios.custom, } ); build() { Column() { if (this.image != undefined) { image_cropper.ImageCropper( { image: this.image, config: this.config, } ) } else { Row() .height('100%') .width('100%') } } } }
错误信息: 'image_cropper.ImageCropper( { image: this.image, config: this.config, } )' does not meet UI component syntax.
The text was updated successfully, but these errors were encountered:
经过研究,发现 ohpm install @candies/image_cropper 安装的包,不支持 import * as image_cropper from "@candies/image_cropper"; 这种写法,只能改成 import { ImageCropper } from "@candies/image_cropper";
ohpm install @candies/image_cropper
import * as image_cropper from "@candies/image_cropper";
import { ImageCropper } from "@candies/image_cropper";
即组件不支持这种引用方式,奇怪的是本地例子却支持
Sorry, something went wrong.
No branches or pull requests
远程集成:
"@candies/image_cropper": "^1.0.2"
代码:
错误信息:
'image_cropper.ImageCropper(
{
image: this.image,
config: this.config,
}
)' does not meet UI component syntax.
The text was updated successfully, but these errors were encountered: