feat(editor): 新增code-block-panel-search slot

This commit is contained in:
roymondchen 2024-03-01 13:56:53 +08:00
parent c65470186c
commit a073b8c50d
2 changed files with 10 additions and 1 deletions

View File

@ -49,6 +49,10 @@
<slot name="code-block-panel-tool" :id="id" :data="data"></slot>
</template>
<template #code-block-panel-search>
<slot name="code-block-panel-search"></slot>
</template>
<template #data-source-panel-tool="{ data }">
<slot name="data-source-panel-tool" :data="data"></slot>
</template>

View File

@ -66,6 +66,11 @@
<component v-else-if="config.slots?.codeBlockPanelTool" :is="config.slots.codeBlockPanelTool" />
</template>
<template #code-block-panel-search v-if="config.$key === 'code-block' || config.slots?.codeBlockPanelSearch">
<slot v-if="config.$key === 'code-block'" name="code-block-panel-search"></slot>
<component v-else-if="config.slots?.codeBlockPanelSearch" :is="config.slots.codeBlockPanelSearch" />
</template>
<template
#layer-node-content="{ data: nodeData }"
v-if="config.$key === 'layer' || config.slots?.layerNodeContent"
@ -86,7 +91,7 @@
<template
#data-source-panel-tool="{ data }"
v-if="config.$key === 'data-source' || config.slots?.codeBlockPanelTool"
v-if="config.$key === 'data-source' || config.slots?.dataSourcePanelTool"
>
<slot v-if="config.$key === 'data-source'" name="data-source-panel-tool" :data="data"></slot>
<component v-else-if="config.slots?.DataSourcePanelTool" :is="config.slots.DataSourcePanelTool" />