mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增组件预览
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { PropType, toRaw } from 'vue'
|
||||
import { MacOsControlBtn } from '@/components/MacOsControlBtn/index'
|
||||
import { componentInstall } from '@/utils'
|
||||
import { DragKeyEnum } from '@/enums/editPageEnum'
|
||||
@@ -37,9 +37,10 @@ defineProps({
|
||||
// 拖拽处理
|
||||
const handleDragStart = (e: DragEvent, item: ConfigType) => {
|
||||
// 动态注册图表组件
|
||||
componentInstall(item.key, item.node)
|
||||
componentInstall(item.key, item.node())
|
||||
componentInstall(item.conKey, item.conNode())
|
||||
// 将配置项绑定到拖拽属性上
|
||||
e!.dataTransfer!.setData(DragKeyEnum.DROG_KEY, JSON.stringify(omit(item, ['node', 'image'])))
|
||||
e!.dataTransfer!.setData(DragKeyEnum.DROG_KEY, JSON.stringify(omit(item, ['node', 'conNode', 'image'])))
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user