Skip to content

Commit

Permalink
fix: movable-view 的缩放倍数变更为 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GRCmade committed Dec 20, 2024
1 parent e64ad17 commit f283f2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const movableViewProps = {
},
scaleMin: {
type: [Number, String],
default: 0.5,
default: 0.1,
},
scaleMax: {
type: [Number, String],
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-components/src/nvue/movable-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function useMovableViewState(
})
const scaleMinNumber = computed(() => {
let val = Number(props.scaleMin)
return isNaN(val) ? 0.5 : val
return isNaN(val) ? 0.1 : val
})
const scaleMaxNumber = computed(() => {
let val = Number(props.scaleMax)
Expand Down Expand Up @@ -558,7 +558,7 @@ function useMovableViewState(
_oldScale = scale
}
function _adjustScale(scale: number) {
scale = Math.max(0.5, scaleMinNumber.value, scale)
scale = Math.max(0.1, scaleMinNumber.value, scale)
scale = Math.min(10, scaleMaxNumber.value, scale)
return scale
}
Expand Down
4 changes: 2 additions & 2 deletions packages/uni-components/src/vue/movable-view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ function useMovableViewInit(
) {
const scaleMinNumber = computed(() => {
let val = Number(props.scaleMin)
return isNaN(val) ? 0.5 : val
return isNaN(val) ? 0.1 : val
})
const scaleMaxNumber = computed(() => {
let val = Number(props.scaleMax)
Expand Down Expand Up @@ -556,7 +556,7 @@ function useMovableViewInit(
_oldScale.value = scale
}
function _adjustScale(scale: number) {
scale = Math.max(0.5, scaleMinNumber.value, scale)
scale = Math.max(0.1, scaleMinNumber.value, scale)
scale = Math.min(10, scaleMaxNumber.value, scale)
return scale
}
Expand Down

0 comments on commit f283f2b

Please sign in to comment.