From 08843a87841ad55f64258b7bb0851942ed6d9233 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 27 Jan 2021 14:12:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E4=BD=9C=E6=88=98=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E5=A2=9E=E5=8A=A0=E9=99=90=E5=88=B6=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=B4=A0=E6=9D=90=E4=B8=8D=E8=83=BD=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E7=B2=98=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- angular.json | 4 ++-- .../collection-tools-plan/collection-tools.component.ts | 1 - .../ui/collection-tools/collection-tools.component.ts | 9 ++++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/angular.json b/angular.json index fefd3d8..b44cd73 100644 --- a/angular.json +++ b/angular.json @@ -64,8 +64,8 @@ "budgets": [ { "type": "initial", - "maximumWarning": "6mb", - "maximumError": "6mb" + "maximumWarning": "8mb", + "maximumError": "8mb" }, { "type": "anyComponentStyle", diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index dd5db9b..c591b0f 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -627,7 +627,6 @@ export class CollectionToolsPlanComponent implements OnInit { firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { let _this = this - AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 this.isMultipleAsset = false diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 400ca8b..c8227de 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -822,7 +822,14 @@ export class CollectionToolsComponent implements OnInit { copyAssetData:any //存储用于复制的素材 //复制素材 copyAsset(){ - this.canvas.copy() + if(this.canvas.selection.allowEdit()){//如果当前选中素材可以编辑 + this.canvas.copy() + }else{ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('当前选中素材不可复制','确定',config); + } } //粘贴素材 pasteAsset(){