@tmagic/editor 1.3.15 → 1.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/style.css CHANGED
@@ -255,6 +255,7 @@
255
255
  }
256
256
  .m-editor-layer-panel {
257
257
  background: #ffffff;
258
+ position: relative;
258
259
  }
259
260
  .m-editor-layer-panel .m-editor-tree {
260
261
  padding-top: 48px;
@@ -359,6 +360,11 @@
359
360
  white-space: normal;
360
361
  margin: 0;
361
362
  }
363
+ .ui-component-panel .t-collapse {
364
+ margin-top: 0;
365
+ padding-top: 48px;
366
+ position: relative;
367
+ }
362
368
  .m-editor-resizer {
363
369
  border-left: 1px solid transparent;
364
370
  border-right: 1px solid transparent;
@@ -7544,14 +7544,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7544
7544
  ])
7545
7545
  ]),
7546
7546
  _: 1
7547
- })) : createCommentVNode("", true)
7547
+ })) : createCommentVNode("", true),
7548
+ renderSlot(_ctx.$slots, "data-source-panel-search")
7548
7549
  ]),
7549
7550
  createVNode(_sfc_main$i, {
7550
7551
  onEdit: editHandler,
7551
7552
  onRemove: removeHandler
7552
7553
  })
7553
7554
  ]),
7554
- _: 1
7555
+ _: 3
7555
7556
  }),
7556
7557
  createVNode(_sfc_main$j, {
7557
7558
  ref_key: "editDialog",
@@ -8828,6 +8829,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8828
8829
  ]),
8829
8830
  key: "4"
8830
8831
  } : void 0,
8832
+ config.$key === "code-block" || config.slots?.codeBlockPanelSearch ? {
8833
+ name: "code-block-panel-search",
8834
+ fn: withCtx(() => [
8835
+ config.$key === "code-block" ? renderSlot(_ctx.$slots, "code-block-panel-search", { key: 0 }) : config.slots?.codeBlockPanelSearch ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.codeBlockPanelSearch), { key: 1 })) : createCommentVNode("", true)
8836
+ ]),
8837
+ key: "5"
8838
+ } : void 0,
8831
8839
  config.$key === "layer" || config.slots?.layerNodeContent ? {
8832
8840
  name: "layer-node-content",
8833
8841
  fn: withCtx(({ data: nodeData }) => [
@@ -8839,7 +8847,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8839
8847
  data: nodeData
8840
8848
  }, null, 8, ["data"])) : createCommentVNode("", true)
8841
8849
  ]),
8842
- key: "5"
8850
+ key: "6"
8843
8851
  } : void 0,
8844
8852
  config.$key === "layer" || config.slots?.layerNodeLabel ? {
8845
8853
  name: "layer-node-label",
@@ -8852,7 +8860,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8852
8860
  data: nodeData
8853
8861
  }, null, 8, ["data"])) : createCommentVNode("", true)
8854
8862
  ]),
8855
- key: "6"
8863
+ key: "7"
8856
8864
  } : void 0,
8857
8865
  config.$key === "layer" || config.slots?.layerNodeTool ? {
8858
8866
  name: "layer-node-tool",
@@ -8865,9 +8873,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8865
8873
  data: nodeData
8866
8874
  }, null, 8, ["data"])) : createCommentVNode("", true)
8867
8875
  ]),
8868
- key: "7"
8876
+ key: "8"
8869
8877
  } : void 0,
8870
- config.$key === "data-source" || config.slots?.codeBlockPanelTool ? {
8878
+ config.$key === "data-source" || config.slots?.dataSourcePanelTool ? {
8871
8879
  name: "data-source-panel-tool",
8872
8880
  fn: withCtx(({ data }) => [
8873
8881
  config.$key === "data-source" ? renderSlot(_ctx.$slots, "data-source-panel-tool", {
@@ -8875,7 +8883,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
8875
8883
  data
8876
8884
  }) : config.slots?.DataSourcePanelTool ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.DataSourcePanelTool), { key: 1 })) : createCommentVNode("", true)
8877
8885
  ]),
