mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
feat: 扩展 ConfigType,以支持虚拟图标组件
This commit is contained in:
parent
6fee63600b
commit
816c11a877
1
src/packages/index.d.ts
vendored
1
src/packages/index.d.ts
vendored
@ -28,6 +28,7 @@ export type ConfigType = {
|
||||
dataset?: any // 组件预设的 dataset 值
|
||||
disabled?: boolean // 禁用的
|
||||
clickHandle?: Function // 单击事件
|
||||
icon?: string // 图标
|
||||
}
|
||||
|
||||
// 数据请求
|
||||
|
@ -23,7 +23,8 @@
|
||||
</n-text>
|
||||
</div>
|
||||
<div class="list-center go-flex-center go-transition">
|
||||
<chart-glob-image class="list-img" :chartConfig="item"></chart-glob-image>
|
||||
<Icon v-if="item.icon" class="list-img" :icon="item.icon" color="#999" width="48" />
|
||||
<chart-glob-image v-else class="list-img" :chartConfig="item" />
|
||||
</div>
|
||||
<div class="list-bottom">
|
||||
<n-text class="list-bottom-text" depth="3">
|
||||
@ -48,6 +49,7 @@ import { DragKeyEnum } from '@/enums/editPageEnum'
|
||||
import { createComponent } from '@/packages'
|
||||
import { ConfigType, CreateComponentType } from '@/packages/index.d'
|
||||
import { fetchConfigComponent, fetchChartComponent } from '@/packages/index'
|
||||
import { Icon } from '@iconify/vue'
|
||||
|
||||
import omit from 'lodash/omit'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user