mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
feat(editor): 新增data-source-panel-search slot
This commit is contained in:
parent
a073b8c50d
commit
6821ce5fbf
@ -56,6 +56,10 @@
|
||||
<template #data-source-panel-tool="{ data }">
|
||||
<slot name="data-source-panel-tool" :data="data"></slot>
|
||||
</template>
|
||||
|
||||
<template #data-source-panel-search>
|
||||
<slot name="data-source-panel-search"></slot>
|
||||
</template>
|
||||
</Sidebar>
|
||||
</slot>
|
||||
</template>
|
||||
|
@ -73,6 +73,7 @@ export { default as EventSelect } from './fields/EventSelect.vue';
|
||||
export { default as KeyValue } from './fields/KeyValue.vue';
|
||||
export { default as CodeBlockList } from './layouts/sidebar/code-block/CodeBlockList.vue';
|
||||
export { default as CodeBlockListPanel } from './layouts/sidebar/code-block/CodeBlockListPanel.vue';
|
||||
export { default as DataSourceConfigPanel } from './layouts/sidebar/data-source/DataSourceConfigPanel.vue';
|
||||
export { default as PropsPanel } from './layouts/PropsPanel.vue';
|
||||
export { default as ToolButton } from './components/ToolButton.vue';
|
||||
export { default as ContentMenu } from './components/ContentMenu.vue';
|
||||
|
@ -96,6 +96,11 @@
|
||||
<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" />
|
||||
</template>
|
||||
|
||||
<template #data-source-panel-search v-if="config.$key === 'data-source' || config.slots?.dataSourcePanelSearch">
|
||||
<slot v-if="config.$key === 'data-source'" name="data-source-panel-search"></slot>
|
||||
<component v-else-if="config.slots?.dataSourcePanelSearch" :is="config.slots.dataSourcePanelSearch" />
|
||||
</template>
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,11 +20,14 @@
|
||||
></ToolButton>
|
||||
</div>
|
||||
</TMagicPopover>
|
||||
|
||||
<slot name="data-source-panel-search"></slot>
|
||||
</div>
|
||||
|
||||
<!-- 数据源列表 -->
|
||||
<DataSourceList @edit="editHandler" @remove="removeHandler"></DataSourceList>
|
||||
</TMagicScrollbar>
|
||||
|
||||
<DataSourceConfigPanel
|
||||
ref="editDialog"
|
||||
:disabled="!editable"
|
||||
|
@ -81,6 +81,7 @@ export interface CodeBlockListSlots {
|
||||
|
||||
export interface DataSourceListSlots {
|
||||
'data-source-panel-tool'(props: { data: any }): any;
|
||||
'data-source-panel-search'(props: {}): any;
|
||||
}
|
||||
|
||||
export interface LayerNodeSlots {
|
||||
|
Loading…
x
Reference in New Issue
Block a user