mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
perf: 优化报错信息捕获,去除setPosition自带函数
This commit is contained in:
+1
-1
@@ -4,6 +4,6 @@ export * from '@/utils/router'
|
||||
export * from '@/utils/storage'
|
||||
export * from '@/utils/style'
|
||||
export * from '@/utils/plugin'
|
||||
export * from '@/utils/componets'
|
||||
export * from '@/utils/components'
|
||||
export * from '@/utils/type'
|
||||
export * from '@/utils/file'
|
||||
|
||||
@@ -8,6 +8,7 @@ import { downloadByA } from './file'
|
||||
import { toString } from './type'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
import { RequestHttpIntervalEnum, RequestParamsObjType } from '@/enums/httpEnum'
|
||||
import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
||||
|
||||
/**
|
||||
* * 判断是否是开发环境
|
||||
@@ -72,6 +73,17 @@ export const screenfullFn = (isFullscreen?: boolean, isEnabled?: boolean) => {
|
||||
window['$message'].warning('您的浏览器不支持全屏功能!')
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改元素位置
|
||||
* @param target 对象
|
||||
* @param x X轴
|
||||
* @param y Y轴
|
||||
*/
|
||||
export const setComponentPosition = (target: CreateComponentType | CreateComponentGroupType, x?: number, y?:number) => {
|
||||
x && (target.attr.x = x)
|
||||
y && (target.attr.y = y)
|
||||
}
|
||||
|
||||
/**
|
||||
* * 设置元素属性
|
||||
* @param HTMLElement 元素
|
||||
|
||||
Reference in New Issue
Block a user