1/* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { PcCropModeBar } from './PcCropModeBar'; 17import { PhotoEditMode } from '../base/PhotoEditType'; 18import { BroadCast } from '@ohos/common'; 19 20/** 21 * 天枢图库图片编辑侧边工具栏 22 */ 23@Component 24export struct PcMainMenuBar { 25 src: string = ''; 26 @Consume('selected') selectedMode: number; 27 @Consume('scale') imageScale: number; 28 @Consume('barSize') barScale: Resource; 29 @Consume broadCast: BroadCast; 30 @Consume('verticalScreen') isVerticalScreen: boolean; 31 32 build() { 33 Flex({ 34 direction: FlexDirection.Column, 35 alignItems: ItemAlign.Center, 36 }) { 37 if (this.selectedMode == PhotoEditMode.EDIT_MODE_CROP) { 38 PcCropModeBar() 39 } 40 } 41 .height('100%') 42 .width('320vp') 43 } 44}