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",
|
"version": "1.0.6",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build",
|
"build": "npm run test && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"new": "plop --plopfile ./plop/plopfile.js",
|
"new": "plop --plopfile ./plop/plopfile.js",
|
||||||
|
"test": "vue-tsc --noEmit",
|
||||||
"postinstall": "husky install"
|
"postinstall": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:title="item.title"
|
:title="item.title"
|
||||||
:name="key">
|
:name="key">
|
||||||
<template #header-extra>
|
<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>
|
<component :is="AddCircleIcon"></component>
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
@ -103,7 +103,7 @@ const { targetData, chartEditStore } = useTargetData();
|
|||||||
|
|
||||||
// 事件配置
|
// 事件配置
|
||||||
const eventConfig = computed<EventConfig>(() => {
|
const eventConfig = computed<EventConfig>(() => {
|
||||||
return targetData.value?.eventConfig
|
return targetData.value?.eventConfig as EventConfig
|
||||||
})
|
})
|
||||||
|
|
||||||
// 监听数据变化, 设置初始值
|
// 监听数据变化, 设置初始值
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:themeSetting="themeSetting"
|
:themeSetting="themeSetting"
|
||||||
:themeColor="themeColor"
|
:themeColor="themeColor"
|
||||||
:style="{...getSizeStyle(item.attr)}"
|
:style="{...getSizeStyle(item.attr)}"
|
||||||
v-on="useEvent ? getEventList(item.eventConfig) : {}"
|
v-on="useEvent ? getEventList(item.eventConfig as EventConfig) : {}"
|
||||||
></component>
|
></component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -14,8 +14,7 @@ import { PropType, toRefs, getCurrentInstance, ComponentInternalInstance } from
|
|||||||
import { useEventBus } from '@/hooks'
|
import { useEventBus } from '@/hooks'
|
||||||
import { convertEventBusListeners } from '@/hooks/useEventBus.hook'
|
import { convertEventBusListeners } from '@/hooks/useEventBus.hook'
|
||||||
import { getSizeStyle } from '../../utils'
|
import { getSizeStyle } from '../../utils'
|
||||||
import omit from 'lodash/omit'
|
import { EventTriggerType } from '@/enums/eventEnum'
|
||||||
import { EventTriggerType, EventType } from '@/enums/eventEnum'
|
|
||||||
import { CreateComponentType, EventConfig } from '@/packages/index.d'
|
import { CreateComponentType, EventConfig } from '@/packages/index.d'
|
||||||
import { newFunctionHandle } from '@/utils'
|
import { newFunctionHandle } from '@/utils'
|
||||||
|
|
||||||
@ -77,7 +76,7 @@ const getEventList = (eventConfig: EventConfig) => {
|
|||||||
const listeners = {
|
const listeners = {
|
||||||
on: {
|
on: {
|
||||||
forceUpdate: () => {
|
forceUpdate: () => {
|
||||||
instance.ctx.$forceUpdate()
|
instance.proxy?.$forceUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user