From 2c1aeee4df81271e5fc65445d2248ca05d4c31ee Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 8 Mar 2021 16:11:04 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=B4=A0=E6=9D=90=E5=BA=93=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.html | 46 ++++++++++++------- .../collection-tools.component.ts | 19 +++++++- .../ui/collection-tools-building/panel.scss | 12 +++++ .../collection-tools.component.html | 43 ++++++++++------- .../collection-tools.component.ts | 17 +++++++ src/app/ui/collection-tools-plan/panel.scss | 12 +++++ .../collection-tools.component.html | 44 +++++++++++------- .../collection-tools.component.ts | 17 +++++++ src/app/ui/collection-tools/panel.scss | 12 +++++ 9 files changed, 172 insertions(+), 50 deletions(-) diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index d253c0f..b79704f 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -61,7 +61,7 @@
-
+
@@ -125,23 +125,35 @@
- - - - - - -
-
- -

{{items.name}}

-
+
+ +
+
+ +

{{items.name}}

- - - +
+
+ + + + + + + +
+
+ +

{{items.name}}

+
+
+ +
+
+
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index fe08f8b..8339bb4 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -692,7 +692,7 @@ export class CollectionToolsBuildingComponent implements OnInit { let that = this window.setTimeout(()=>{ - document.getElementById("functionalDomainContent").oncontextmenu = function (event) { + document.getElementById("functionalDomainContentTwo").oncontextmenu = function (event) { // that.canvas.cancelPaint() that.selectImageIndex = -1 event.preventDefault(); @@ -2039,6 +2039,23 @@ export class CollectionToolsBuildingComponent implements OnInit { selectLibrary:any; //选中的素材库 selectImage:any; //选中的素材库图片 selectImageIndex:number; //选中的素材库图片index + searchSettimeout:any; //延时器 + searchInput:string = null; //模糊搜索 input + searchLibrary:any = []; //模糊搜索 素材 + + //输入框 输入事件 + libraryChange () { + window.clearTimeout(this.searchSettimeout) + this.searchSettimeout = window.setTimeout(()=>{ + if (this.searchInput === "") { + this.searchLibrary = [] + } else { + this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{ + this.searchLibrary = data + }) + } + },500) + } //获取素材库 getAllLibrary (type:string='input') { diff --git a/src/app/ui/collection-tools-building/panel.scss b/src/app/ui/collection-tools-building/panel.scss index fe2f0b7..2b1fed4 100644 --- a/src/app/ui/collection-tools-building/panel.scss +++ b/src/app/ui/collection-tools-building/panel.scss @@ -212,6 +212,18 @@ box-sizing: border-box; margin-left: 10px; } +//模糊搜索 input +.searchLibrary { + display: block; + border: 1px solid rgb(219, 212, 212); + border-radius: 5px; + outline: none; + box-sizing: border-box; + margin: 5px auto; + padding-left: 5px; + width: 95%; + height: 30px; +} .panelLibraryFlex { display: flex; flex-direction: row; diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index 0fdc889..9cc69c0 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -103,23 +103,34 @@
- - - - - - -
-
- -

{{items.name}}

-
+
+ +
+
+ +

{{items.name}}

- - - +
+
+ + + + + + + +
+
+ +

{{items.name}}

+
+
+ +
+
+
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 5bd8a51..79f35e0 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -2043,6 +2043,23 @@ export class CollectionToolsPlanComponent implements OnInit { selectLibrary:any; //选中的素材库 selectImage:any; //选中的素材库图片 selectImageIndex:number; //选中的素材库图片index + searchSettimeout:any; //延时器 + searchInput:string = null; //模糊搜索 input + searchLibrary:any = []; //模糊搜索 素材 + + //输入框 输入事件 + libraryChange () { + window.clearTimeout(this.searchSettimeout) + this.searchSettimeout = window.setTimeout(()=>{ + if (this.searchInput === "") { + this.searchLibrary = [] + } else { + this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{ + this.searchLibrary = data + }) + } + },500) + } //获取素材库 getAllLibrary (type:string='input') { diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss index 822d0e6..09b8ceb 100644 --- a/src/app/ui/collection-tools-plan/panel.scss +++ b/src/app/ui/collection-tools-plan/panel.scss @@ -212,6 +212,18 @@ box-sizing: border-box; margin-left: 10px; } +//模糊搜索 input +.searchLibrary { + display: block; + border: 1px solid rgb(219, 212, 212); + border-radius: 5px; + outline: none; + box-sizing: border-box; + margin: 5px auto; + padding-left: 5px; + width: 95%; + height: 30px; +} .panelLibraryFlex { display: flex; flex-direction: row; diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 921ba69..21f7a4b 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -202,23 +202,35 @@
- - - - - - -
-
- -

{{items.name}}

-
+
+ +
+
+ +

{{items.name}}

- - - +
+
+ + + + + + + +
+
+ +

{{items.name}}

+
+
+ +
+
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 4c19b08..9502f08 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -2092,6 +2092,23 @@ export class CollectionToolsComponent implements OnInit { selectLibrary:any; //选中的素材库 selectImage:any; //选中的素材库图片 selectImageIndex:number; //选中的素材库图片index + searchSettimeout:any; //延时器 + searchInput:string = null; //模糊搜索 input + searchLibrary:any = []; //模糊搜索 素材 + + //输入框 输入事件 + libraryChange () { + window.clearTimeout(this.searchSettimeout) + this.searchSettimeout = window.setTimeout(()=>{ + if (this.searchInput === "") { + this.searchLibrary = [] + } else { + this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{ + this.searchLibrary = data + }) + } + },500) + } //获取素材库 getAllLibrary (type:string='input') { diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss index dc0e63c..666a2ad 100644 --- a/src/app/ui/collection-tools/panel.scss +++ b/src/app/ui/collection-tools/panel.scss @@ -209,6 +209,18 @@ box-sizing: border-box; margin-left: 10px; } +//模糊搜索 input +.searchLibrary { + display: block; + border: 1px solid rgb(219, 212, 212); + border-radius: 5px; + outline: none; + box-sizing: border-box; + margin: 5px auto; + padding-left: 5px; + width: 95%; + height: 30px; +} .panelLibraryFlex { display: flex; flex-direction: row;