|
@@ -0,0 +1,60 @@
|
|
|
|
+<!-- -->
|
|
|
|
+<template>
|
|
|
|
+ <div v-if="list?.length" class="btnBox" :style="`margin-right: ${props.mr}px;`">
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in list" :key="item.title"
|
|
|
|
+ :class="{'rl': !index, 'rr': index === list.length-1, 'active': item.path === route?.path}"
|
|
|
|
+ @click="handleUpdate(item)"
|
|
|
|
+ >
|
|
|
|
+ {{ item.title }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
|
+const route = useRoute()
|
|
|
|
+defineOptions({name: 'defineOptions-buttons'})
|
|
|
|
+const props = defineProps({
|
|
|
|
+ mr: {
|
|
|
|
+ type: [String],
|
|
|
|
+ default: '413'
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+const list = [
|
|
|
|
+ { title: '职位', path:'/recruit/personal/position' },
|
|
|
|
+ { title: '推荐', path:'' },
|
|
|
|
+ { title: '公司', path:'/recruit/personal/company' },
|
|
|
|
+]
|
|
|
|
+const handleUpdate = (item) => {
|
|
|
|
+ // if (item.path) router.push(item.path)
|
|
|
|
+ if (item.path) window.open(item.path)
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.btnBox {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ padding-top: 12px;
|
|
|
|
+ border-radius: 5px 5px 0 0;
|
|
|
|
+ div {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ padding: 6px 20px;
|
|
|
|
+ color: #004e46;
|
|
|
|
+ background: linear-gradient(to right, rgba(18, 235, 177, 0.2), rgb(47 139 119 / 15%));
|
|
|
|
+ &:hover {
|
|
|
|
+ // color: #004e46;
|
|
|
|
+ color: #004e46;
|
|
|
|
+ background: linear-gradient(to right, rgba(18, 235, 177, 0.742), rgb(47 139 119 / 32%));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.rl { border-radius: 5px 0 0 0; border: none; }
|
|
|
|
+.rr { border-radius: 0 5px 0 0; }
|
|
|
|
+.active {
|
|
|
|
+ font-weight: 500 !important;
|
|
|
|
+ color: #004e46 !important;
|
|
|
|
+ background: linear-gradient(to right, rgba(18, 235, 177, 0.742), rgb(47 139 119 / 32%)) !important;
|
|
|
|
+}
|
|
|
|
+</style>
|