379 lines
No EOL
5.8 KiB
Text
379 lines
No EOL
5.8 KiB
Text
.camera-page {
|
||
width: 100%;
|
||
height: 100vh;
|
||
background-color: #000;
|
||
color: #fff;
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
.shoot-mode {
|
||
width: 100%;
|
||
height: 100%;
|
||
position: relative;
|
||
}
|
||
|
||
.top-controls {
|
||
position: absolute;
|
||
top: 80rpx;
|
||
left: 20rpx;
|
||
z-index: 10;
|
||
}
|
||
|
||
.flash-btn {
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
font-size: 30rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.camera-container {
|
||
position: absolute;
|
||
top: 150rpx;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 70%;
|
||
background-color: #000;
|
||
z-index: 1;
|
||
/* 确保可以接收点击事件 */
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.camera-preview {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.camera-tap-overlay {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 2;
|
||
/* 透明覆盖层,用于捕获双击事件 */
|
||
background-color: transparent;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.shoot-tip {
|
||
position: absolute;
|
||
bottom: 200rpx;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
font-size: 28rpx;
|
||
color: rgba(255, 255, 255, 0.8);
|
||
z-index: 5;
|
||
}
|
||
|
||
.shoot-controls {
|
||
position: absolute;
|
||
bottom: 40rpx;
|
||
left: 0;
|
||
width: 100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
gap: 150rpx;
|
||
z-index: 10;
|
||
}
|
||
|
||
.switch-camera-btn {
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
font-size: 30rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* 重置shoot-controls内部按钮的绝对定位 */
|
||
.shoot-controls .close-btn,
|
||
.shoot-controls .switch-camera-btn {
|
||
position: static;
|
||
top: auto;
|
||
left: auto;
|
||
transform: none;
|
||
}
|
||
|
||
/* 关闭按钮样式 */
|
||
.close-btn {
|
||
width: 120rpx;
|
||
height: 60rpx;
|
||
font-size: 36rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex-direction: row;
|
||
color: #fff;
|
||
background-color: transparent;
|
||
}
|
||
|
||
.shoot-button {
|
||
width: 120rpx;
|
||
height: 120rpx;
|
||
border-radius: 50%;
|
||
border: 6rpx solid #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-right: 30px;
|
||
}
|
||
|
||
.empty-btn {
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.edit-mode {
|
||
width: 100%;
|
||
height: 100%;
|
||
position: relative;
|
||
}
|
||
|
||
.edit-container {
|
||
position: absolute;
|
||
top: 150rpx;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 70%;
|
||
background-color: #000;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
z-index: 1;
|
||
}
|
||
|
||
.image-container {
|
||
transition: transform 0.3s ease;
|
||
position: relative;
|
||
z-index: 5;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.edit-image {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: contain;
|
||
background-color: transparent;
|
||
}
|
||
|
||
.mosaic-controls {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 10rpx;
|
||
z-index: 20;
|
||
background-color: rgba(0, 0, 0, 0.5);
|
||
padding: 10rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.mosaic-controls text {
|
||
font-size: 26rpx;
|
||
}
|
||
|
||
.edit-toolbar {
|
||
position: absolute;
|
||
bottom: 100rpx;
|
||
left: 0;
|
||
width: 100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
padding: 20rpx 0;
|
||
box-sizing: border-box;
|
||
z-index: 15;
|
||
background-color: rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
.edit-controls {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100rpx;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 0 40rpx;
|
||
box-sizing: border-box;
|
||
z-index: 20;
|
||
background-color: #333;
|
||
}
|
||
|
||
.edit-tool-group {
|
||
display: flex;
|
||
gap: 15rpx;
|
||
align-items: center;
|
||
margin-left: 0;
|
||
}
|
||
|
||
.edit-tool-group .tool-btn {
|
||
background-color: rgba(0, 0, 0, 0.5);
|
||
padding: 15rpx;
|
||
border-radius: 50%;
|
||
font-size: 28rpx;
|
||
color: #fff;
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.edit-tool-group .tool-btn.active {
|
||
background-color: #007aff;
|
||
}
|
||
|
||
.edit-tool-group .restore-btn {
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.edit-tool-group .restore-btn.active {
|
||
opacity: 1;
|
||
}
|
||
|
||
.edit-tool-group .clear-mosaic-btn {
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.edit-tool-group .clear-mosaic-btn.active {
|
||
opacity: 1;
|
||
}
|
||
|
||
.edit-control-btn.confirm {
|
||
color: #fff;
|
||
font-size: 32rpx;
|
||
padding: 10rpx 40rpx;
|
||
border-radius: 0;
|
||
background-color: transparent;
|
||
margin-right: 5rpx;
|
||
}
|
||
|
||
.edit-control-btn.cancel {
|
||
color: #999;
|
||
font-size: 32rpx;
|
||
padding: 10rpx 40rpx;
|
||
border-radius: 0;
|
||
background-color: transparent;
|
||
margin-right: 20rpx;
|
||
}
|
||
|
||
.crop-controls {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
/* 裁剪相关样式 */
|
||
.crop-overlay {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 10;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.crop-mask {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.crop-mask-top {
|
||
width: 100%;
|
||
background-color: rgba(0, 0, 0, 0.6);
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.crop-mask-bottom {
|
||
width: 100%;
|
||
background-color: rgba(0, 0, 0, 0.6);
|
||
flex: 1;
|
||
}
|
||
|
||
.crop-mask-middle {
|
||
display: flex;
|
||
width: 100%;
|
||
flex-direction: row;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.crop-mask-left {
|
||
background-color: rgba(0, 0, 0, 0.6);
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.crop-mask-right {
|
||
background-color: rgba(0, 0, 0, 0.6);
|
||
flex: 1;
|
||
}
|
||
|
||
.crop-area {
|
||
background-color: transparent;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.crop-box {
|
||
position: absolute;
|
||
border: 2rpx solid #fff;
|
||
box-sizing: border-box;
|
||
pointer-events: none;
|
||
z-index: 11;
|
||
}
|
||
|
||
.crop-border {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.crop-handle {
|
||
position: absolute;
|
||
width: 50rpx;
|
||
height: 50rpx;
|
||
background-color: #fff;
|
||
border: 3rpx solid #007aff;
|
||
border-radius: 50%;
|
||
box-sizing: border-box;
|
||
z-index: 12;
|
||
pointer-events: auto;
|
||
/* 使用transform居中定位在裁剪框的角上,确保始终可见 */
|
||
transform: translate(-50%, -50%);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
||
}
|
||
|
||
.crop-handle-tl {
|
||
top: 0;
|
||
left: 0;
|
||
}
|
||
|
||
.crop-handle-tr {
|
||
top: 0;
|
||
right: 0;
|
||
}
|
||
|
||
.crop-handle-bl {
|
||
bottom: 0;
|
||
left: 0;
|
||
}
|
||
|
||
.crop-handle-br {
|
||
bottom: 0;
|
||
right: 0;
|
||
} |