mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增 public 预览配置项preview
This commit is contained in:
@@ -3,6 +3,7 @@ import { EditCanvasConfigType } from '@/store/modules/chartEditStore/chartEditSt
|
||||
|
||||
type AttrType = PickCreateComponentType<'attr'>
|
||||
type StatusType = PickCreateComponentType<'status'>
|
||||
type PreviewConfig = PickCreateComponentType<'preview'>
|
||||
|
||||
// 设置位置
|
||||
export const getComponentAttrStyle = (attr: AttrType, index: number) => {
|
||||
@@ -29,6 +30,17 @@ export const getStatusStyle = (attr: StatusType) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 设置预览配置样式
|
||||
export const getPreviewConfigStyle = (previewConfig: PreviewConfig) => {
|
||||
const previewStyle: Partial<CSSStyleDeclaration> = {}
|
||||
if (previewConfig) {
|
||||
if (previewConfig.overFlowHidden) {
|
||||
previewStyle.overflow = 'hidden'
|
||||
}
|
||||
}
|
||||
return previewStyle
|
||||
}
|
||||
|
||||
// 全局样式
|
||||
export const getEditCanvasConfigStyle = (canvas: EditCanvasConfigType) => {
|
||||
// 背景
|
||||
|
||||
Reference in New Issue
Block a user