去除员工头像底色
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<LoadingState v-if="loading" text="正在加载员工" />
|
||||
<template v-else-if="employee">
|
||||
<section class="card employee-hero">
|
||||
<div class="employee-avatar" :style="{ backgroundColor: employee.color || '#e5eee9' }">
|
||||
<div class="employee-avatar">
|
||||
<img v-if="employee.avatar" :src="employee.avatar" alt="" />
|
||||
<span v-else>{{ (employee.name || employee.nickname || '员').slice(0, 1) }}</span>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@
|
||||
>
|
||||
<div class="modal-form">
|
||||
<div class="avatar-field">
|
||||
<div class="avatar-preview" :style="{ backgroundColor: employee?.color || '#e5eee9' }">
|
||||
<div class="avatar-preview">
|
||||
<img v-if="editForm.avatar" :src="editForm.avatar" alt="" />
|
||||
<span v-else>{{ (editForm.nickname || '员').slice(0, 1) }}</span>
|
||||
</div>
|
||||
@@ -398,6 +398,7 @@ watch(editModalVisible, syncEditDraft)
|
||||
height: 62px;
|
||||
overflow: hidden;
|
||||
border-radius: 22px;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
font-size: 24px;
|
||||
font-weight: 900;
|
||||
@@ -415,6 +416,16 @@ watch(editModalVisible, syncEditDraft)
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.employee-avatar span,
|
||||
.avatar-preview span {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
.employee-hero h2,
|
||||
.employee-hero p {
|
||||
margin: 0;
|
||||
@@ -492,6 +503,7 @@ watch(editModalVisible, syncEditDraft)
|
||||
height: 64px;
|
||||
overflow: hidden;
|
||||
border-radius: 22px;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
font-size: 24px;
|
||||
font-weight: 900;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<EmptyState v-else-if="employees.length === 0" title="暂无员工" description="新增美甲师后会显示在这里" />
|
||||
<section v-else class="list">
|
||||
<article v-for="employee in employees" :key="String(employee.userId || employee.id)" class="card employee-card" @click="router.push(`/employees/${employee.userId || employee.id}`)">
|
||||
<div class="employee-avatar" :style="{ backgroundColor: employee.color || '#e5eee9' }">
|
||||
<div class="employee-avatar">
|
||||
<img v-if="employee.avatar" :src="employee.avatar" alt="" />
|
||||
<span v-else>{{ (employee.name || employee.nickname || '员').slice(0, 1) }}</span>
|
||||
</div>
|
||||
@@ -191,11 +191,21 @@ watch(createModalVisible, syncCreateDraft)
|
||||
height: 58px;
|
||||
overflow: hidden;
|
||||
border-radius: 20px;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
font-size: 22px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.employee-avatar span {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
.employee-avatar img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user