mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-15 23:06:33 +08:00
fix: ts问题修复
This commit is contained in:
parent
7dcb06fec8
commit
9a42915244
@ -3,9 +3,10 @@
|
||||
"version": "1.0.6",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"build": "vite build",
|
||||
"build": "npm run test && vite build",
|
||||
"preview": "vite preview",
|
||||
"new": "plop --plopfile ./plop/plopfile.js",
|
||||
"test": "vue-tsc --noEmit",
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -7,7 +7,7 @@
|
||||
:title="item.title"
|
||||
:name="key">
|
||||
<template #header-extra>
|
||||
<n-icon size="24" @click.stop="onAddEvent(item, key)">
|
||||
<n-icon size="24" @click.stop="onAddEvent(item, key as unknown as EventType)">
|
||||
<component :is="AddCircleIcon"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
@ -103,7 +103,7 @@ const { targetData, chartEditStore } = useTargetData();
|
||||
|
||||
// 事件配置
|
||||
const eventConfig = computed<EventConfig>(() => {
|
||||
return targetData.value?.eventConfig
|
||||
return targetData.value?.eventConfig as EventConfig
|
||||
})
|
||||
|
||||
// 监听数据变化, 设置初始值
|
||||
|
@ -5,7 +5,7 @@
|
||||
:themeSetting="themeSetting"
|
||||
:themeColor="themeColor"
|
||||
:style="{...getSizeStyle(item.attr)}"
|
||||
v-on="useEvent ? getEventList(item.eventConfig) : {}"
|
||||
v-on="useEvent ? getEventList(item.eventConfig as EventConfig) : {}"
|
||||
></component>
|
||||
</template>
|
||||
|
||||
@ -14,8 +14,7 @@ import { PropType, toRefs, getCurrentInstance, ComponentInternalInstance } from
|
||||
import { useEventBus } from '@/hooks'
|
||||
import { convertEventBusListeners } from '@/hooks/useEventBus.hook'
|
||||
import { getSizeStyle } from '../../utils'
|
||||
import omit from 'lodash/omit'
|
||||
import { EventTriggerType, EventType } from '@/enums/eventEnum'
|
||||
import { EventTriggerType } from '@/enums/eventEnum'
|
||||
import { CreateComponentType, EventConfig } from '@/packages/index.d'
|
||||
import { newFunctionHandle } from '@/utils'
|
||||
|
||||
@ -77,7 +76,7 @@ const getEventList = (eventConfig: EventConfig) => {
|
||||
const listeners = {
|
||||
on: {
|
||||
forceUpdate: () => {
|
||||
instance.ctx.$forceUpdate()
|
||||
instance.proxy?.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user