8878
- key: "8"
8886
+ key: "9"
8887
+ } : void 0,
8888
+ config.$key === "data-source" || config.slots?.dataSourcePanelSearch ? {
8889
+ name: "data-source-panel-search",
8890
+ fn: withCtx(() => [
8891
+ config.$key === "data-source" ? renderSlot(_ctx.$slots, "data-source-panel-search", { key: 0 }) : config.slots?.dataSourcePanelSearch ? (openBlock(), createBlock(resolveDynamicComponent(config.slots.dataSourcePanelSearch), { key: 1 })) : createCommentVNode("", true)
8892
+ ]),
8893
+ key: "10"
8879
8894
  } : void 0
8880
8895
  ]), 1040)) : createCommentVNode("", true)
8881
8896
  ])), [
@@ -11157,9 +11172,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11157
11172
  data
11158
11173
  })
11159
11174
  ]),
11175
+ "code-block-panel-search": withCtx(() => [
11176
+ renderSlot(_ctx.$slots, "code-block-panel-search")
11177
+ ]),
11160
11178
  "data-source-panel-tool": withCtx(({ data }) => [
11161
11179
  renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
11162
11180
  ]),
11181
+ "data-source-panel-search": withCtx(() => [
11182
+ renderSlot(_ctx.$slots, "data-source-panel-search")
11183
+ ]),
11163
11184
  _: 3
11164
11185
  }, 8, ["data", "layer-content-menu", "custom-content-menu"])
11165
11186
  ])
@@ -11249,4 +11270,4 @@ const index = {
11249
11270
  }
11250
11271
  };
11251
11272
 
11252
- export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$Q as CodeBlockEditor, _sfc_main$l as CodeBlockList, _sfc_main$k as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$R as CodeSelect, _sfc_main$N as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$g as ContentMenu, _sfc_main$L as DataSourceFieldSelect, _sfc_main$M as DataSourceFields, _sfc_main$K as DataSourceInput, _sfc_main$I as DataSourceMethodSelect, _sfc_main$J as DataSourceMethods, _sfc_main$H as DataSourceMocks, _sfc_main$G as DataSourceSelect, DragType, _sfc_main$F as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$O as Icon, KeyBindingCommand, _sfc_main$D as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$C as PageFragmentSelect, _sfc_main$q as PropsPanel, _sfc_main$A as Resizer, _sfc_main$z as SplitView, _sfc_main$U as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$y as ToolButton, UI_SELECT_MODE_EVENT_NAME, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setChildrenLayout, setConfig, setLayout, stageOverlayService, storageService, styleTabConfig, traverseNode, uiService, useCodeBlockEdit, useDataSourceMethod, useFloatBox, useStage, warn };
11273
+ export { CODE_DRAFT_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$Q as CodeBlockEditor, _sfc_main$l as CodeBlockList, _sfc_main$k as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$R as CodeSelect, _sfc_main$N as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$g as ContentMenu, _sfc_main$j as DataSourceConfigPanel, _sfc_main$L as DataSourceFieldSelect, _sfc_main$M as DataSourceFields, _sfc_main$K as DataSourceInput, _sfc_main$I as DataSourceMethodSelect, _sfc_main$J as DataSourceMethods, _sfc_main$H as DataSourceMocks, _sfc_main$G as DataSourceSelect, DragType, _sfc_main$F as EventSelect, Fixed2Other, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$O as Icon, KeyBindingCommand, _sfc_main$D as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$C as PageFragmentSelect, _sfc_main$q as PropsPanel, _sfc_main$A as Resizer, _sfc_main$z as SplitView, _sfc_main$U as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$y as ToolButton, UI_SELECT_MODE_EVENT_NAME, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, error, eventTabConfig, eventsService, fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getConfig, getDefaultConfig, getDisplayField, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isFixed, log, propsService, serializeConfig, setChildrenLayout, setConfig, setLayout, stageOverlayService, storageService, styleTabConfig, traverseNode, uiService, useCodeBlockEdit, useDataSourceMethod, useFloatBox, useStage, warn };
@@ -7549,14 +7549,15 @@
7549
7549
  ])
7550
7550
  ]),
7551
7551
  _: 1
7552
- })) : vue.createCommentVNode("", true)
7552
+ })) : vue.createCommentVNode("", true),
7553
+ vue.renderSlot(_ctx.$slots, "data-source-panel-search")
7553
7554
  ]),
7554
7555
  vue.createVNode(_sfc_main$i, {
7555
7556
  onEdit: editHandler,
7556
7557
  onRemove: removeHandler
7557
7558
  })
