yuang-framework-ui-common 1.0.115 → 1.0.117
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.
|
@@ -14,7 +14,7 @@ interface InfoProps {
|
|
|
14
14
|
* - 加载状态
|
|
15
15
|
* - 弹窗开关
|
|
16
16
|
*/
|
|
17
|
-
export function
|
|
17
|
+
export function useFrameworkBaseDialog(
|
|
18
18
|
props: any,
|
|
19
19
|
emit: any,
|
|
20
20
|
options: {
|
|
@@ -24,9 +24,11 @@ export function useBaseDialog(
|
|
|
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 useBaseDialog(
|
|
|
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
|
}));
|