@ebiz/designer-components 0.0.18-beta.29 → 0.0.18-beta.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebiz/designer-components",
3
- "version": "0.0.18-beta.29",
3
+ "version": "0.0.18-beta.30",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -6,6 +6,7 @@
6
6
 
7
7
  import axios from 'axios'
8
8
  import { TinyNotify } from '@opentiny/vue'
9
+
9
10
  // 从环境变量获取API基础URL
10
11
  const API_BASE_URL = 'http://' + window.location.host + '/api'
11
12
 
@@ -175,7 +176,7 @@ const dataService = {
175
176
  }
176
177
  params.apiId = apiConfig.apiId
177
178
  if (apiConfig.key) {
178
- params.key = apiConfig.key
179
+ params.apiKey = apiConfig.key
179
180
  }
180
181
 
181
182
  const config = { ...defaultConfig, ...restConfig }
@@ -5,9 +5,6 @@
5
5
  :value="modelValue"
6
6
  :expanded="expandedModel"
7
7
  :actived="activedModel"
8
- :transition="transition"
9
- :disable-check="disableCheck"
10
- :keys="keys"
11
8
  @change="handleChange"
12
9
  @expand="handleExpand"
13
10
  @active="handleActive"
@@ -66,25 +63,6 @@ const props = defineProps({
66
63
  items: {
67
64
  type: Array,
68
65
  default: () => []
69
- },
70
- // 是否启用过渡动画
71
- transition: {
72
- type: Boolean,
73
- default: false
74
- },
75
- // 自定义节点禁用状态,返回true表示禁用
76
- disableCheck: {
77
- type: Function,
78
- default: null
79
- },
80
- // 自定义节点数据中的字段名称
81
- keys: {
82
- type: Object,
83
- default: () => ({
84
- label: 'label',
85
- value: 'value',
86
- children: 'children'
87
- })
88
66
  }
89
67
  });
90
68
 
package/src/index.js CHANGED
@@ -52,7 +52,6 @@ import EbizTableColumn from './components/EbizTableColumn.vue';
52
52
  import EbizTableSort from './components/EbizTableSort.vue';
53
53
  import EbizDetailBlock from './components/EbizDetailBlock.vue';
54
54
  import EbizTree from './components/EbizTree.vue';
55
- import EbizTreeSelector from './components/EbizTreeSelector.vue';
56
55
  import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
57
56
 
58
57
  // 导入简洁数据服务
@@ -158,6 +157,5 @@ export {
158
157
  // 详情块组件
159
158
  EbizDetailBlock,
160
159
  // 树组件
161
- EbizTree,
162
- EbizTreeSelector
160
+ EbizTree
163
161
  };
@@ -267,20 +267,6 @@ const routes = [
267
267
  name: 'Tree',
268
268
  component: () => import('../views/TreeDemo.vue'),
269
269
  meta: { title: 'Ebiz树组件示例' }
270
- },
271
- {
272
- path: '/tree-demo',
273
- name: 'TreeDemo',
274
- component: () => import('../views/TreeDemo.vue'),
275
- meta: { title: 'Ebiz树组件示例' }
276
- },
277
- {
278
- path: '/tree-selector-demo',
279
- name: 'TreeSelectorDemo',
280
- component: () => import('../views/TreeSelectorDemo.vue'),
281
- meta: {
282
- title: '树形选择器'
283
- }
284
270
  }
285
271
  ]
286
272
 
@@ -1,22 +1,12 @@
1
1
  <template>
2
2
  <div class="home">
3
- <h1>Ebiz 组件库</h1>
3
+ <h1>组件库示例</h1>
4
4
  <div class="component-list">
5
5
  <div v-for="(item, index) in components" :key="index" class="component-item">
6
6
  <router-link :to="item.path" class="component-link">
7
7
  {{ item.title }}
8
8
  </router-link>
9
9
  </div>
10
-
11
- <router-link to="/tree-demo" class="component-item">
12
- <div class="component-title">树组件</div>
13
- <div class="component-desc">用于展示层级结构和操作的组件</div>
14
- </router-link>
15
-
16
- <router-link to="/tree-selector-demo" class="component-item">
17
- <div class="component-title">树形选择器</div>
18
- <div class="component-desc">基于树组件的选择器,支持搜索和多选</div>
19
- </router-link>
20
10
  </div>
