bianjiang 1 năm trước cách đây
mục cha
commit
d5a3c6e50f
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      src/views/website/Search/index.tsx

+ 6 - 2
src/views/website/Search/index.tsx

@@ -36,7 +36,7 @@ export default defineComponent({
     };
 
     const search = (e: any) => {
-      router.push({ path: "/search", query: { q: e.target.value } });
+      router.push({ path: "/search", query: { q: state.value } });
     };
 
     onMounted(() => getData());
@@ -65,7 +65,11 @@ export default defineComponent({
                 onChange={(e: any) => (state.value = e.target.value)}
               />
             </div>
-            <SearchOutlined class="text-18px cursor-pointer !text-gray-600 hover:opacity-80 active:opacity-60" />
+
+            <SearchOutlined
+              onClick={search}
+              class="text-18px cursor-pointer !text-gray-600 hover:opacity-80 active:opacity-60"
+            />
           </div>
           <div class="mt-50px <md:mt-25px">
             <div class="my-15px text-16px !leading-normal <md:(my-10px text-14px)">