mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 消除编辑时provide警告
This commit is contained in:
@@ -15,7 +15,9 @@ export const useScale = (localStorageInfo: ChartEditStorageType) => {
|
||||
provide(SCALE_KEY, scaleRef);
|
||||
|
||||
const updateScaleRef = (scale: { width: number; height: number }) => {
|
||||
scaleRef.value = scale
|
||||
// 这里需要解构,保证赋值给scaleRef的为一个新对象
|
||||
// 因为scale始终为同一引用
|
||||
scaleRef.value = { ...scale }
|
||||
}
|
||||
|
||||
// 屏幕适配
|
||||
|
||||
Reference in New Issue
Block a user