mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 00:02:51 +08:00
fix: 修改类型
This commit is contained in:
parent
0033b42008
commit
d7965c5857
@ -44,7 +44,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// * 设置数据项
|
// * 设置数据项
|
||||||
setEditCanvasItem<T extends keyof EditCanvasType>(key: T, value: any) {
|
setEditCanvasItem<T extends keyof EditCanvasType, K extends EditCanvasType[T]>(key: T, value: K) {
|
||||||
this.editCanvas[key] = value
|
this.editCanvas[key] = value
|
||||||
},
|
},
|
||||||
// * 设置页面样式属性
|
// * 设置页面样式属性
|
||||||
@ -111,7 +111,7 @@ export const useChartEditStoreStore = defineStore({
|
|||||||
this.setScale(parseFloat(scaleHeight.toFixed(5)))
|
this.setScale(parseFloat(scaleHeight.toFixed(5)))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
window['$message'].warning('找不到元素')
|
window['$message'].warning('请先创建画布,再进行缩放')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// * 监听缩放
|
// * 监听缩放
|
||||||
|
@ -10,6 +10,12 @@ import { renderIcon } from '@/utils'
|
|||||||
* * render 对话框
|
* * render 对话框
|
||||||
* @param { Object} params 配置参数
|
* @param { Object} params 配置参数
|
||||||
* @param { Function } dialogFn 函数
|
* @param { Function } dialogFn 函数
|
||||||
|
* ```
|
||||||
|
* // 最简易demo
|
||||||
|
* goDialog({
|
||||||
|
* onPositiveCallback: () => {}
|
||||||
|
* })
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
export const goDialog = (
|
export const goDialog = (
|
||||||
params: {
|
params: {
|
||||||
|
@ -82,13 +82,12 @@ export const screenfullFn = (isFullscreen?: boolean, isEnabled?: boolean) => {
|
|||||||
* @param key 键名
|
* @param key 键名
|
||||||
* @param value 键值
|
* @param value 键值
|
||||||
*/
|
*/
|
||||||
export const setDomAttribute = <T extends keyof CSSStyleDeclaration>(
|
export const setDomAttribute = <K extends keyof CSSStyleDeclaration, V extends CSSStyleDeclaration[K]>(
|
||||||
HTMLElement: HTMLElement,
|
HTMLElement: HTMLElement,
|
||||||
key: T,
|
key: K,
|
||||||
value: any
|
value: V
|
||||||
) => {
|
) => {
|
||||||
if (HTMLElement) {
|
if (HTMLElement) {
|
||||||
// @ts-ignore
|
|
||||||
HTMLElement.style[key] = value
|
HTMLElement.style[key] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user