mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改类型
This commit is contained in:
+3
-4
@@ -82,13 +82,12 @@ export const screenfullFn = (isFullscreen?: boolean, isEnabled?: boolean) => {
|
||||
* @param key 键名
|
||||
* @param value 键值
|
||||
*/
|
||||
export const setDomAttribute = <T extends keyof CSSStyleDeclaration>(
|
||||
export const setDomAttribute = <K extends keyof CSSStyleDeclaration, V extends CSSStyleDeclaration[K]>(
|
||||
HTMLElement: HTMLElement,
|
||||
key: T,
|
||||
value: any
|
||||
key: K,
|
||||
value: V
|
||||
) => {
|
||||
if (HTMLElement) {
|
||||
// @ts-ignore
|
||||
HTMLElement.style[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user