21
11
  </div>
22
12
  </template>
@@ -106,18 +96,4 @@ export default {
106
96
  .component-link:hover {
107
97
  color: #1890ff;
108
98
  }
109
-
110
- .component-title {
111
- font-size: 16px;
112
- font-weight: bold;
113
- margin-bottom: 10px;
114
- }
115
-
116
- .component-desc {
117
- font-size: 14px;
118
- }
119
-
120
- .component-item:hover {
121
- background-color: #e6e6e6;
122
- }
123
99
  </style>
@@ -1,63 +1,62 @@
1
1
  <template>
2
2
  <div class="tree-demo">
3
3
  <h1>树组件示例</h1>
4
-
4
+
5
5
  <h2>基础树</h2>
6
6
  <div class="demo-section">
7
7
  <EbizTree :items="treeData" />
8
8
  </div>
9
-
9
+
10
10
  <h2>可选择的树</h2>
11
11
  <div class="demo-section">
12
- <EbizTree :items="treeData" checkable v-model="checkedValue" @change="handleChange" />
12
+ <EbizTree
13
+ :items="treeData"
14
+ checkable
15
+ v-model="checkedValue"
16
+ @change="handleChange"
17
+ />
13
18
  <div class="result-panel">
14
19
  <p>当前选中值: {{ checkedValue.join(', ') }}</p>
15
20
  </div>
16
21
  </div>
17
-
18
- <h2>带禁用节点的树</h2>
19
- <div class="demo-section">
20
- <EbizTree :items="treeData" checkable :disable-check="disableTreeNode" />
21
- <div class="description">
22
- <p>通过 disableCheck 函数自定义禁用节点,所有值为"1.1"的节点无法被勾选</p>
23
- </div>
24
- </div>
25
-
22
+
26
23
  <h2>带连接线的树</h2>
27
24
  <div class="demo-section">
28
- <EbizTree :items="treeData" line v-model:expanded="expandedNodes" />
29
- </div>
30
-
31
- <h2>启用动画效果的树</h2>
32
- <div class="demo-section">
33
- <EbizTree :items="treeData" line :transition="true" />
34
- <div class="description">
35
- <p>启用节点展开/收起的过渡动画效果</p>
36
- </div>
25
+ <EbizTree
26
+ :items="treeData"
27
+ line
28
+ v-model:expanded="expandedNodes"
29
+ />
37
30
  </div>
38
-
31
+
39
32
  <h2>可拖拽的树</h2>
40
33
  <div class="demo-section">
41
34
  <EbizTree
42
35
  :items="treeData"
43
- draggable
36
+ draggable
44
37
  @drag-drop="handleDragDrop"
45
38
  />
46
39
  </div>
47
40
 
48
41
  <h2>自定义图标的树</h2>
49
42
  <div class="demo-section">
50
- <EbizTree :items="treeData" line>
43
+ <EbizTree
44
+ :items="treeData"
45
+ line
46
+ >
51
47
  <template #icon="{ node }">
52
48
  <span v-if="node.children && node.children.length">📁</span>
53
49
  <span v-else>📄</span>
54
50
  </template>
55
51
  </EbizTree>
56
52
  </div>
57
-
53
+
58
54
  <h2>节点操作</h2>
59
55
  <div class="demo-section">
60
- <EbizTree :items="operableTreeData" line>
56
+ <EbizTree
57
+ :items="operableTreeData"
58
+ line
59
+ >
61
60
  <template #operations="{ node }">
62
61
  <div class="node-operations">
63
62
  <button @click.stop="addChildNode(node)">添加</button>
@@ -115,11 +114,6 @@ const treeData = ref([
115
114
  }
116
115
  ]);
117
116
 
118
- // 禁用特定节点选择的函数
119
- const disableTreeNode = (node) => {
120
- return node.value === '1.1';
121
- };
122
-
123
117
  // 可操作的树数据
124
118
  const operableTreeData = ref([
125
119
  {
@@ -245,11 +239,5 @@ const removeNodeByValue = (nodes, value) => {
245
239
  }
246
240
  }
247
241
  }
248
-
249
- .description {
250
- margin-top: 10px;
251
- color: #666;
252
- font-size: 14px;
253
- }
254
242
  }
255
243
  </style>