fix: 修复加料抽屉与弹窗样式作用域
This commit is contained in:
@@ -1,243 +1,241 @@
|
|||||||
.page-product-addons {
|
.pad-editor-drawer {
|
||||||
.pad-editor-drawer {
|
.g-form-group {
|
||||||
.g-form-group {
|
margin-bottom: 16px;
|
||||||
margin-bottom: 16px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.g-form-label {
|
.g-form-label {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #1a1a2e;
|
color: #1a1a2e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-form-label.required::before {
|
.g-form-label.required::before {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
color: #ef4444;
|
color: #ef4444;
|
||||||
content: '*';
|
content: '*';
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-hint {
|
.g-hint {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #9ca3af;
|
color: #9ca3af;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-input,
|
.g-input,
|
||||||
.g-textarea {
|
.g-textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #1a1a2e;
|
color: #1a1a2e;
|
||||||
outline: none;
|
outline: none;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
transition: var(--g-transition);
|
transition: var(--g-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-input {
|
.g-input {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-textarea {
|
.g-textarea {
|
||||||
min-height: 66px;
|
min-height: 66px;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-input:focus,
|
.g-input:focus,
|
||||||
.g-textarea:focus {
|
.g-textarea:focus {
|
||||||
border-color: #1677ff;
|
border-color: #1677ff;
|
||||||
box-shadow: 0 0 0 3px rgb(22 119 255 / 12%);
|
box-shadow: 0 0 0 3px rgb(22 119 255 / 12%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-btn {
|
.g-btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #1f1f1f;
|
color: #1f1f1f;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #d9d9d9;
|
border: 1px solid #d9d9d9;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
box-shadow: var(--g-shadow-sm);
|
box-shadow: var(--g-shadow-sm);
|
||||||
transition: all var(--g-transition);
|
transition: all var(--g-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-btn:hover {
|
.g-btn:hover {
|
||||||
color: #1677ff;
|
color: #1677ff;
|
||||||
border-color: #1677ff;
|
border-color: #1677ff;
|
||||||
box-shadow: var(--g-shadow-md);
|
box-shadow: var(--g-shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-btn-primary {
|
.g-btn-primary {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #1677ff;
|
background: #1677ff;
|
||||||
border-color: #1677ff;
|
border-color: #1677ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-btn-primary:hover {
|
.g-btn-primary:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
opacity: 0.88;
|
opacity: 0.88;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-btn:disabled {
|
.g-btn:disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-wrap {
|
.g-toggle-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-label {
|
.g-toggle-label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #4b5563;
|
color: #4b5563;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-input {
|
.g-toggle-input {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-input input {
|
.g-toggle-input input {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-sl {
|
.g-toggle-sl {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #d9d9d9;
|
background: #d9d9d9;
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-sl::before {
|
.g-toggle-sl::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
left: 2px;
|
left: 2px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
content: '';
|
content: '';
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
|
box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-input input:checked + .g-toggle-sl {
|
.g-toggle-input input:checked + .g-toggle-sl {
|
||||||
background: #1677ff;
|
background: #1677ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-toggle-input input:checked + .g-toggle-sl::before {
|
.g-toggle-input input:checked + .g-toggle-sl::before {
|
||||||
transform: translateX(18px);
|
transform: translateX(18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-sel-row {
|
.pad-sel-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-sel-row span {
|
.pad-sel-row span {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #4b5563;
|
color: #4b5563;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-input-num {
|
.pad-input-num {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-list-header {
|
.pad-opt-list-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #6b7280;
|
color: #6b7280;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-list-header .h-name {
|
.pad-opt-list-header .h-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-list-header .h-price,
|
.pad-opt-list-header .h-price,
|
||||||
.pad-opt-list-header .h-stock {
|
.pad-opt-list-header .h-stock {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-list-header .h-act {
|
.pad-opt-list-header .h-act {
|
||||||
width: 34px;
|
width: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-list {
|
.pad-opt-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-row {
|
.pad-opt-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-name {
|
.pad-opt-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-price,
|
.pad-opt-price,
|
||||||
.pad-opt-stock {
|
.pad-opt-stock {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-del {
|
.pad-opt-del {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 34px;
|
width: 34px;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #9ca3af;
|
color: #9ca3af;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-opt-del:hover {
|
.pad-opt-del:hover {
|
||||||
color: #ef4444;
|
color: #ef4444;
|
||||||
background: #fef2f2;
|
background: #fef2f2;
|
||||||
border-color: #ef4444;
|
border-color: #ef4444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-btn-dashed {
|
.pad-btn-dashed {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
color: #9ca3af;
|
color: #9ca3af;
|
||||||
border-style: dashed;
|
border-style: dashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pad-btn-dashed:hover {
|
.pad-btn-dashed:hover {
|
||||||
color: #1677ff;
|
color: #1677ff;
|
||||||
border-color: #1677ff;
|
border-color: #1677ff;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +1,68 @@
|
|||||||
.page-product-addons {
|
.pad-picker-search {
|
||||||
.pad-picker-search {
|
display: flex;
|
||||||
display: flex;
|
gap: 10px;
|
||||||
gap: 10px;
|
margin-bottom: 10px;
|
||||||
margin-bottom: 10px;
|
}
|
||||||
}
|
|
||||||
|
.pad-btn {
|
||||||
.pad-btn {
|
height: 32px;
|
||||||
height: 32px;
|
padding: 0 12px;
|
||||||
padding: 0 12px;
|
font-size: 13px;
|
||||||
font-size: 13px;
|
color: #1f1f1f;
|
||||||
color: #1f1f1f;
|
cursor: pointer;
|
||||||
cursor: pointer;
|
background: #fff;
|
||||||
background: #fff;
|
border: 1px solid #d9d9d9;
|
||||||
border: 1px solid #d9d9d9;
|
border-radius: 6px;
|
||||||
border-radius: 6px;
|
}
|
||||||
}
|
|
||||||
|
.pad-btn-sm {
|
||||||
.pad-btn-sm {
|
flex-shrink: 0;
|
||||||
flex-shrink: 0;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-list {
|
||||||
.pad-picker-list {
|
max-height: 320px;
|
||||||
max-height: 320px;
|
overflow-y: auto;
|
||||||
overflow-y: auto;
|
border: 1px solid #f0f0f0;
|
||||||
border: 1px solid #f0f0f0;
|
border-radius: 8px;
|
||||||
border-radius: 8px;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item {
|
||||||
.pad-picker-item {
|
display: grid;
|
||||||
display: grid;
|
grid-template-columns: auto 1fr 140px auto;
|
||||||
grid-template-columns: auto 1fr 140px auto;
|
gap: 10px;
|
||||||
gap: 10px;
|
align-items: center;
|
||||||
align-items: center;
|
padding: 10px 12px;
|
||||||
padding: 10px 12px;
|
cursor: pointer;
|
||||||
cursor: pointer;
|
border-bottom: 1px solid #f5f5f5;
|
||||||
border-bottom: 1px solid #f5f5f5;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item:last-child {
|
||||||
.pad-picker-item:last-child {
|
border-bottom: none;
|
||||||
border-bottom: none;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item:hover {
|
||||||
.pad-picker-item:hover {
|
background: #fafcff;
|
||||||
background: #fafcff;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item .name {
|
||||||
.pad-picker-item .name {
|
font-size: 13px;
|
||||||
font-size: 13px;
|
color: #1a1a2e;
|
||||||
color: #1a1a2e;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item .spu {
|
||||||
.pad-picker-item .spu {
|
font-size: 12px;
|
||||||
font-size: 12px;
|
color: #9ca3af;
|
||||||
color: #9ca3af;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-item .price {
|
||||||
.pad-picker-item .price {
|
font-size: 12px;
|
||||||
font-size: 12px;
|
font-weight: 600;
|
||||||
font-weight: 600;
|
color: #1a1a2e;
|
||||||
color: #1a1a2e;
|
}
|
||||||
}
|
|
||||||
|
.pad-picker-empty {
|
||||||
.pad-picker-empty {
|
padding: 28px 14px;
|
||||||
padding: 28px 14px;
|
font-size: 13px;
|
||||||
font-size: 13px;
|
color: #9ca3af;
|
||||||
color: #9ca3af;
|
text-align: center;
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user