@ebiz/designer-components 0.0.18-beta.26 → 0.0.18-beta.27

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.26",
3
+ "version": "0.0.18-beta.27",
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
  }));
package/src/index.js CHANGED
@@ -50,6 +50,7 @@ import EbizDialog from "./components/TdesignDialog.vue";
50
50
  import EbizTable from "./components/EbizTable.vue";
51
51
  import EbizTableColumn from './components/EbizTableColumn.vue';
52
52
  import EbizTableSort from './components/EbizTableSort.vue';
53
+ import EbizDetailBlock from './components/EbizDetailBlock.vue';
53
54
  import EbizTree from './components/EbizTree.vue';
54
55
  import { MessagePlugin as EbizMessage } from 'tdesign-vue-next';
55
56
 
@@ -153,6 +154,8 @@ export {
153
154
  EbizTableColumn,
154
155
  // 表格排序组件
155
156
  EbizTableSort,
157
+ // 详情块组件
158
+ EbizDetailBlock,
156
159
  // 树组件
157
160
  EbizTree
158
161
  };
@@ -256,6 +256,12 @@ const routes = [
256
256
  component: () => import('../views/TableSortDemo.vue'),
257
257
  meta: { title: 'Ebiz表格排序组件示例' }
258
258
  },
259
+ {
260
+ path: '/ebiz-detail-block',
261
+ name: 'EbizDetailBlock',
262
+ component: () => import('../views/EbizDetailBlockDemo.vue'),
263
+ meta: { title: 'Ebiz详情块组件示例' }
264
+ },
259
265
  {
260
266
  path: '/tree',
261
267
  name: 'Tree',
@@ -55,6 +55,7 @@ export default {
55
55
  { path: '/tdesign-alert', title: 'TDesign提示组件示例' },
56
56
  { path: '/tdesign-dialog', title: 'TDesign对话框组件示例' },
57
57
  { path: '/table-demo', title: 'Ebiz表格组件示例' },
58
+ { path: '/ebiz-detail-block', title: 'Ebiz详情块组件示例' },
58
59
  { path: '/table-column', title: 'Ebiz表格列组件示例' },
59
60
  { path: '/table-sort', title: 'Ebiz表格排序组件示例' },
60
61
  { path: '/tree', title: 'Ebiz树组件示例' }