组件属性编辑器

This commit is contained in:
YHH
2025-10-15 00:15:12 +08:00
parent 3224bb9696
commit 4550a6146a
7 changed files with 452 additions and 22 deletions

View File

@@ -90,22 +90,48 @@
}
.component-item {
display: flex;
align-items: center;
padding: 8px;
margin-bottom: 4px;
margin-bottom: 8px;
background-color: #252526;
border: 1px solid #3c3c3c;
border-radius: 3px;
font-size: 13px;
position: relative;
overflow: hidden;
}
.component-item:hover {
background-color: #2a2d2e;
border-color: #505050;
}
.component-header {
display: flex;
align-items: center;
padding: 8px;
cursor: pointer;
transition: background-color 0.2s;
}
.component-header:hover {
background-color: #2a2d2e;
}
.component-expand-btn {
background: none;
border: none;
color: #858585;
font-size: 10px;
cursor: pointer;
padding: 4px;
margin-right: 4px;
transition: color 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.component-expand-btn:hover {
color: #cccccc;
}
.component-icon {
margin-right: 8px;
font-size: 14px;
@@ -132,6 +158,12 @@
color: #ff5555;
}
.component-properties {
border-top: 1px solid #3c3c3c;
background-color: #1e1e1e;
padding: 4px;
}
.empty-state {
padding: 20px;
text-align: center;

View File

@@ -0,0 +1,80 @@
.property-inspector {
padding: 8px;
}
.property-field {
display: flex;
flex-direction: column;
margin-bottom: 12px;
}
.property-field-checkbox {
flex-direction: row;
align-items: center;
gap: 8px;
}
.property-label {
font-size: 12px;
font-weight: 500;
color: #e0e0e0;
margin-bottom: 4px;
}
.property-field-checkbox .property-label {
margin-bottom: 0;
flex: 1;
}
.property-input {
background: #2a2a2a;
border: 1px solid #444;
border-radius: 4px;
padding: 6px 8px;
color: #e0e0e0;
font-size: 13px;
font-family: inherit;
}
.property-input:focus {
outline: none;
border-color: #4a9eff;
background: #333;
}
.property-input:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.property-checkbox {
width: 18px;
height: 18px;
cursor: pointer;
}
.property-checkbox:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.property-color {
height: 36px;
padding: 2px;
cursor: pointer;
}
.property-vector {
display: flex;
gap: 6px;
}
.property-vector-input {
flex: 1;
min-width: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
opacity: 1;
}