7558
7559
  ]),
7559
- _: 1
7560
+ _: 3
7560
7561
  }),
7561
7562
  vue.createVNode(_sfc_main$j, {
7562
7563
  ref_key: "editDialog",
@@ -8833,6 +8834,13 @@
8833
8834
  ]),
8834
8835
  key: "4"
8835
8836
  } : void 0,
8837
+ config.$key === "code-block" || config.slots?.codeBlockPanelSearch ? {
8838
+ name: "code-block-panel-search",
8839
+ fn: vue.withCtx(() => [
8840
+ config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-search", { key: 0 }) : config.slots?.codeBlockPanelSearch ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelSearch), { key: 1 })) : vue.createCommentVNode("", true)
8841
+ ]),
8842
+ key: "5"
8843
+ } : void 0,
8836
8844
  config.$key === "layer" || config.slots?.layerNodeContent ? {
8837
8845
  name: "layer-node-content",
8838
8846
  fn: vue.withCtx(({ data: nodeData }) => [
@@ -8844,7 +8852,7 @@
8844
8852
  data: nodeData
8845
8853
  }, null, 8, ["data"])) : vue.createCommentVNode("", true)
8846
8854
  ]),
8847
- key: "5"
8855
+ key: "6"
8848
8856
  } : void 0,
8849
8857
  config.$key === "layer" || config.slots?.layerNodeLabel ? {
8850
8858
  name: "layer-node-label",
@@ -8857,7 +8865,7 @@
8857
8865
  data: nodeData
8858
8866
  }, null, 8, ["data"])) : vue.createCommentVNode("", true)
8859
8867
  ]),
8860
- key: "6"
8868
+ key: "7"
8861
8869
  } : void 0,
8862
8870
  config.$key === "layer" || config.slots?.layerNodeTool ? {
8863
8871
  name: "layer-node-tool",
@@ -8870,9 +8878,9 @@
8870
8878
  data: nodeData
8871
8879
  }, null, 8, ["data"])) : vue.createCommentVNode("", true)
8872
8880
  ]),
8873
- key: "7"
8881
+ key: "8"
8874
8882
  } : void 0,
8875
- config.$key === "data-source" || config.slots?.codeBlockPanelTool ? {
8883
+ config.$key === "data-source" || config.slots?.dataSourcePanelTool ? {
8876
8884
  name: "data-source-panel-tool",
8877
8885
  fn: vue.withCtx(({ data }) => [
8878
8886
  config.$key === "data-source" ? vue.renderSlot(_ctx.$slots, "data-source-panel-tool", {
@@ -8880,7 +8888,14 @@
8880
8888
  data
8881
8889
  }) : config.slots?.DataSourcePanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.DataSourcePanelTool), { key: 1 })) : vue.createCommentVNode("", true)
8882
8890
  ]),
8883
- key: "8"
8891
+ key: "9"
8892
+ } : void 0,
8893
+ config.$key === "data-source" || config.slots?.dataSourcePanelSearch ? {
8894
+ name: "data-source-panel-search",
8895
+ fn: vue.withCtx(() => [
8896
+ config.$key === "data-source" ? vue.renderSlot(_ctx.$slots, "data-source-panel-search", { key: 0 }) : config.slots?.dataSourcePanelSearch ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.dataSourcePanelSearch), { key: 1 })) : vue.createCommentVNode("", true)
8897
+ ]),
8898
+ key: "10"
8884
8899
  } : void 0
8885
8900
  ]), 1040)) : vue.createCommentVNode("", true)
8886
8901
  ])), [
@@ -11162,9 +11177,15 @@
11162
11177
  data
11163
11178
  })
11164
11179
  ]),
11180
+ "code-block-panel-search": vue.withCtx(() => [
11181
+ vue.renderSlot(_ctx.$slots, "code-block-panel-search")
11182
+ ]),
11165
11183
  "data-source-panel-tool": vue.withCtx(({ data }) => [
11166
11184
  vue.renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
11167
11185
  ]),
11186
+ "data-source-panel-search": vue.withCtx(() => [
11187
+ vue.renderSlot(_ctx.$slots, "data-source-panel-search")
11188
+ ]),
11168
11189
  _: 3
11169
11190
  }, 8, ["data", "layer-content-menu", "custom-content-menu"])
