yuang-framework-ui-common 1.0.116 → 1.0.118

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.
@@ -24,9 +24,11 @@ export function useFrameworkBaseDialog(
24
24
  selectInfoList: (ids: string[]) => Promise<any[]>;
25
25
  /** 配置映射字段 */
26
26
  infoProps?: InfoProps;
27
+ // 允许传入自定义默认参数
28
+ defaultParam?: Record<string, any>;
27
29
  }
28
30
  ) {
29
- const { selectInfo, selectInfoList, infoProps = { value: 'id', label: 'name' } } = options;
31
+ const { selectInfo, selectInfoList, infoProps = { value: 'id', label: 'name' }, defaultParam = {} } = options;
30
32
 
31
33
  // v-model的值
32
34
  // const modelValue = defineModel<string>();
@@ -62,6 +64,8 @@ export function useFrameworkBaseDialog(
62
64
  isDisabled: false,
63
65
  isReadonly: false,
64
66
  profileId: 'dev',
67
+ // 自动注入自定义属性!
68
+ ...defaultParam,
65
69
  ...props.param,
66
70
  initList: initList.value
67
71
  }));
@@ -139,11 +143,10 @@ export function useFrameworkBaseDialog(
139
143
  modelValue.value = selections[0][infoProps.value];
140
144
  inputValue.value = selections[0][infoProps.label];
141
145
  } else {
142
- modelValue.value = '|' + selections.map((s) => s[infoProps.value]).join('|');
146
+ modelValue.value = '|' + selections.map((s) => s[infoProps.value]).join('|') + '|';
143
147
  inputValue.value = selections.map((s) => s[infoProps.label]).join('、');
144
148
  }
145
149
  }
146
-
147
150
  emit('change', selections);
148
151
  hideDialog();
149
152
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.116",
3
+ "version": "1.0.118",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {