update at 2026-02-12 17:30:41

This commit is contained in:
douboer@gmail.com
2026-02-12 17:30:41 +08:00
parent 8ce67dae5e
commit b6804cc2f1
32 changed files with 5765 additions and 0 deletions

450
src/styles.css Normal file
View File

@@ -0,0 +1,450 @@
:root {
--primary-7: #8552a1;
--primary-6: #9b6bc2;
--fill-1: #f7f8fa;
--fill-3: #e5e6eb;
--fill-4: #c9cdd4;
--text-1: #ffffff;
--text-3: #86909c;
--text-4: #4e5969;
--danger-3: #fbaca3;
--font-pingfang: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
margin: 0;
min-height: 100%;
}
body {
background: #f3f4f6;
color: #1d2129;
font-family: var(--font-pingfang);
}
.page {
position: relative;
width: 100%;
min-height: 100vh;
padding: 16px 16px 10px;
}
.top-bar {
position: relative;
display: flex;
justify-content: space-between;
gap: 16px;
align-items: center;
margin-bottom: 12px;
padding: 0 8px;
}
.brand {
display: flex;
align-items: center;
gap: 8px;
}
.logo {
width: 64px;
height: 64px;
border-radius: 16px;
}
.title-logo {
width: 174px;
height: auto;
}
.toolbar {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
justify-content: flex-end;
}
.tool-item {
display: flex;
align-items: center;
gap: 4px;
}
.tool-label {
color: #1d2129;
font-size: 14px;
white-space: nowrap;
}
.icon-btn {
border: 0;
background: transparent;
cursor: pointer;
padding: 0;
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.icon-btn img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.icon-btn.tiny {
width: 14px;
height: 14px;
}
.upload-area {
min-width: 280px;
max-width: 420px;
flex: 1;
min-height: 38px;
border-radius: 6px;
display: flex;
align-items: center;
padding: 4px 10px;
background: var(--fill-1);
cursor: pointer;
position: relative;
}
.hidden-input {
display: none;
}
.upload-text {
color: var(--text-4);
font-size: 12px;
}
.upload-tip {
position: absolute;
left: 0;
top: 44px;
z-index: 5;
width: 100%;
border: 1px solid var(--primary-7);
background: #fff;
border-radius: 8px;
padding: 8px;
color: var(--text-4);
font-size: 12px;
}
.upload-tip a {
color: var(--primary-7);
text-decoration: none;
font-weight: 500;
}
.export-box {
display: flex;
gap: 6px;
align-items: center;
background: #fff;
border: 1px solid var(--fill-3);
border-radius: 8px;
padding: 2px 8px;
}
.export-main {
width: 18px;
height: 34px;
}
.export-item {
width: 40px;
height: 40px;
}
.theme-popover {
position: absolute;
top: 80px;
right: 290px;
width: 280px;
border: 1px solid var(--primary-7);
border-radius: 24px 24px 0 0;
background: #fff;
z-index: 10;
padding: 8px;
}
.theme-header {
text-align: center;
color: var(--primary-6);
font-size: 14px;
margin-bottom: 8px;
}
.theme-list {
max-height: 180px;
overflow: auto;
}
.theme-row {
width: 100%;
border: 0;
background: #fff;
display: flex;
align-items: center;
gap: 8px;
padding: 6px;
cursor: pointer;
}
.theme-row img {
width: 18px;
height: 18px;
}
.palette {
flex: 1;
display: grid;
grid-template-columns: repeat(9, 1fr);
height: 20px;
}
.palette-cell {
display: block;
}
.content {
display: grid;
grid-template-columns: 360px 1fr;
gap: 8px;
min-height: calc(100vh - 140px);
}
.left-pane {
display: flex;
flex-direction: column;
gap: 8px;
}
.panel {
border: 1px solid #f7dede;
border-radius: 16px;
background: #fff;
}
.block-panel {
padding: 8px;
}
.block-panel h2,
.preview-head h2 {
margin: 0;
font-size: 24px;
font-weight: 400;
}
.field-block {
margin-top: 12px;
}
.field-title-wrap {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
}
.field-title-wrap h3 {
margin: 0;
font-size: 18px;
font-weight: 500;
}
.expand-icon {
width: 16px;
height: 16px;
}
.column-row {
display: flex;
align-items: center;
gap: 8px;
border-bottom: 1px solid var(--fill-4);
height: 32px;
padding-bottom: 6px;
}
.column-icon {
width: 18px;
height: 18px;
}
.column-label {
flex: 1;
color: var(--text-3);
font-size: 12px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.select-btn {
border: 0;
background: transparent;
cursor: pointer;
padding: 0;
width: 20px;
height: 20px;
}
.select-btn img {
width: 20px;
height: 20px;
}
.preview-panel {
padding: 8px;
display: flex;
flex-direction: column;
}
.preview-head {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
margin-bottom: 6px;
}
.preview-controls {
display: flex;
align-items: center;
gap: 8px;
}
.preview-controls label {
display: inline-flex;
align-items: center;
gap: 4px;
color: var(--text-4);
font-size: 12px;
}
.preview-controls select,
.preview-controls input {
accent-color: var(--primary-7);
}
.example-line {
margin: 4px 0 8px;
color: var(--text-4);
font-size: 12px;
}
.chart-area {
background: var(--fill-1);
border-radius: 8px;
min-height: 480px;
flex: 1;
}
.warning-area {
margin-top: 8px;
font-size: 12px;
color: var(--text-4);
}
.warning-area ul {
margin: 6px 0 0;
padding-left: 18px;
}
.error-text {
color: #cb272d;
font-size: 12px;
margin-bottom: 6px;
}
.footer {
margin-top: 6px;
color: var(--text-3);
font-size: 16px;
}
@media (max-width: 1024px) {
.top-bar {
flex-direction: column;
align-items: stretch;
}
.toolbar {
justify-content: flex-start;
flex-wrap: wrap;
}
.theme-popover {
right: 12px;
top: 120px;
}
.content {
grid-template-columns: 1fr;
}
.left-pane {
flex-direction: row;
flex-wrap: wrap;
}
.block-panel {
flex: 1;
min-width: 280px;
}
.chart-area {
min-height: 360px;
}
.footer {
font-size: 14px;
}
}
@media (max-width: 640px) {
.page {
padding: 8px;
}
.logo {
width: 48px;
height: 48px;
border-radius: 12px;
}
.title-logo {
width: 160px;
}
.tool-label {
font-size: 12px;
}
.upload-area {
min-width: 220px;
}
.block-panel h2,
.preview-head h2 {
font-size: 20px;
}
.field-title-wrap h3 {
font-size: 16px;
}
}