first
This commit is contained in:
+167
@@ -0,0 +1,167 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const activeTab = computed({
|
||||
get() {
|
||||
return route.path.startsWith("/users") ? "/users" : "/tasks";
|
||||
},
|
||||
set(path: string) {
|
||||
if (path !== route.path) {
|
||||
router.push(path);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const title = computed(() => String(route.meta.title ?? "EWA Mobile"));
|
||||
const showBack = computed(() => Boolean(route.meta.back));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<van-nav-bar :title="title" :left-arrow="showBack" fixed placeholder @click-left="router.back()" />
|
||||
|
||||
<main class="page">
|
||||
<router-view />
|
||||
</main>
|
||||
|
||||
<van-tabbar v-model="activeTab" route placeholder safe-area-inset-bottom>
|
||||
<van-tabbar-item to="/tasks" name="/tasks" icon="todo-list-o">Задачи</van-tabbar-item>
|
||||
<van-tabbar-item to="/users" name="/users" icon="friends-o">Пользователи</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
font-family:
|
||||
Inter,
|
||||
ui-sans-serif,
|
||||
system-ui,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
"Segoe UI",
|
||||
sans-serif;
|
||||
color: #172033;
|
||||
background: #f7f8fa;
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
|
||||
.page {
|
||||
box-sizing: border-box;
|
||||
width: min(760px, 100%);
|
||||
margin: 0 auto;
|
||||
padding: 24px 14px 40px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
margin: 12px 2px 18px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 6px;
|
||||
color: #1989fa;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 9vw, 4rem);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
margin: 12px 0 0;
|
||||
color: #646566;
|
||||
}
|
||||
|
||||
.notice {
|
||||
margin-bottom: 12px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.card {
|
||||
overflow: hidden;
|
||||
margin-bottom: 14px;
|
||||
border-radius: 18px;
|
||||
background: #fff;
|
||||
box-shadow: 0 12px 40px rgba(36, 42, 56, 0.08);
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
padding: 14px 16px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
padding: 14px 0 16px;
|
||||
}
|
||||
|
||||
.list-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 0 16px 12px;
|
||||
}
|
||||
|
||||
.list-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stacked-actions {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.state {
|
||||
justify-content: center;
|
||||
padding: 34px 0;
|
||||
}
|
||||
|
||||
.detail-card {
|
||||
padding: 14px 0 16px;
|
||||
}
|
||||
|
||||
.detail-actions {
|
||||
padding: 16px 16px 0;
|
||||
}
|
||||
|
||||
.employee-popup {
|
||||
box-sizing: border-box;
|
||||
max-height: 78vh;
|
||||
padding: 16px 0 22px;
|
||||
}
|
||||
|
||||
.employee-popup-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 0 16px 12px;
|
||||
}
|
||||
|
||||
.employee-avatar {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user