feat: AI 修改图形打印页
This commit is contained in:
@@ -48,24 +48,171 @@
|
||||
padding-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.clear-btn {
|
||||
background: linear-gradient(45deg, #ff6b6b, #ee5a24);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 15rpx 25rpx;
|
||||
/* 选择形状按钮 */
|
||||
.select-shapes-btn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
box-shadow: 0 4rpx 15rpx rgba(255, 107, 107, 0.4);
|
||||
background: linear-gradient(45deg, #667eea, #764ba2);
|
||||
border: none;
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8rpx 25rpx rgba(102, 126, 234, 0.4);
|
||||
|
||||
.btn-text {
|
||||
margin-left: 10rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 形状选择器 */
|
||||
.shape-selector {
|
||||
/* 形状卡片容器 */
|
||||
.shape-cards-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200rpx, 1fr));
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
/* 形状卡片 */
|
||||
.shape-card {
|
||||
position: relative;
|
||||
padding: 20rpx;
|
||||
background: linear-gradient(145deg, #ffffff, #f0f0f0);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid #e0e0e0;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
background: linear-gradient(145deg, #f8f9fa, #e9ecef);
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.shape-preview-container {
|
||||
position: relative;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-bottom: 15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.shape-preview-canvas {
|
||||
position: absolute;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
opacity: 0;
|
||||
/* 隐藏,只用于未来可能的Canvas预览 */
|
||||
}
|
||||
|
||||
.shape-name {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.color-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
|
||||
.color-dot {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #ddd;
|
||||
}
|
||||
|
||||
.color-text {
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 形状选择弹窗样式 */
|
||||
.shape-selector-popup {
|
||||
.van-popup {
|
||||
max-height: 80vh;
|
||||
}
|
||||
}
|
||||
|
||||
.shape-selector-container {
|
||||
padding: 30rpx;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.selected-count {
|
||||
font-size: 24rpx;
|
||||
color: #667eea;
|
||||
background: rgba(102, 126, 234, 0.1);
|
||||
padding: 8rpx 15rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.shape-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.popup-actions {
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid #f0f0f0;
|
||||
|
||||
.confirm-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
background: linear-gradient(45deg, #667eea, #764ba2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 弹窗中的形状选项 */
|
||||
.shape-option {
|
||||
position: relative;
|
||||
height: 140rpx;
|
||||
border: 3rpx solid #e0e0e0;
|
||||
border-radius: 20rpx;
|
||||
@@ -78,7 +225,7 @@
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1);
|
||||
|
||||
&.active {
|
||||
&.selected {
|
||||
border-color: #667eea;
|
||||
background: linear-gradient(145deg, #e3f2fd, #bbdefb);
|
||||
transform: translateY(-5rpx);
|
||||
@@ -89,6 +236,30 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: 0.5;
|
||||
background: #f5f5f5;
|
||||
border-color: #ddd;
|
||||
|
||||
.shape-name {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.selected-mark {
|
||||
position: absolute;
|
||||
top: 8rpx;
|
||||
right: 8rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: #667eea;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.shape-preview-box {
|
||||
@@ -107,19 +278,22 @@
|
||||
|
||||
&.shape-icon-circle {
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
background: var(--fill-color, transparent);
|
||||
border-color: var(--border-color, #666);
|
||||
}
|
||||
|
||||
&.shape-icon-square {
|
||||
border-radius: 5rpx;
|
||||
background: transparent;
|
||||
background: var(--fill-color, transparent);
|
||||
border-color: var(--border-color, #666);
|
||||
}
|
||||
|
||||
&.shape-icon-rectangle {
|
||||
width: 60rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 5rpx;
|
||||
background: transparent;
|
||||
background: var(--fill-color, transparent);
|
||||
border-color: var(--border-color, #666);
|
||||
}
|
||||
|
||||
&.shape-icon-triangle {
|
||||
@@ -128,7 +302,7 @@
|
||||
border: none;
|
||||
border-left: 25rpx solid transparent;
|
||||
border-right: 25rpx solid transparent;
|
||||
border-bottom: 45rpx solid #666;
|
||||
border-bottom: 45rpx solid var(--fill-color, red);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
@@ -136,7 +310,8 @@
|
||||
border-radius: 50%;
|
||||
width: 60rpx;
|
||||
height: 40rpx;
|
||||
background: transparent;
|
||||
background: var(--fill-color, transparent);
|
||||
border-color: var(--border-color, #666);
|
||||
}
|
||||
|
||||
&.shape-icon-diamond {
|
||||
@@ -146,72 +321,142 @@
|
||||
border-left: 25rpx solid transparent;
|
||||
border-right: 25rpx solid transparent;
|
||||
border-top: 25rpx solid transparent;
|
||||
border-bottom: 25rpx solid #666;
|
||||
border-bottom: 25rpx solid var(--fill-color, #666);
|
||||
background: transparent;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
/* 修正星形 */
|
||||
&.shape-icon-star {
|
||||
position: relative;
|
||||
width: 0;
|
||||
height: 0;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border: none;
|
||||
border-left: 25rpx solid transparent;
|
||||
border-right: 25rpx solid transparent;
|
||||
border-bottom: 18rpx solid #666;
|
||||
background: transparent;
|
||||
transform: rotate(35deg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
--star-fill-color: var(--fill-color, red);
|
||||
--star-border-color: var(--border-color, #333);
|
||||
--star-border-width: 2rpx;
|
||||
|
||||
/* 边框层 */
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -25rpx;
|
||||
top: -12rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 25rpx solid transparent;
|
||||
border-right: 25rpx solid transparent;
|
||||
border-bottom: 18rpx solid #666;
|
||||
transform: rotate(-70deg);
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 66rpx;
|
||||
height: 66rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
background: transparent;
|
||||
border: var(--star-border-width, 2rpx) solid var(--star-border-color, #333);
|
||||
clip-path: polygon(50% 0%,
|
||||
61% 35%,
|
||||
98% 35%,
|
||||
68% 57%,
|
||||
79% 91%,
|
||||
50% 70%,
|
||||
21% 91%,
|
||||
32% 57%,
|
||||
2% 35%,
|
||||
39% 35%);
|
||||
z-index: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
background: var(--star-fill-color, red);
|
||||
clip-path: polygon(50% 0%,
|
||||
61% 35%,
|
||||
98% 35%,
|
||||
68% 57%,
|
||||
79% 91%,
|
||||
50% 70%,
|
||||
21% 91%,
|
||||
32% 57%,
|
||||
2% 35%,
|
||||
39% 35%);
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 爱心形状 */
|
||||
&.shape-icon-heart {
|
||||
position: relative;
|
||||
width: 40rpx;
|
||||
height: 35rpx;
|
||||
border: none;
|
||||
background: #666;
|
||||
transform: rotate(-45deg);
|
||||
width: 44rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent;
|
||||
|
||||
&::before,
|
||||
/* 主体部分(三角形) */
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 20rpx;
|
||||
height: 30rpx;
|
||||
background: #666;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0 100%;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
transform: translateX(-50%) rotate(-45deg);
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
background: var(--fill-color, #f00);
|
||||
border-left: 2rpx solid var(--border-color, #333);
|
||||
border-bottom: 2rpx solid var(--border-color, #333);
|
||||
border-bottom-left-radius: 20rpx;
|
||||
border-bottom-right-radius: 20rpx;
|
||||
z-index: 1;
|
||||
clip-path: polygon(0 0, 100% 0, 50% 100%);
|
||||
}
|
||||
|
||||
/* 左半圆 */
|
||||
&::before {
|
||||
left: 20rpx;
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 4rpx;
|
||||
top: 0;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: var(--fill-color, #f00);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
border-radius: 50% 50% 0 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: -15rpx;
|
||||
transform: rotate(45deg);
|
||||
transform-origin: 100% 100%;
|
||||
/* 右半圆 */
|
||||
.heart-right {
|
||||
position: absolute;
|
||||
right: 4rpx;
|
||||
top: 0;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: var(--fill-color, #f00);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
border-bottom: none;
|
||||
border-left: none;
|
||||
border-radius: 50% 50% 0 0;
|
||||
z-index: 2;
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&.shape-icon-hexagon {
|
||||
width: 40rpx;
|
||||
height: 22rpx;
|
||||
background: #666;
|
||||
border: none;
|
||||
background: var(--fill-color, #666);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
position: relative;
|
||||
|
||||
&::before,
|
||||
@@ -226,63 +471,90 @@
|
||||
|
||||
&::before {
|
||||
bottom: 100%;
|
||||
border-bottom: 11rpx solid #666;
|
||||
border-bottom: 11rpx solid var(--fill-color, #666);
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: 100%;
|
||||
border-top: 11rpx solid #666;
|
||||
border-top: 11rpx solid var(--fill-color, #666);
|
||||
}
|
||||
}
|
||||
|
||||
/* 修正五边形 */
|
||||
&.shape-icon-pentagon {
|
||||
position: relative;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: none;
|
||||
border-left: 25rpx solid transparent;
|
||||
border-right: 25rpx solid transparent;
|
||||
border-bottom: 30rpx solid #666;
|
||||
width: 40rpx;
|
||||
height: 38rpx;
|
||||
background: transparent;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -18rpx;
|
||||
top: 30rpx;
|
||||
width: 36rpx;
|
||||
height: 15rpx;
|
||||
background: #666;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 40rpx;
|
||||
height: 38rpx;
|
||||
background: var(--fill-color, #666);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
clip-path: polygon(50% 0%,
|
||||
100% 38%,
|
||||
81% 100%,
|
||||
19% 100%,
|
||||
0% 38%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
/* 修正半圆 */
|
||||
&.shape-icon-semicircle {
|
||||
width: 50rpx;
|
||||
height: 25rpx;
|
||||
border: 2rpx solid #666;
|
||||
border-bottom: none;
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&.shape-icon-trapezoid {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: none;
|
||||
border-left: 15rpx solid transparent;
|
||||
border-right: 15rpx solid transparent;
|
||||
border-bottom: 40rpx solid #666;
|
||||
background: transparent;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -25rpx;
|
||||
top: 40rpx;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 50rpx;
|
||||
height: 2rpx;
|
||||
background: #666;
|
||||
height: 50rpx;
|
||||
background: var(--fill-color, #666);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
/* 修正梯形 */
|
||||
&.shape-icon-trapezoid {
|
||||
width: 50rpx;
|
||||
height: 30rpx;
|
||||
border: none;
|
||||
background: transparent;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 50rpx;
|
||||
height: 30rpx;
|
||||
background: var(--fill-color, #666);
|
||||
border: 2rpx solid var(--border-color, #333);
|
||||
clip-path: polygon(15% 100%,
|
||||
85% 100%,
|
||||
100% 0%,
|
||||
0% 0%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user