11170
11191
  ])
@@ -11269,6 +11290,7 @@
11269
11290
  exports.ColumnLayout = ColumnLayout;
11270
11291
  exports.ComponentListPanel = _sfc_main$b;
11271
11292
  exports.ContentMenu = _sfc_main$g;
11293
+ exports.DataSourceConfigPanel = _sfc_main$j;
11272
11294
  exports.DataSourceFieldSelect = _sfc_main$L;
11273
11295
  exports.DataSourceFields = _sfc_main$M;
11274
11296
  exports.DataSourceInput = _sfc_main$K;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.15",
2
+ "version": "1.3.16",
3
3
  "name": "@tmagic/editor",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -42,14 +42,14 @@
42
42
  "dependencies": {
43
43
  "@babel/core": "^7.18.0",
44
44
  "@element-plus/icons-vue": "^2.3.1",
45
- "@tmagic/core": "1.3.15",
46
- "@tmagic/dep": "1.3.15",
47
- "@tmagic/design": "1.3.15",
48
- "@tmagic/form": "1.3.15",
49
- "@tmagic/schema": "1.3.15",
50
- "@tmagic/stage": "1.3.15",
51
- "@tmagic/table": "1.3.15",
52
- "@tmagic/utils": "1.3.15",
45
+ "@tmagic/core": "1.3.16",
46
+ "@tmagic/dep": "1.3.16",
47
+ "@tmagic/design": "1.3.16",
48
+ "@tmagic/form": "1.3.16",
49
+ "@tmagic/schema": "1.3.16",
50
+ "@tmagic/stage": "1.3.16",
51
+ "@tmagic/table": "1.3.16",
52
+ "@tmagic/utils": "1.3.16",
53
53
  "buffer": "^6.0.3",
54
54
  "color": "^3.1.3",
55
55
  "emmet-monaco-es": "^5.3.0",
@@ -63,8 +63,8 @@
63
63
  "vue": "^3.3.8"
64
64
  },
65
65
  "peerDependencies": {
66
- "@tmagic/design": "1.3.15",
67
- "@tmagic/form": "1.3.15",
66
+ "@tmagic/design": "1.3.16",
67
+ "@tmagic/form": "1.3.16",
68
68
  "monaco-editor": "^0.41.0",
69
69
  "vue": "^3.3.8"
70
70
  },
package/src/Editor.vue CHANGED
@@ -49,9 +49,17 @@
49
49
  <slot name="code-block-panel-tool" :id="id" :data="data"></slot>
50
50
  </template>
51
51
 
52
+ <template #code-block-panel-search>
53
+ <slot name="code-block-panel-search"></slot>
54
+ </template>
55
+
52
56
  <template #data-source-panel-tool="{ data }">
53
57
  <slot name="data-source-panel-tool" :data="data"></slot>
54
58
  </template>
59
+
60
+ <template #data-source-panel-search>
61
+ <slot name="data-source-panel-search"></slot>
62
+ </template>
55
63
  </Sidebar>
56
64
  </slot>
57
65
  </template>
package/src/index.ts CHANGED
@@ -73,6 +73,7 @@ export { default as EventSelect } from './fields/EventSelect.vue';
73
73
  export { default as KeyValue } from './fields/KeyValue.vue';
74
74
  export { default as CodeBlockList } from './layouts/sidebar/code-block/CodeBlockList.vue';
75
75
  export { default as CodeBlockListPanel } from './layouts/sidebar/code-block/CodeBlockListPanel.vue';
76
+ export { default as DataSourceConfigPanel } from './layouts/sidebar/data-source/DataSourceConfigPanel.vue';
76
77
  export { default as PropsPanel } from './layouts/PropsPanel.vue';
77
78
  export { default as ToolButton } from './components/ToolButton.vue';
78
79
  export { default as ContentMenu } from './components/ContentMenu.vue';
@@ -66,6 +66,11 @@
66
66
  <component v-else-if="config.slots?.codeBlockPanelTool" :is="config.slots.codeBlockPanelTool" />
67
67
  </template>
68
68
 
69
+ <template #code-block-panel-search v-if="config.$key === 'code-block' || config.slots?.codeBlockPanelSearch">
70
+ <slot v-if="config.$key === 'code-block'" name="code-block-panel-search"></slot>
71
+ <component v-else-if="config.slots?.codeBlockPanelSearch" :is="config.slots.codeBlockPanelSearch" />
72
+ </template>
73
+
69
74
  <template
