mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增定位和style处理
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
:class="animationsClass(item.styles.animations)"
|
||||
v-for="(item, index) in localStorageInfo.componentList"
|
||||
:key="item.id"
|
||||
:style="{ ...useComponentAttrStyle(item.attr, index), ...useSizeStyle(item.attr) }"
|
||||
:style="{ ...useComponentAttrStyle(item.attr, index), ...useSizeStyle(item.attr), ...useStyle(item.styles)}"
|
||||
>
|
||||
<component
|
||||
:is="item.key"
|
||||
@@ -19,7 +19,7 @@
|
||||
import { PropType, computed } from 'vue'
|
||||
import { ChartEditStorageType } from '../../index.d'
|
||||
import { chartColors } from '@/settings/chartThemes/index'
|
||||
import { useSizeStyle, useComponentAttrStyle, animationsClass } from '../../utils'
|
||||
import { useSizeStyle, useStyle, useComponentAttrStyle, animationsClass } from '../../utils'
|
||||
|
||||
const props = defineProps({
|
||||
localStorageInfo: {
|
||||
|
||||
@@ -43,3 +43,10 @@ export const animationsClass = (animations: string[]) => {
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
export const useStyle = (styles: StylesType) => {
|
||||
return {
|
||||
// 透明度
|
||||
opacity: styles.opacity
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user