feat(qr): 添加二维码工具栏并优化交互体验
添加二维码编辑工具栏,支持透明度和缩放调整 优化选中状态和拖拽交互,增强用户体验 重构代码结构,提高可维护性
This commit is contained in:
29
css/qr.css
29
css/qr.css
@@ -1,6 +1,6 @@
|
||||
/* 二维码功能样式 */
|
||||
|
||||
/* 悬浮按钮 */
|
||||
/* ========== 悬浮按钮 ========== */
|
||||
#qr-btn {
|
||||
position: fixed;
|
||||
bottom: 100px;
|
||||
@@ -29,7 +29,7 @@
|
||||
background: #3a7bc8;
|
||||
}
|
||||
|
||||
/* 弹窗 */
|
||||
/* ========== 弹窗 ========== */
|
||||
#qr-modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
@@ -128,9 +128,32 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 画布上的二维码 */
|
||||
/* ========== 画布上的二维码 ========== */
|
||||
.qr-item {
|
||||
position: absolute;
|
||||
cursor: move;
|
||||
user-select: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
/* 选中状态 */
|
||||
.qr-item.qr-selected {
|
||||
outline: 2px solid #4a90e2;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ========== 二维码工具栏 - 与背景图工具栏保持一致 ========== */
|
||||
.qr-tools {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.qr-tools.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* 数值显示固定宽度,单独占位 */
|
||||
#qrOpacityValue, #qrScaleValue {
|
||||
display: inline-block;
|
||||
min-width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user