70
75
  #layer-node-content="{ data: nodeData }"
71
76
  v-if="config.$key === 'layer' || config.slots?.layerNodeContent"
@@ -86,11 +91,16 @@
86
91
 
87
92
  <template
88
93
  #data-source-panel-tool="{ data }"
89
- v-if="config.$key === 'data-source' || config.slots?.codeBlockPanelTool"
94
+ v-if="config.$key === 'data-source' || config.slots?.dataSourcePanelTool"
90
95
  >
91
96
  <slot v-if="config.$key === 'data-source'" name="data-source-panel-tool" :data="data"></slot>
92
97
  <component v-else-if="config.slots?.DataSourcePanelTool" :is="config.slots.DataSourcePanelTool" />
93
98
  </template>
99
+
100
+ <template #data-source-panel-search v-if="config.$key === 'data-source' || config.slots?.dataSourcePanelSearch">
101
+ <slot v-if="config.$key === 'data-source'" name="data-source-panel-search"></slot>
102
+ <component v-else-if="config.slots?.dataSourcePanelSearch" :is="config.slots.dataSourcePanelSearch" />
103
+ </template>
94
104
  </component>
95
105
  </div>
96
106
  </div>
@@ -20,11 +20,14 @@
20
20
  ></ToolButton>
21
21
  </div>
22
22
  </TMagicPopover>
23
+
24
+ <slot name="data-source-panel-search"></slot>
23
25
  </div>
24
26
 
25
27
  <!-- 数据源列表 -->
26
28
  <DataSourceList @edit="editHandler" @remove="removeHandler"></DataSourceList>
27
29
  </TMagicScrollbar>
30
+
28
31
  <DataSourceConfigPanel
29
32
  ref="editDialog"
30
33
  :disabled="!editable"
