mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增工作区域内容模块
This commit is contained in:
+21
-4
@@ -56,10 +56,10 @@ export const requireFallbackImg = (path?: string, name?: string) => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 全屏操作函数
|
||||
* @param isFullscreen
|
||||
* @param isEnabled
|
||||
* @returns
|
||||
* * 全屏操作函数
|
||||
* @param isFullscreen
|
||||
* @param isEnabled
|
||||
* @returns
|
||||
*/
|
||||
export const screenfullFn = (isFullscreen?: boolean, isEnabled?: boolean) => {
|
||||
// 是否是全屏
|
||||
@@ -76,6 +76,23 @@ export const screenfullFn = (isFullscreen?: boolean, isEnabled?: boolean) => {
|
||||
window['$message'].warning('您的浏览器不支持全屏功能!')
|
||||
}
|
||||
|
||||
/**
|
||||
* * 设置元素属性
|
||||
* @param HTMLElement 元素
|
||||
* @param key 键名
|
||||
* @param value 键值
|
||||
*/
|
||||
export const setDomAttribute = <T extends keyof CSSStyleDeclaration>(
|
||||
HTMLElement: HTMLElement,
|
||||
key: T,
|
||||
value: any
|
||||
) => {
|
||||
if (HTMLElement) {
|
||||
// @ts-ignore
|
||||
HTMLElement.style[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* * 挂载监听
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user