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

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.28",
3
+ "version": "0.0.18-beta.29",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,7 +41,9 @@ const props = defineProps({
41
41
  */
42
42
  queryParams: {
43
43
  type: Object,
44
- default: () => ({})
44
+ default: () => ({
45
+ name: ''
46
+ })
45
47
  },
46
48
  /**
47
49
  * 是否多选
@@ -62,7 +64,7 @@ const props = defineProps({
62
64
  */
63
65
  clearable: {
64
66
  type: Boolean,
65
- default: false
67
+ default: true
66
68
  },
67
69
  /**
68
70
  * 是否禁用
@@ -140,24 +142,29 @@ const focus = () => {
140
142
 
141
143
  defineExpose({
142
144
  focus,
143
- selectRef
145
+ selectRef,
146
+ options
144
147
  });
145
148
 
146
149
  // 远程搜索处理函数
147
150
  const handleRemoteSearch = async (keyword) => {
148
151
  loading.value = true;
149
- console.log('handleRemoteSearch', keyword);
150
152
  try {
151
153
  const params = {
152
154
  queryParams: {
153
155
  ...queryParams.value,
154
- keyword
156
+ name: keyword
155
157
  }
156
158
  };
157
- const res = await dataService.fetch(params, props.apiConfig);
159
+ const res = await dataService.fetch(params, {
160
+ key: props.apiConfig.key,
161
+ apiId: props.apiConfig.apiId,
162
+ apiType: 'MULTIPLE_DATA_SEARCH'
163
+ });
158
164
  const { labelField, valueField } = props.optionsConfig;
159
165
 
160
166
  options.value = res.data.map(item => ({
167
+ ...item,
161
168
  label: labelField ? item[labelField] : (item.label || item.name),
162
169
  value: valueField ? item[valueField] : (item.value || item.id)
163
170
  }));
@@ -206,6 +213,7 @@ onMounted(async () => {
206
213
  const { labelField, valueField } = props.optionsConfig;
207
214
 
208
215
  options.value = res.data.map(item => ({
216
+ ...item,
209
217
  label: labelField ? item[labelField] : (item.label || item.name),
210
218
  value: valueField ? item[valueField] : (item.value || item.id)
211
219
  }));
@@ -7,6 +7,7 @@
7
7
  :actived="activedModel"
8
8
  :transition="transition"
9
9
  :disable-check="disableCheck"
10
+ :keys="keys"
10
11
  @change="handleChange"
11
12
  @expand="handleExpand"
12
13
  @active="handleActive"
@@ -75,6 +76,15 @@ const props = defineProps({
75
76
  disableCheck: {
76
77
  type: Function,
77
78
  default: null
79
+ },
80
+ // 自定义节点数据中的字段名称
81
+ keys: {
82
+ type: Object,
83
+ default: () => ({
84
+ label: 'label',
85
+ value: 'value',
86
+ children: 'children'
87
+ })
78
88
  }
79
89
  });
80
90
 
@@ -149,10 +149,6 @@ const apiData = ref(null);
149
149
 
150
150
  // 固定的API请求URL和参数
151
151
  const API_URL = '/permissions/tree';
152
- const API_PARAMS = {
153
- type: 'all',
154
- includeDisabled: false
155
- };
156
152
 
157
153
  // 根据数据结构处理树形数据
158
154
  const treeData = computed(() => {
package/src/index.js CHANGED
@@ -1,160 +1,163 @@
1
- import MyComponent from "./components/MyComponent.vue";
2
- import MyTable from "./components/Table.vue";
3
- import EbizFormContainer from "./components/Form.vue";
4
- import EbizButton from "./components/Button.vue";
5
- import EbizTdesignButton from "./components/TdesignButton.vue";
6
- import EbizTdesignIcon from "./components/TdesignIcon.vue";
7
- import EbizTdesignInput from "./components/TdesignInput.vue";
8
- import EbizTdesignSelect from "./components/TdesignSelect.vue";
9
- import EbizTdesignForm from "./components/TdesignForm.vue";
10
- import EbizTdesignFormItem from "./components/TdesignFormItem.vue";
11
- import EbizTdesignDatePicker from "./components/TdesignDatePicker.vue";
12
- import EbizTdesignCard from "./components/TdesignCard.vue";
13
- import EbizTdesignImage from "./components/TdesignImage.vue";
14
- import EbizTdesignImageViewer from "./components/TdesignImageViewer.vue";
15
- import EbizDataContainer from "./components/DataContainer.vue";
16
- import EbizTitle from "./components/EbizTitle.vue";
17
- import EbizDivider from "./components/EbizDivider.vue";
18
- import EbizStatsCard from "./components/EbizStatsCard.vue";
19
- import EbizOkrTree from "./components/EbizOkrTree.vue";
20
- import EbizRemoteSelect from "./components/EbizRemoteSelect.vue";
21
- import EbizMindmap from "./components/EbizMindmap/index.vue";
22
- import EbizRouteBreadcrumb from "./components/EbizRouteBreadcrumb.vue";
23
- import EbizFileUpload from "./components/EbizFileUpload.vue";
24
- import EbizTabHeader from "./components/EbizTabHeader.vue";
25
- import TdesignCalendar from "./components/TdesignCalendar/index.vue";
26
- import TdesignCollapse from "./components/TdesignCollapse.vue";
27
- import TdesignCollapsePanel from "./components/TdesignCollapsePanel.vue";
28
- import EbizTag from "./components/TdesignTag.vue";
29
- import EbizSwiper from "./components/EbizSwiper.vue";
30
- import EbizSwiperItem from "./components/EbizSwiperItem.vue";
31
- import EbizSpace from "./components/EbizSpace.vue";
32
- import EbizPagination from "./components/EbizPagination.vue";
33
- import EbizCheckbox from "./components/EbizCheckbox.vue";
34
- import EbizCheckboxGroup from "./components/EbizCheckboxGroup.vue";
35
- import EbizRadio from "./components/EbizRadio.vue";
36
- import EbizRadioGroup from "./components/EbizRadioGroup.vue";
37
- import EbizSwitch from "./components/EbizSwitch.vue";
38
- import EbizTextarea from "./components/TdesignTextarea.vue";
39
- import EbizUpload from "./components/TdesignUpload.vue";
40
- import EbizGrid from "./components/TdesignGrid.vue";
41
- import EbizCol from "./components/TdesignCol.vue";
42
- import EbizTabs from "./components/EbizTabs.vue";
43
- import EbizTabPanel from "./components/EbizTabPanel.vue";
44
- import EbizStatistic from "./components/EbizStatistic.vue";
45
- import EbizWatermark from "./components/TdesignWatermark.vue";
46
- import EbizAvatar from "./components/EbizAvatar.vue";
47
- import EbizEmployeeInfo from "./components/EbizEmployeeInfo.vue";
48
- import EbizAlert from "./components/TdesignAlert.vue";
49
- import EbizDialog from "./components/TdesignDialog.vue";
50
- import EbizTable from "./components/EbizTable.vue";
51
- import EbizTableColumn from './components/EbizTableColumn.vue';
52
- import EbizTableSort from './components/EbizTableSort.vue';
53
- import EbizTree from './components/EbizTree.vue';
54
- import EbizTreeSelector from './components/EbizTreeSelector.vue';
55
- import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
56
-
57
- // 导入简洁数据服务
58
- import dataService from "./apiService/simpleDataService";
59
-
60
- import "tdesign-vue-next/es/style/index.css";
61
-
62
- // 导入图表样式
63
- import "./assets/styles/charts/main.less";
64
-
65
- // 时间轴组件
66
- import EbizTimeline from "./components/TdesignTimeline.vue";
67
- import {TimelineItem as EbizTimelineItem} from 'tdesign-vue-next';
68
-
69
- // 导出组件
70
- export {
71
- MyComponent,
72
- MyTable,
73
- EbizFormContainer,
74
- EbizButton,
75
- EbizTdesignButton,
76
- EbizTdesignIcon,
77
- EbizTdesignInput,
78
- EbizTdesignSelect,
79
- EbizTdesignForm,
80
- EbizTdesignFormItem,
81
- EbizTdesignDatePicker,
82
- EbizTdesignCard,
83
- EbizTdesignImage,
84
- EbizTdesignImageViewer,
85
- EbizDataContainer,
86
- EbizTitle,
87
- EbizDivider,
88
- EbizStatsCard,
89
- EbizOkrTree,
90
- EbizRemoteSelect,
91
- EbizRouteBreadcrumb,
92
- EbizTabHeader,
93
- // 思维导图
94
- EbizMindmap,
95
- // 文件上传组件
96
- EbizFileUpload,
97
- // 日历组件
98
- TdesignCalendar,
99
- // 折叠面板组件
100
- TdesignCollapse,
101
- TdesignCollapsePanel,
102
- // 标签组件
103
- EbizTag,
104
- // 轮播框组件
105
- EbizSwiper,
106
- // 轮播框子项组件
107
- EbizSwiperItem,
108
- // 间距组件
109
- EbizSpace,
110
- // 分页组件
111
- EbizPagination,
112
- // 多选框组件
113
- EbizCheckbox,
114
- // 多选框组组件
115
- EbizCheckboxGroup,
116
- // 数据服务
117
- dataService,
118
- // 新增 EbizRadio 和 EbizRadioGroup
119
- EbizRadio,
120
- EbizRadioGroup,
121
- // 开关组件
122
- EbizSwitch,
123
- // 多行文本框组件
124
- EbizTextarea,
125
- // TDesign上传组件
126
- EbizUpload,
127
- // 栅格布局组件
128
- EbizGrid,
129
- // 栅格列组件
130
- EbizCol,
131
- // 选项卡组件
132
- EbizTabs,
133
- // 选项卡面板组件
134
- EbizTabPanel,
135
- // 统计数值组件
136
- EbizStatistic,
137
- // 消息插件
138
- EbizMessage,
139
- // 时间轴组件
140
- EbizTimeline,
141
- EbizTimelineItem,
142
- // 水印组件
143
- EbizWatermark,
144
- // 头像组件
145
- EbizAvatar,
146
- // 员工信息组件
147
- EbizEmployeeInfo,
148
- // 提示组件
149
- EbizAlert,
150
- // 对话框组件
151
- EbizDialog,
152
- // 表格组件
153
- EbizTable,
154
- EbizTableColumn,
155
- // 表格排序组件
156
- EbizTableSort,
157
- // 树组件
158
- EbizTree,
159
- EbizTreeSelector
160
- };
1
+ import MyComponent from "./components/MyComponent.vue";
2
+ import MyTable from "./components/Table.vue";
3
+ import EbizFormContainer from "./components/Form.vue";
4
+ import EbizButton from "./components/Button.vue";
5
+ import EbizTdesignButton from "./components/TdesignButton.vue";
6
+ import EbizTdesignIcon from "./components/TdesignIcon.vue";
7
+ import EbizTdesignInput from "./components/TdesignInput.vue";
8
+ import EbizTdesignSelect from "./components/TdesignSelect.vue";
9
+ import EbizTdesignForm from "./components/TdesignForm.vue";
10
+ import EbizTdesignFormItem from "./components/TdesignFormItem.vue";
11
+ import EbizTdesignDatePicker from "./components/TdesignDatePicker.vue";
12
+ import EbizTdesignCard from "./components/TdesignCard.vue";
13
+ import EbizTdesignImage from "./components/TdesignImage.vue";
14
+ import EbizTdesignImageViewer from "./components/TdesignImageViewer.vue";
15
+ import EbizDataContainer from "./components/DataContainer.vue";
16
+ import EbizTitle from "./components/EbizTitle.vue";
17
+ import EbizDivider from "./components/EbizDivider.vue";
18
+ import EbizStatsCard from "./components/EbizStatsCard.vue";
19
+ import EbizOkrTree from "./components/EbizOkrTree.vue";
20
+ import EbizRemoteSelect from "./components/EbizRemoteSelect.vue";
21
+ import EbizMindmap from "./components/EbizMindmap/index.vue";
22
+ import EbizRouteBreadcrumb from "./components/EbizRouteBreadcrumb.vue";
23
+ import EbizFileUpload from "./components/EbizFileUpload.vue";
24
+ import EbizTabHeader from "./components/EbizTabHeader.vue";
25
+ import TdesignCalendar from "./components/TdesignCalendar/index.vue";
26
+ import TdesignCollapse from "./components/TdesignCollapse.vue";
27
+ import TdesignCollapsePanel from "./components/TdesignCollapsePanel.vue";
28
+ import EbizTag from "./components/TdesignTag.vue";
29
+ import EbizSwiper from "./components/EbizSwiper.vue";
30
+ import EbizSwiperItem from "./components/EbizSwiperItem.vue";
31
+ import EbizSpace from "./components/EbizSpace.vue";
32
+ import EbizPagination from "./components/EbizPagination.vue";
33
+ import EbizCheckbox from "./components/EbizCheckbox.vue";
34
+ import EbizCheckboxGroup from "./components/EbizCheckboxGroup.vue";
35
+ import EbizRadio from "./components/EbizRadio.vue";
36
+ import EbizRadioGroup from "./components/EbizRadioGroup.vue";
37
+ import EbizSwitch from "./components/EbizSwitch.vue";
38
+ import EbizTextarea from "./components/TdesignTextarea.vue";
39
+ import EbizUpload from "./components/TdesignUpload.vue";
40
+ import EbizGrid from "./components/TdesignGrid.vue";
41
+ import EbizCol from "./components/TdesignCol.vue";
42
+ import EbizTabs from "./components/EbizTabs.vue";
43
+ import EbizTabPanel from "./components/EbizTabPanel.vue";
44
+ import EbizStatistic from "./components/EbizStatistic.vue";
45
+ import EbizWatermark from "./components/TdesignWatermark.vue";
46
+ import EbizAvatar from "./components/EbizAvatar.vue";
47
+ import EbizEmployeeInfo from "./components/EbizEmployeeInfo.vue";
48
+ import EbizAlert from "./components/TdesignAlert.vue";
49
+ import EbizDialog from "./components/TdesignDialog.vue";
50
+ import EbizTable from "./components/EbizTable.vue";
51
+ import EbizTableColumn from './components/EbizTableColumn.vue';
52
+ import EbizTableSort from './components/EbizTableSort.vue';
53
+ import EbizDetailBlock from './components/EbizDetailBlock.vue';
54
+ import EbizTree from './components/EbizTree.vue';
55
+ import EbizTreeSelector from './components/EbizTreeSelector.vue';
56
+ import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
57
+
58
+ // 导入简洁数据服务
59
+ import dataService from "./apiService/simpleDataService";
60
+
61
+ import "tdesign-vue-next/es/style/index.css";
62
+
63
+ // 导入图表样式
64
+ import "./assets/styles/charts/main.less";
65
+
66
+ // 时间轴组件
67
+ import EbizTimeline from "./components/TdesignTimeline.vue";
68
+ import {TimelineItem as EbizTimelineItem} from 'tdesign-vue-next';
69
+
70
+ // 导出组件
71
+ export {
72
+ MyComponent,
73
+ MyTable,
74
+ EbizFormContainer,
75
+ EbizButton,
76
+ EbizTdesignButton,
77
+ EbizTdesignIcon,
78
+ EbizTdesignInput,
79
+ EbizTdesignSelect,
80
+ EbizTdesignForm,
81
+ EbizTdesignFormItem,
82
+ EbizTdesignDatePicker,
83
+ EbizTdesignCard,
84
+ EbizTdesignImage,
85
+ EbizTdesignImageViewer,
86
+ EbizDataContainer,
87
+ EbizTitle,
88
+ EbizDivider,
89
+ EbizStatsCard,
90
+ EbizOkrTree,
91
+ EbizRemoteSelect,
92
+ EbizRouteBreadcrumb,
93
+ EbizTabHeader,
94
+ // 思维导图
95
+ EbizMindmap,
96
+ // 文件上传组件
97
+ EbizFileUpload,
98
+ // 日历组件
99
+ TdesignCalendar,
100
+ // 折叠面板组件
101
+ TdesignCollapse,
102
+ TdesignCollapsePanel,
103
+ // 标签组件
104
+ EbizTag,
105
+ // 轮播框组件
106
+ EbizSwiper,
107
+ // 轮播框子项组件
108
+ EbizSwiperItem,
109
+ // 间距组件
110
+ EbizSpace,
111
+ // 分页组件
112
+ EbizPagination,
113
+ // 多选框组件
114
+ EbizCheckbox,
115
+ // 多选框组组件
116
+ EbizCheckboxGroup,
117
+ // 数据服务
118
+ dataService,
119
+ // 新增 EbizRadio 和 EbizRadioGroup
120
+ EbizRadio,
121
+ EbizRadioGroup,
122
+ // 开关组件
123
+ EbizSwitch,
124
+ // 多行文本框组件
125
+ EbizTextarea,
126
+ // TDesign上传组件
127
+ EbizUpload,
128
+ // 栅格布局组件
129
+ EbizGrid,
130
+ // 栅格列组件
131
+ EbizCol,
132
+ // 选项卡组件
133
+ EbizTabs,
134
+ // 选项卡面板组件
135
+ EbizTabPanel,
136
+ // 统计数值组件
137
+ EbizStatistic,
138
+ // 消息插件
139
+ EbizMessage,
140
+ // 时间轴组件
141
+ EbizTimeline,
142
+ EbizTimelineItem,
143
+ // 水印组件
144
+ EbizWatermark,
145
+ // 头像组件
146
+ EbizAvatar,
147
+ // 员工信息组件
148
+ EbizEmployeeInfo,
149
+ // 提示组件
150
+ EbizAlert,
151
+ // 对话框组件
152
+ EbizDialog,
153
+ // 表格组件
154
+ EbizTable,
155
+ EbizTableColumn,
156
+ // 表格排序组件
157
+ EbizTableSort,
158
+ // 详情块组件
159
+ EbizDetailBlock,
160
+ // 树组件
161
+ EbizTree,
162
+ EbizTreeSelector
163
+ };