@@ -1,88 +1,96 @@
1
- .ui-component-panel.tmagic-design-collapse {
2
- height: 100%;
3
- border-top: 0 !important;
4
- margin-top: 48px;
5
- background-color: $--sidebar-content-background-color;
1
+ .ui-component-panel {
2
+ &.tmagic-design-collapse {
3
+ height: 100%;
4
+ border-top: 0 !important;
5
+ margin-top: 48px;
6
+ background-color: $--sidebar-content-background-color;
6
7
 
7
- .tmagic-design-collapse-item {
8
- > div:first-of-type {
9
- border-bottom: 1px solid $--border-color;
10
- margin-bottom: 10px;
8
+ .tmagic-design-collapse-item {
9
+ > div:first-of-type {
10
+ border-bottom: 1px solid $--border-color;
11
+ margin-bottom: 10px;
12
+ }
11
13
  }
12
- }
13
14
 
14
- .el-collapse-item__header,
15
- .t-collapse-panel__header {
16
- background: $--sidebar-content-background-color;
17
- color: $--font-color;
18
- height: 25px;
19
- line-height: 25px;
20
- padding-left: 10px;
21
- font-size: 12px;
15
+ .el-collapse-item__header,
16
+ .t-collapse-panel__header {
17
+ background: $--sidebar-content-background-color;
18
+ color: $--font-color;
19
+ height: 25px;
20
+ line-height: 25px;
21
+ padding-left: 10px;
22
+ font-size: 12px;
22
23
 
23
- i {
24
- margin-right: 5px;
25
- font-size: 14px;
24
+ i {
25
+ margin-right: 5px;
26
+ font-size: 14px;
27
+ }
26
28
  }
27
- }
28
-
29
- .el-collapse-item__wrap,
30
- .t-collapse-panel__body {
31
- background: $--sidebar-content-background-color;
32
- border-bottom: 0;
33
29
 
34
- .el-collapse-item__content,
35
- .t-collapse-panel__content {
36
- padding: 10px;
37
- display: flex;
38
- flex-wrap: wrap;
39
- }
30
+ .el-collapse-item__wrap,
31
+ .t-collapse-panel__body {
32
+ background: $--sidebar-content-background-color;
33
+ border-bottom: 0;
40
34
 
41
- .component-item {
42
- display: flex;
43
- overflow: hidden;
44
- text-overflow: ellipsis;
45
- margin: 5px 10px;
46
- box-sizing: border-box;
47
- color: $--font-color;
48
- flex-direction: column;
49
- width: 42px;
50
- cursor: pointer;
35
+ .el-collapse-item__content,
36
+ .t-collapse-panel__content {
37
+ padding: 10px;
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ }
51
41
 
52
- i {
53
- font-size: 20px;
54
- background: #fff;
55
- height: 40px;
56
- width: 40px;
57
- line-height: 40px;
58
- border-radius: 5px;
59
- color: #909090;
60
- border: 1px solid $--border-color;
42
+ .component-item {
61
43
  display: flex;
62
- justify-content: space-evenly;
63
- align-items: center;
64
- margin-bottom: 5px;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ margin: 5px 10px;
47
+ box-sizing: border-box;
48
+ color: $--font-color;
49
+ flex-direction: column;
50
+ width: 42px;
51
+ cursor: pointer;
52
+
53
+ i {
54
+ font-size: 20px;
55
+ background: #fff;
56
+ height: 40px;
57
+ width: 40px;
58
+ line-height: 40px;
59
+ border-radius: 5px;
60
+ color: #909090;
61
+ border: 1px solid $--border-color;
62
+ display: flex;
63
+ justify-content: space-evenly;
64
+ align-items: center;
65
+ margin-bottom: 5px;
65
66
 
66
- &:hover {
67
- background: #2882e0;
68
- color: #fff;
69
- border-color: #4e8be1;
67
+ &:hover {
68
+ background: #2882e0;
69
+ color: #fff;
70
+ border-color: #4e8be1;
71
+ }
70
72
  }
71
- }
72
73
 
73
- span {
74
- font-size: 12px;
75
- text-align: center;
76
- }
74
+ span {
75
+ font-size: 12px;
76
+ text-align: center;
77
+ }
77
78
 
78
- .el-tooltip {
79
- width: 50px;
80
- height: 30px;
81
- line-height: 15px;
82
- display: block;
83
- white-space: normal;
84
- margin: 0;
79
+ .el-tooltip {
80
+ width: 50px;
81
+ height: 30px;
82
+ line-height: 15px;
83
+ display: block;
84
+ white-space: normal;
85
+ margin: 0;
86
+ }
85
87
  }
86
88
  }
87
89
  }
90
+
91
+ .t-collapse {
92
+ margin-top: 0;
93
+ padding-top: 48px;
94
+ position: relative;
95
+ }
88
96
  }
@@ -1,5 +1,6 @@
1
1
  .m-editor-layer-panel {
2
2
  background: $--sidebar-content-background-color;
3
+ position: relative;
3
4
 
4
5
  .m-editor-tree {
5
6
  padding-top: 48px;
package/src/type.ts CHANGED
@@ -81,6 +81,7 @@ export interface CodeBlockListSlots {
81
81
 
82
82
  export interface DataSourceListSlots {
83
83
  'data-source-panel-tool'(props: { data: any }): any;
84
+ 'data-source-panel-search'(props: {}): any;
84
85
  }
85
86
 
86
87
  export interface LayerNodeSlots {
package/types/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export { default as EventSelect } from './fields/EventSelect.vue';
34
34
  export { default as KeyValue } from './fields/KeyValue.vue';
35
35
  export { default as CodeBlockList } from './layouts/sidebar/code-block/CodeBlockList.vue';
36
36
  export { default as CodeBlockListPanel } from './layouts/sidebar/code-block/CodeBlockListPanel.vue';
37
+ export { default as DataSourceConfigPanel } from './layouts/sidebar/data-source/DataSourceConfigPanel.vue';
37
38
  export { default as PropsPanel } from './layouts/PropsPanel.vue';
38
39
  export { default as ToolButton } from './components/ToolButton.vue';
39
40
  export { default as ContentMenu } from './components/ContentMenu.vue';
package/types/type.d.ts CHANGED
@@ -59,6 +59,7 @@ export interface DataSourceListSlots {
59
59
  'data-source-panel-tool'(props: {
60
60
  data: any;
61
61
  }): any;
62
+ 'data-source-panel-search'(props: {}): any;
62
63
  }
63
64
  export interface LayerNodeSlots {
64
65
  'layer-node-content'(props: {