From 5bc507a8a7be9cbbad0fa2472f72b1d336f31ef2 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期五, 25 四月 2025 16:58:52 +0800 Subject: [PATCH] ces --- src/views/home/index.vue | 6 +++++- src/views/home/components/searchBox.vue | 14 ++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/views/home/components/searchBox.vue b/src/views/home/components/searchBox.vue index b27a855..b003316 100644 --- a/src/views/home/components/searchBox.vue +++ b/src/views/home/components/searchBox.vue @@ -36,6 +36,10 @@ { value: "abstract", label: "鎽樿" }, { value: "source", label: "鏉ユ簮" }, ], + searchFun: { + type: Function, + default: () => {}, + }, }, }, data() { @@ -47,7 +51,7 @@ methods: { // 鎼滅储澶勭悊 handleSearch() { - this.$emit("search", { + this.$emit("searchFun", { text: this.searchText, type: this.selectedType, }); @@ -67,12 +71,11 @@ /* 杈撳叆妗嗘牱寮� */ .search-input { - background-color:transparent; - + background-color: transparent; } .inputBox { - border: 1px solid #B9A587; + border: 1px solid #b9a587; height: 38px; width: 400px; display: flex; @@ -106,10 +109,9 @@ .el-select /deep/ .el-input__inner { border-top-right-radius: 0; border-bottom-right-radius: 0; - border: 1px solid #B9A587; + border: 1px solid #b9a587; background-color: transparent; border-right: none; - } .el-input-group__prepend { diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 7518d17..b17288f 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -7,7 +7,7 @@ <p>瀛︽湳鎬濇兂浼犳壙澶氱淮搴︽暟鎹簱</p> </div> <div class="searchBox"> - <SearchBox /> + <SearchBox @searchFun="handleSearch" /> </div> </div> <div class="menuBox"> @@ -94,6 +94,10 @@ console.log(row); this.$router.push(row.path); }, + + handleSearch(type, value) { + console.log(type, value); + }, //鑾峰彇浜虹墿浠嬬粛 getPersonInfo() { this.MG.resource -- Gitblit v1.9.1