From b045cb42391de855125addc9b4d600fdb074ee09 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期二, 01 八月 2023 11:00:41 +0800
Subject: [PATCH] fix 修复 注册页验证码不显示问题
---
src/components/HeaderSearch/index.vue | 80 ++++++++++++++++++++--------------------
1 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue
index 60ebb9d..9b0f2c6 100644
--- a/src/components/HeaderSearch/index.vue
+++ b/src/components/HeaderSearch/index.vue
@@ -17,12 +17,12 @@
</div>
</template>
-<script setup lang="ts">
-import Fuse from 'fuse.js'
-import { getNormalPath } from '@/utils/ruoyi'
-import { isHttp } from '@/utils/validate'
-import usePermissionStore from '@/store/modules/permission'
-import { RouteOption } from 'vue-router'
+<script setup lang="ts" name="HeaderSearch">
+import Fuse from 'fuse.js';
+import { getNormalPath } from '@/utils/ruoyi';
+import { isHttp } from '@/utils/validate';
+import usePermissionStore from '@/store/modules/permission';
+import { RouteOption } from 'vue-router';
type Router = Array<{
path: string;
@@ -34,7 +34,7 @@
const searchPool = ref<Router>([]);
const show = ref(false);
const fuse = ref();
-const headerSearchSelectRef = ref(ElSelect);
+const headerSearchSelectRef = ref<ElSelectInstance>();
const router = useRouter();
const routes = computed(() => usePermissionStore().routes);
@@ -123,9 +123,9 @@
searchPool.value = generateRoutes(routes.value);
})
-watchEffect(() => {
- searchPool.value = generateRoutes(routes.value)
-})
+// watchEffect(() => {
+// searchPool.value = generateRoutes(routes.value)
+// })
watch(show, (value) => {
if (value) {
@@ -142,40 +142,40 @@
<style lang="scss" scoped>
.header-search {
- font-size: 0 !important;
+ font-size: 0 !important;
- .search-icon {
- cursor: pointer;
- font-size: 18px;
- vertical-align: middle;
- }
-
- .header-search-select {
- font-size: 18px;
- transition: width 0.2s;
- width: 0;
- overflow: hidden;
- background: transparent;
- border-radius: 0;
- display: inline-block;
- vertical-align: middle;
-
- :deep(.el-input__inner) {
- border-radius: 0;
- border: 0;
- padding-left: 0;
- padding-right: 0;
- box-shadow: none !important;
- border-bottom: 1px solid #d9d9d9;
- vertical-align: middle;
+ .search-icon {
+ cursor: pointer;
+ font-size: 18px;
+ vertical-align: middle;
}
- }
- &.show {
.header-search-select {
- width: 210px;
- margin-left: 10px;
+ font-size: 18px;
+ transition: width 0.2s;
+ width: 0;
+ overflow: hidden;
+ background: transparent;
+ border-radius: 0;
+ display: inline-block;
+ vertical-align: middle;
+
+ :deep(.el-input__inner) {
+ border-radius: 0;
+ border: 0;
+ padding-left: 0;
+ padding-right: 0;
+ box-shadow: none !important;
+ border-bottom: 1px solid #d9d9d9;
+ vertical-align: middle;
+ }
}
- }
+
+ &.show {
+ .header-search-select {
+ width: 210px;
+ margin-left: 10px;
+ }
+ }
}
</style>
--
Gitblit v1.9.3