feat: 建立组件化模板预览基线并规划可视化编辑
This commit is contained in:
1 parent
c5af790554
commit
0b14b5a814
46 files changed
+1880
-427
No files matched your search
@@ -0,0 +1,102 @@
|
||||
.component-template-preview {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: min(76vh, 820px);
|
||||
min-height: 620px;
|
||||
padding: 24px 16px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #e8e8e8;
|
||||
background: #f3f4f6;
|
||||
}
|
||||
|
||||
.component-template-preview__canvas {
|
||||
container-type: inline-size;
|
||||
width: min(100%, 390px);
|
||||
min-height: calc(100% - 48px);
|
||||
margin: 0 auto;
|
||||
overflow: visible;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.04),
|
||||
0 10px 30px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.component-template-preview__canvas,
|
||||
.component-template-preview__canvas * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.component-template-preview__canvas > * {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
:where(.component-template-preview__canvas) button {
|
||||
display: block;
|
||||
width: -webkit-fill-available;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
font-size: 4.8cqw;
|
||||
line-height: 2.55555556;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:where(.component-template-preview__canvas) input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.component-template-preview__canvas img {
|
||||
flex-shrink: 0;
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.component-template-preview [data-editor-target] {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 3px;
|
||||
transition:
|
||||
outline-color 120ms ease,
|
||||
background-color 120ms ease,
|
||||
box-shadow 120ms ease;
|
||||
}
|
||||
|
||||
.component-template-preview [data-editor-target]:hover {
|
||||
outline-color: #91caff;
|
||||
background-color: rgba(22, 119, 255, 0.04);
|
||||
}
|
||||
|
||||
.component-template-preview [data-editor-target].editor-target-selected {
|
||||
z-index: 2;
|
||||
outline: 2px solid #1677ff;
|
||||
outline-offset: 4px;
|
||||
background-color: rgba(22, 119, 255, 0.1);
|
||||
box-shadow: 0 0 0 5px rgba(22, 119, 255, 0.14);
|
||||
}
|
||||
|
||||
.component-template-preview [data-editor-target].editor-target-selected::before {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: -2px;
|
||||
z-index: 3;
|
||||
padding: 2px 7px;
|
||||
border-radius: 4px;
|
||||
background: #1677ff;
|
||||
color: #fff;
|
||||
content: attr(data-editor-target);
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
pointer-events: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
Reference in new issue
Block a user