|
@@ -17,7 +17,7 @@
|
|
class="px-2"
|
|
class="px-2"
|
|
style="height: 100%; line-height: 100%;"
|
|
style="height: 100%; line-height: 100%;"
|
|
></v-text-field>
|
|
></v-text-field>
|
|
- <div class="searchBtn">搜索</div>
|
|
|
|
|
|
+ <div class="searchBtn" @click="handleSearch">搜索</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -25,9 +25,11 @@
|
|
import { useSharedState } from '@/store/sharedState'
|
|
import { useSharedState } from '@/store/sharedState'
|
|
import jobTypeCard from '@/components/jobTypeCard'
|
|
import jobTypeCard from '@/components/jobTypeCard'
|
|
import { ref, watch } from 'vue'
|
|
import { ref, watch } from 'vue'
|
|
-// import { useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
defineOptions({ name:'common-components-headSearch'})
|
|
defineOptions({ name:'common-components-headSearch'})
|
|
-// const router = useRouter()
|
|
|
|
|
|
+const route = useRoute(); const router = useRouter()
|
|
|
|
+const emits = defineEmits(['handleSearch'])// 定义一个或多个自定义事件
|
|
|
|
+
|
|
const text = ref('职位类型')
|
|
const text = ref('职位类型')
|
|
const value = ref('')
|
|
const value = ref('')
|
|
let drawer = ref(false)
|
|
let drawer = ref(false)
|
|
@@ -38,9 +40,11 @@ watch(() => sharedState.layoutClickCount, () => {
|
|
if (drawer.value) drawer.value = false
|
|
if (drawer.value) drawer.value = false
|
|
});
|
|
});
|
|
|
|
|
|
-// const jobClick = (jobInfo) => {
|
|
|
|
-// router.push({ path: '/recruit/position',query: jobInfo })
|
|
|
|
-// }
|
|
|
|
|
|
+const handleSearch = () => {
|
|
|
|
+ const path = '/recruit/position'
|
|
|
|
+ if (path === route.path) emits('handleSearch', {})
|
|
|
|
+ else router.push({ path: '/recruit/position',query: {} })
|
|
|
|
+}
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -73,6 +77,7 @@ watch(() => sharedState.layoutClickCount, () => {
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
color: #fff;
|
|
color: #fff;
|
|
background-color: var(--v-primary-base);
|
|
background-color: var(--v-primary-base);
|
|
|
|
+ cursor: pointer;
|
|
}
|
|
}
|
|
.jobTypeCardBox {
|
|
.jobTypeCardBox {
|
|
position: absolute;
|
|
position: absolute;
|