style: 前端视觉与 mainPage 协调,浅色极简 + 靛蓝主色
- global.css 加设计令牌(与 mainPage variables.css 对齐:bg/surface/accent/ border/text/success/danger/warn/radius/shadow/transition) - App.vue 顶栏由深色(#2c3e50)改浅色(surface + border),视图切换器改分段样式 - 全部组件硬编码颜色令牌化:accent(主操作)/success(下载)/danger(删除)/ warn(单次徽章)/surface/border/text-* - 表单输入加 focus 描边、按钮统一 border+radius、阴影用令牌 - 月/周预览表头改浅灰、今日高亮改 accent-weak,网格边线用 border 令牌 - 事件配色 PALETTE 不变(数据可视化需高区分度) - 独立运行 42 测试通过、build 通过
This commit is contained in:
50
src/App.vue
50
src/App.vue
@@ -48,18 +48,21 @@ const { isLoaded, state, setViewMode } = useCalendar()
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* scoped:样式仅作用于本组件,作为组件被嵌入时不污染宿主。
|
/* scoped:样式仅作用于本组件,作为组件被嵌入时不污染宿主。
|
||||||
全局重置(* / body)已移至 src/styles/global.css,仅独立 app 加载。 */
|
全局重置与设计令牌在 src/styles/global.css(独立 app)/ 宿主 :root(嵌入时)。 */
|
||||||
.ttf-app {
|
.ttf-app {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* 适配嵌入:填满宿主 <main> 区域;独立 app 下 body 仍提供背景 */
|
/* 适配嵌入:填满宿主容器;独立 app 下 body 仍提供背景 */
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.ttf-header {
|
.ttf-header {
|
||||||
background: #2c3e50;
|
background: var(--surface);
|
||||||
color: #fff;
|
color: var(--text-primary);
|
||||||
padding: 14px 24px;
|
border-bottom: 1px solid var(--border);
|
||||||
|
padding: 12px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -68,30 +71,39 @@ const { isLoaded, state, setViewMode } = useCalendar()
|
|||||||
.ttf-header-left {
|
.ttf-header-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 24px;
|
gap: 20px;
|
||||||
|
}
|
||||||
|
.ttf-header h1 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.ttf-header h1 { font-size: 18px; font-weight: 600; white-space: nowrap; }
|
|
||||||
.ttf-view-switcher {
|
.ttf-view-switcher {
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #1a252f;
|
gap: 2px;
|
||||||
border-radius: 6px;
|
background: var(--surface-2);
|
||||||
overflow: hidden;
|
border-radius: var(--radius-sm);
|
||||||
|
padding: 2px;
|
||||||
}
|
}
|
||||||
.ttf-view-switcher button {
|
.ttf-view-switcher button {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #bdc3c7;
|
color: var(--text-secondary);
|
||||||
border: none;
|
border: none;
|
||||||
padding: 6px 16px;
|
padding: 5px 14px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.15s;
|
transition: all var(--transition);
|
||||||
}
|
}
|
||||||
.ttf-view-switcher button:hover { color: #fff; }
|
.ttf-view-switcher button:hover { color: var(--text-primary); }
|
||||||
.ttf-view-switcher button.active {
|
.ttf-view-switcher button.active {
|
||||||
background: #3498db;
|
background: var(--bg);
|
||||||
color: #fff;
|
color: var(--accent);
|
||||||
|
font-weight: 600;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
}
|
}
|
||||||
.ttf-main { flex: 1; display: flex; overflow: hidden; min-height: 0; }
|
.ttf-main { flex: 1; display: flex; overflow: hidden; min-height: 0; background: var(--bg); }
|
||||||
.ttf-detail-area { flex: 1; overflow-y: auto; }
|
.ttf-detail-area { flex: 1; overflow-y: auto; }
|
||||||
|
|
||||||
/* 移动端适配 */
|
/* 移动端适配 */
|
||||||
@@ -106,8 +118,8 @@ const { isLoaded, state, setViewMode } = useCalendar()
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
.ttf-header h1 { font-size: 15px; }
|
.ttf-header h1 { font-size: 14px; }
|
||||||
.ttf-view-switcher button { padding: 5px 10px; font-size: 12px; }
|
.ttf-view-switcher button { padding: 4px 10px; font-size: 12px; }
|
||||||
.ttf-main { flex-direction: column; }
|
.ttf-main { flex-direction: column; }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -55,39 +55,39 @@ function onPick(e) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 2px dashed #bdc3c7;
|
border: 2px dashed var(--border-strong);
|
||||||
border-radius: 12px;
|
border-radius: var(--radius);
|
||||||
margin: 40px;
|
margin: 40px;
|
||||||
transition: all 0.2s;
|
transition: all var(--transition);
|
||||||
}
|
}
|
||||||
.dropzone.active {
|
.dropzone.active {
|
||||||
border-color: #3498db;
|
border-color: var(--accent);
|
||||||
background: #eaf4fc;
|
background: var(--accent-weak);
|
||||||
}
|
}
|
||||||
.dropzone-content {
|
.dropzone-content {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.hint {
|
.hint {
|
||||||
color: #7f8c8d;
|
color: var(--text-secondary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
.pick-btn {
|
.pick-btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 24px;
|
padding: 10px 24px;
|
||||||
background: #3498db;
|
background: var(--accent);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: background 0.15s;
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
.pick-btn:hover {
|
.pick-btn:hover {
|
||||||
background: #2980b9;
|
background: var(--accent-hover);
|
||||||
}
|
}
|
||||||
.error {
|
.error {
|
||||||
color: #e74c3c;
|
color: var(--danger);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,22 +198,22 @@ function onToggleOcc(date) {
|
|||||||
.empty {
|
.empty {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 60px 20px;
|
padding: 60px 20px;
|
||||||
color: #95a5a6;
|
color: var(--text-tertiary);
|
||||||
}
|
}
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
margin: 20px 0 12px;
|
margin: 20px 0 12px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
border-bottom: 2px solid #ecf0f1;
|
border-bottom: 2px solid var(--border);
|
||||||
}
|
}
|
||||||
.form-group { margin-bottom: 16px; }
|
.form-group { margin-bottom: 16px; }
|
||||||
.form-group label {
|
.form-group label {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #34495e;
|
color: var(--text-secondary);
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
.form-group input,
|
.form-group input,
|
||||||
@@ -221,10 +221,19 @@ function onToggleOcc(date) {
|
|||||||
.form-group select {
|
.form-group select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
border: 1px solid #d5dbdb;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-primary);
|
||||||
|
transition: border-color var(--transition);
|
||||||
|
}
|
||||||
|
.form-group input:focus,
|
||||||
|
.form-group textarea:focus,
|
||||||
|
.form-group select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--accent);
|
||||||
}
|
}
|
||||||
.form-group textarea { resize: vertical; min-height: 60px; }
|
.form-group textarea { resize: vertical; min-height: 60px; }
|
||||||
.form-row { display: flex; gap: 16px; }
|
.form-row { display: flex; gap: 16px; }
|
||||||
@@ -234,35 +243,38 @@ function onToggleOcc(date) {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
border-top: 1px solid #ecf0f1;
|
border-top: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
padding: 7px 16px;
|
padding: 7px 16px;
|
||||||
border: none;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: background 0.15s;
|
transition: all var(--transition);
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.btn-primary { background: #3498db; color: #fff; }
|
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||||
.btn-primary:hover { background: #2980b9; }
|
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
|
||||||
.btn-secondary { background: #ecf0f1; color: #2c3e50; }
|
.btn-secondary { background: var(--bg); color: var(--text-secondary); }
|
||||||
.btn-secondary:hover { background: #d5dbdb; }
|
.btn-secondary:hover { background: var(--surface); color: var(--text-primary); }
|
||||||
.btn-danger { background: #e74c3c; color: #fff; }
|
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
|
||||||
.btn-danger:hover { background: #c0392b; }
|
.btn-danger:hover { filter: brightness(0.92); }
|
||||||
.split-panel {
|
.split-panel {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
background: #f8f9fa;
|
background: var(--surface);
|
||||||
border-radius: 8px;
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
.split-panel p { width: 100%; font-size: 13px; color: #7f8c8d; margin-bottom: 8px; }
|
.split-panel p { width: 100%; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
|
||||||
.split-panel input { padding: 6px 10px; border: 1px solid #d5dbdb; border-radius: 6px; }
|
.split-panel input { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.detail { padding: 16px; }
|
.detail { padding: 16px; }
|
||||||
|
|||||||
@@ -42,38 +42,39 @@ function dowFor(ev) {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.event-list {
|
.event-list {
|
||||||
width: 340px;
|
width: 340px;
|
||||||
background: #fff;
|
background: var(--bg);
|
||||||
border-right: 1px solid #e0e3e6;
|
border-right: 1px solid var(--border);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.stat { font-size: 12px; color: #95a5a6; padding: 12px 16px 8px; }
|
.stat { font-size: 12px; color: var(--text-tertiary); padding: 12px 16px 8px; }
|
||||||
.add-btn {
|
.add-btn {
|
||||||
margin: 0 16px 8px;
|
margin: 0 16px 8px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border: 1px dashed #3498db;
|
border: 1px dashed var(--accent);
|
||||||
background: #eaf4fc;
|
background: var(--accent-weak);
|
||||||
color: #2980b9;
|
color: var(--accent);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
.add-btn:hover { background: #d4eaf9; }
|
.add-btn:hover { background: var(--surface-2); }
|
||||||
.list { flex: 1; overflow-y: auto; }
|
.list { flex: 1; overflow-y: auto; }
|
||||||
.event-item {
|
.event-item {
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
border-bottom: 1px solid #eef0f2;
|
border-bottom: 1px solid var(--border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.12s;
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
.event-item:hover { background: #f8f9fa; }
|
.event-item:hover { background: var(--surface); }
|
||||||
.event-item.active {
|
.event-item.active {
|
||||||
background: #eaf4fc;
|
background: var(--accent-weak);
|
||||||
border-left: 3px solid #3498db;
|
border-left: 3px solid var(--accent);
|
||||||
}
|
}
|
||||||
.title { font-weight: 600; font-size: 14px; color: #2c3e50; margin-bottom: 3px; }
|
.title { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 3px; }
|
||||||
.meta { font-size: 12px; color: #7f8c8d; }
|
.meta { font-size: 12px; color: var(--text-secondary); }
|
||||||
.badge {
|
.badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 1px 7px;
|
padding: 1px 7px;
|
||||||
@@ -82,15 +83,15 @@ function dowFor(ev) {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
.badge-recur { background: #e8f5e9; color: #2e7d32; }
|
.badge-recur { background: var(--success-weak); color: var(--success); }
|
||||||
.badge-single { background: #fff3e0; color: #e65100; }
|
.badge-single { background: var(--warn-weak); color: var(--warn); }
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.event-list {
|
.event-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 40vh;
|
max-height: 40vh;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-bottom: 1px solid #e0e3e6;
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -51,24 +51,26 @@ function onDownload() {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
|
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
|
||||||
.btn {
|
.btn {
|
||||||
padding: 7px 16px;
|
padding: 7px 16px;
|
||||||
border: none;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: background 0.15s;
|
transition: all var(--transition);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||||
.btn-primary { background: #3498db; color: #fff; }
|
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||||
.btn-primary:hover:not(:disabled) { background: #2980b9; }
|
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
|
||||||
.btn-success { background: #27ae60; color: #fff; }
|
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
|
||||||
.btn-success:hover:not(:disabled) { background: #229954; }
|
.btn-success:hover:not(:disabled) { filter: brightness(0.92); }
|
||||||
.btn-secondary { background: #ecf0f1; color: #2c3e50; }
|
.btn-secondary { background: var(--bg); color: var(--text-secondary); }
|
||||||
.btn-secondary:hover:not(:disabled) { background: #d5dbdb; }
|
.btn-secondary:hover:not(:disabled) { background: var(--surface); color: var(--text-primary); }
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.header-actions { gap: 6px; }
|
.header-actions { gap: 6px; }
|
||||||
|
|||||||
@@ -135,20 +135,21 @@ function hideTooltip() {
|
|||||||
}
|
}
|
||||||
.nav-btn {
|
.nav-btn {
|
||||||
padding: 5px 14px;
|
padding: 5px 14px;
|
||||||
border: 1px solid #d5dbdb;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
background: #fff;
|
background: var(--bg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
.nav-btn:hover { background: #ecf0f1; }
|
.nav-btn:hover { background: var(--surface); }
|
||||||
.today-btn { border-color: #3498db; color: #3498db; font-weight: 600; }
|
.today-btn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
|
||||||
.today-btn:hover { background: #eaf4fc; }
|
.today-btn:hover { background: var(--accent-weak); }
|
||||||
.month-label {
|
.month-label {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -158,33 +159,33 @@ function hideTooltip() {
|
|||||||
grid-template-columns: repeat(7, 1fr);
|
grid-template-columns: repeat(7, 1fr);
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
background: #e0e3e6;
|
background: var(--border);
|
||||||
border: 1px solid #e0e3e6;
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.grid-header {
|
.grid-header {
|
||||||
background: #2c3e50;
|
background: var(--surface-2);
|
||||||
color: #fff;
|
color: var(--text-secondary);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
}
|
}
|
||||||
.grid-cell {
|
.grid-cell {
|
||||||
background: #fff;
|
background: var(--bg);
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
.grid-cell.out-of-month { background: #f8f9fa; }
|
.grid-cell.out-of-month { background: var(--surface); }
|
||||||
.grid-cell.out-of-month .day-num { color: #bdc3c7; }
|
.grid-cell.out-of-month .day-num { color: var(--text-tertiary); }
|
||||||
.grid-cell.is-today { background: #eaf4fc; }
|
.grid-cell.is-today { background: var(--accent-weak); }
|
||||||
.grid-cell.is-today .day-num {
|
.grid-cell.is-today .day-num {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #3498db;
|
background: var(--accent);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
@@ -196,7 +197,7 @@ function hideTooltip() {
|
|||||||
.day-num {
|
.day-num {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
.event-list {
|
.event-list {
|
||||||
@@ -220,10 +221,10 @@ function hideTooltip() {
|
|||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
background: #fff;
|
background: var(--bg);
|
||||||
border: 1px solid #d5dbdb;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
box-shadow: var(--shadow-hover);
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -231,15 +232,15 @@ function hideTooltip() {
|
|||||||
.tooltip-title {
|
.tooltip-title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
.tooltip-row {
|
.tooltip-row {
|
||||||
color: #34495e;
|
color: var(--text-secondary);
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
.tooltip-desc {
|
.tooltip-desc {
|
||||||
color: #7f8c8d;
|
color: var(--text-tertiary);
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function dowFor(dateStr) {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.hint {
|
.hint {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #7f8c8d;
|
color: var(--text-secondary);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.occ-grid {
|
.occ-grid {
|
||||||
@@ -52,24 +52,26 @@ function dowFor(dateStr) {
|
|||||||
}
|
}
|
||||||
.occ {
|
.occ {
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
border: 1px solid #d5dbdb;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: all 0.12s;
|
transition: all var(--transition);
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
.occ:hover { border-color: #3498db; }
|
.occ:hover { border-color: var(--accent); }
|
||||||
.occ.skipped {
|
.occ.skipped {
|
||||||
background: #fce4ec;
|
background: var(--danger-weak);
|
||||||
border-color: #e74c3c;
|
border-color: var(--danger);
|
||||||
color: #c0392b;
|
color: var(--danger);
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
.occ.active {
|
.occ.active {
|
||||||
background: #e8f5e9;
|
background: var(--success-weak);
|
||||||
border-color: #27ae60;
|
border-color: var(--success);
|
||||||
color: #1e7d32;
|
color: var(--success);
|
||||||
}
|
}
|
||||||
.dow { font-size: 10px; color: #95a5a6; }
|
.dow { font-size: 10px; color: var(--text-tertiary); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -241,35 +241,36 @@ function tooltip(ev) {
|
|||||||
}
|
}
|
||||||
.nav-btn {
|
.nav-btn {
|
||||||
padding: 5px 14px;
|
padding: 5px 14px;
|
||||||
border: 1px solid #d5dbdb;
|
border: 1px solid var(--border-strong);
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
background: #fff;
|
background: var(--bg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
|
transition: background var(--transition);
|
||||||
}
|
}
|
||||||
.nav-btn:hover { background: #ecf0f1; }
|
.nav-btn:hover { background: var(--surface); }
|
||||||
.today-btn { border-color: #3498db; color: #3498db; font-weight: 600; }
|
.today-btn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
|
||||||
.today-btn:hover { background: #eaf4fc; }
|
.today-btn:hover { background: var(--accent-weak); }
|
||||||
.collapse-btn { border-color: #9b59b6; color: #9b59b6; font-weight: 600; }
|
.collapse-btn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
|
||||||
.collapse-btn:hover { background: #f4ecf7; }
|
.collapse-btn:hover { background: var(--accent-weak); }
|
||||||
.empty-hint {
|
.empty-hint {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #95a5a6;
|
color: var(--text-tertiary);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
.week-label {
|
.week-label {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.week-grid-wrapper {
|
.week-grid-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border: 1px solid #e0e3e6;
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
.week-grid {
|
.week-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -278,28 +279,28 @@ function tooltip(ev) {
|
|||||||
.time-col {
|
.time-col {
|
||||||
width: 56px;
|
width: 56px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-right: 1px solid #e0e3e6;
|
border-right: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.time-spacer {
|
.time-spacer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-bottom: 1px solid #e0e3e6;
|
border-bottom: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.time-slot {
|
.time-slot {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: #95a5a6;
|
color: var(--text-tertiary);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid var(--surface-2);
|
||||||
}
|
}
|
||||||
/* 非工作时段 (8:00 前 / 22:00 后) 淡灰 */
|
/* 非工作时段 (8:00 前 / 22:00 后) 淡灰 */
|
||||||
.time-slot.off-hour {
|
.time-slot.off-hour {
|
||||||
color: #c4ccd0;
|
color: var(--text-tertiary);
|
||||||
background: #f7f8f9;
|
background: var(--surface);
|
||||||
}
|
}
|
||||||
.day-col {
|
.day-col {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
border-right: 1px solid #e0e3e6;
|
border-right: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
.day-col:last-child { border-right: none; }
|
.day-col:last-child { border-right: none; }
|
||||||
.day-header {
|
.day-header {
|
||||||
@@ -310,13 +311,13 @@ function tooltip(ev) {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #2c3e50;
|
color: var(--text-primary);
|
||||||
border-bottom: 1px solid #e0e3e6;
|
border-bottom: 1px solid var(--border);
|
||||||
background: #f8f9fa;
|
background: var(--surface);
|
||||||
}
|
}
|
||||||
.day-header.is-today {
|
.day-header.is-today {
|
||||||
background: #eaf4fc;
|
background: var(--accent-weak);
|
||||||
color: #3498db;
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
.day-date {
|
.day-date {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -329,10 +330,10 @@ function tooltip(ev) {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid var(--surface-2);
|
||||||
}
|
}
|
||||||
.hour-line.off-hour {
|
.hour-line.off-hour {
|
||||||
background: #f7f8f9;
|
background: var(--surface);
|
||||||
}
|
}
|
||||||
.event-block {
|
.event-block {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -1,9 +1,52 @@
|
|||||||
/* 全局重置 -- 仅独立 app(main.js)加载。
|
/* 全局重置 + 设计令牌 -- 仅独立 app(main.js)加载。
|
||||||
作为组件被嵌入时由宿主提供重置,本文件不参与,避免污染宿主。 */
|
作为组件被嵌入时由宿主(mainPage)提供 :root 令牌,本文件的重置仍安全(与宿主一致)。
|
||||||
|
令牌值与 mainPage src/styles/variables.css 对齐,保证独立与嵌入视觉一致。 */
|
||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||||
background: #f5f6f8;
|
"Microsoft YaHei", sans-serif;
|
||||||
color: #222;
|
background: var(--bg, #ffffff);
|
||||||
|
color: var(--text-primary, #1f2329);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* 背景/表面 */
|
||||||
|
--bg: #ffffff;
|
||||||
|
--surface: #f7f8fa;
|
||||||
|
--surface-2: #f0f2f5;
|
||||||
|
|
||||||
|
/* 文字 */
|
||||||
|
--text-primary: #1f2329;
|
||||||
|
--text-secondary: #6b7280;
|
||||||
|
--text-tertiary: #9ca3af;
|
||||||
|
|
||||||
|
/* 强调色(靛蓝,与 mainPage 一致) */
|
||||||
|
--accent: #4f46e5;
|
||||||
|
--accent-weak: #eef2ff;
|
||||||
|
--accent-hover: #4338ca;
|
||||||
|
|
||||||
|
/* 线/边 */
|
||||||
|
--border: #eceef1;
|
||||||
|
--border-strong: #e0e2e6;
|
||||||
|
|
||||||
|
/* 语义色 */
|
||||||
|
--success: #2e7d32;
|
||||||
|
--success-weak: #e8f5e9;
|
||||||
|
--danger: #c62828;
|
||||||
|
--danger-weak: #fbe9e7;
|
||||||
|
--warn: #e65100;
|
||||||
|
--warn-weak: #fff3e0;
|
||||||
|
|
||||||
|
/* 圆角 */
|
||||||
|
--radius-sm: 8px;
|
||||||
|
--radius: 12px;
|
||||||
|
|
||||||
|
/* 阴影 */
|
||||||
|
--shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
|
||||||
|
--shadow-hover: 0 6px 16px rgba(17, 24, 39, 0.08), 0 2px 6px rgba(17, 24, 39, 0.05);
|
||||||
|
|
||||||
|
/* 过渡 */
|
||||||
|
--transition: 0.18s ease;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user