提交代码
This commit is contained in:
@@ -168,8 +168,8 @@ export default {
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-collapse-item__title-box {
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
class="movable-view"
|
||||
direction="all"
|
||||
:scale="true"
|
||||
:scale-min="0.5"
|
||||
:scale-max="3"
|
||||
:scale-min="0.2"
|
||||
:scale-max="0.5"
|
||||
:scale-value="scaleValue"
|
||||
|
||||
@touchstart="onTouchStart"
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
return {
|
||||
imageUrl: '',
|
||||
// 缩放相关 - 默认0.5
|
||||
scaleValue: 0.6,
|
||||
scaleValue: 0.2,
|
||||
x: 0,
|
||||
y: 0,
|
||||
// 图片原始尺寸
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
windowWidth: 0,
|
||||
windowHeight: 0,
|
||||
// 缩放步长
|
||||
zoomStep: 0.2,
|
||||
zoomStep: 0.1,
|
||||
// 动画控制
|
||||
isTouching: false,
|
||||
animationTimer: null
|
||||
@@ -160,14 +160,14 @@ export default {
|
||||
// 放大
|
||||
zoomIn() {
|
||||
// 计算新的缩放值,不超过最大值
|
||||
const newScale = Math.min(this.scaleValue + this.zoomStep, 3)
|
||||
const newScale = Math.min(this.scaleValue + this.zoomStep, 0.5)
|
||||
this.setScaleWithAnimation(newScale)
|
||||
},
|
||||
|
||||
// 缩小
|
||||
zoomOut() {
|
||||
// 计算新的缩放值,不低于最小值
|
||||
const newScale = Math.max(this.scaleValue - this.zoomStep, 0.5)
|
||||
const newScale = Math.max(this.scaleValue - this.zoomStep, 0.2)
|
||||
this.setScaleWithAnimation(newScale)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user