mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-15 15:02:10 +08:00
fix: eventConfig为空导致显示异常
This commit is contained in:
parent
9a42915244
commit
a4bd736a8c
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,4 +5,4 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.vscode
|
||||
./stats.html
|
||||
stats.html
|
@ -17,6 +17,7 @@ import { getSizeStyle } from '../../utils'
|
||||
import { EventTriggerType } from '@/enums/eventEnum'
|
||||
import { CreateComponentType, EventConfig } from '@/packages/index.d'
|
||||
import { newFunctionHandle } from '@/utils'
|
||||
import isObject from 'lodash/isObject'
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
@ -49,7 +50,8 @@ const bus = useEventBus()
|
||||
* }
|
||||
*/
|
||||
const getEventList = (eventConfig: EventConfig) => {
|
||||
const res = Object.keys(eventConfig) // 剔除other字段
|
||||
if(!isObject(eventConfig)) return {}
|
||||
const res = Object.keys(eventConfig)
|
||||
.reduce((previousValue: EventConfig, currentValue: string) => {
|
||||
// @ts-ignore
|
||||
previousValue[currentValue] = eventConfig[currentValue].methodList.map((item: any) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user