小程序渲染问题
This commit is contained in:
1 parent
88bffaa5d0
commit
919da19be7
5 files changed
+194
-101
No files matched your search
+129
-59
@@ -9,9 +9,12 @@
|
||||
/* ===== 预览区(深色)===== */
|
||||
.stage {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: linear-gradient(180deg, var(--panel) 0%, #14161b 100%);
|
||||
/* 固定高度:控制面板出现/消失都不再改变画布的显示区域,
|
||||
否则缓冲区比例会和显示区对不上,画面会被拉伸 */
|
||||
flex: none;
|
||||
height: 50vh;
|
||||
/* 和整页统一底色,不要再上下两种颜色 */
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.stage-canvas {
|
||||
@@ -71,17 +74,75 @@
|
||||
top: 22rpx;
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: var(--r-pill);
|
||||
background: rgba(0, 0, 0, 0.34);
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
background: #24242c;
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
/* ===== 画布下方:手势提示 + 缩放控制 ===== */
|
||||
.tool-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.tool-hint {
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
font-size: 21rpx;
|
||||
color: rgba(255, 255, 255, 0.42);
|
||||
}
|
||||
|
||||
.zoom-group {
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4rpx;
|
||||
border-radius: var(--r-pill);
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.zoom-btn {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
.zoom-val {
|
||||
min-width: 92rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.zoom-reset {
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-left: 6rpx;
|
||||
border-radius: var(--r-pill);
|
||||
background: #34343e;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
/* ===== 控制面板(深色,和预览区统一)===== */
|
||||
.sheet {
|
||||
background: var(--bg-2);
|
||||
border-radius: var(--r-lg) var(--r-lg) 0 0;
|
||||
/* 同上:整页一种底色,去掉面板的圆角与投影,避免出现分界线 */
|
||||
background: var(--bg);
|
||||
/* 面板自己滚动,这样它的内容变化不会挤动上面的画布 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: 30rpx 28rpx 28rpx;
|
||||
box-shadow: 0 -10rpx 36rpx rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.section {
|
||||
@@ -131,6 +192,36 @@
|
||||
color: rgba(255, 255, 255, 0.38);
|
||||
}
|
||||
|
||||
/* 选择文件放在面板最下面 */
|
||||
.pick-section {
|
||||
/* auto 让它在内容不足时贴到面板底部,内容多时自然跟在最后 */
|
||||
margin-top: auto;
|
||||
padding-top: 26rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 清空已选 + 重新选择文件:两个等宽按钮并排 */
|
||||
.pick-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pick-row .pick-btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.clear-btn {
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
margin-right: 20rpx;
|
||||
text-align: center;
|
||||
border-radius: var(--r-lg);
|
||||
background: var(--panel-2);
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
/* ===== 文件类型标签 ===== */
|
||||
.chips {
|
||||
display: flex;
|
||||
@@ -186,18 +277,6 @@
|
||||
color: #f0b45c;
|
||||
}
|
||||
|
||||
.link {
|
||||
margin-top: 14rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
.link.inline {
|
||||
margin-top: 0;
|
||||
margin-left: 18rpx;
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
/* ===== 播放选择 ===== */
|
||||
.select {
|
||||
display: flex;
|
||||
@@ -221,6 +300,35 @@
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
/* ===== 播放(标题和动画列表同一行,开关在下面一行)===== */
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.section-head .section-title {
|
||||
flex: none;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.anim-picker {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.section-head .select {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 动画名太长时省略,不要挤掉右边的按钮 */
|
||||
.select-label {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* ===== 分段控件 ===== */
|
||||
.segment {
|
||||
display: flex;
|
||||
@@ -241,7 +349,7 @@
|
||||
|
||||
.seg.on {
|
||||
background: #3d262e;
|
||||
color: var(--cyan);
|
||||
color: var(--accent-2);
|
||||
font-weight: 600;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
@@ -273,41 +381,3 @@
|
||||
font-weight: 600;
|
||||
color: var(--cyan);
|
||||
}
|
||||
|
||||
/* ===== 缩放步进器 ===== */
|
||||
.stepper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 16rpx;
|
||||
background: var(--panel-2);
|
||||
border-radius: var(--r-lg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.step-btn {
|
||||
width: 70rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
}
|
||||
|
||||
.step-btn:active {
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.step-val {
|
||||
min-width: 104rpx;
|
||||
text-align: center;
|
||||
font-size: 25rpx;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.gesture-hint {
|
||||
margin-top: 4rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
Reference in new issue
Block a user