mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
fix: 修改类型报错
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { PickCreateComponentType } from '@/packages/index.d'
|
||||
import { EditCanvasConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
|
||||
type AttrType = PickCreateComponentType<'attr'>
|
||||
|
||||
@@ -19,3 +20,12 @@ export const useSizeStyle = (attr: AttrType, scale?: number) => {
|
||||
}
|
||||
return sizeStyle
|
||||
}
|
||||
|
||||
export const useEditCanvasConfigStyle = (canvas: EditCanvasConfigType) => {
|
||||
return {
|
||||
position: 'relative',
|
||||
width: canvas.width ? `${canvas.width || 100}px` : '100%',
|
||||
height: canvas.height ? `${canvas.height}px` : '100%',
|
||||
border: '1px solid red'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user