fix: 修改类型

This commit is contained in:
mtruning
2022-01-23 19:22:54 +08:00
parent 0033b42008
commit d7965c5857
3 changed files with 12 additions and 7 deletions
+6
View File
@@ -10,6 +10,12 @@ import { renderIcon } from '@/utils'
* * render 对话框
* @param { Object} params 配置参数
* @param { Function } dialogFn 函数
* ```
* // 最简易demo
* goDialog({
* onPositiveCallback: () => {}
* })
* ```
*/
export const goDialog = (
params: {
+3 -4
View File
@@ -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
}
}