@tmagic/form 1.3.0-alpha.1 → 1.3.0-alpha.11
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/dist/tmagic-form.js +913 -917
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +911 -915
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +10 -11
- package/src/Form.vue +14 -2
- package/src/FormDialog.vue +5 -1
- package/src/containers/Col.vue +5 -1
- package/src/containers/Container.vue +5 -1
- package/src/containers/Fieldset.vue +5 -1
- package/src/containers/GroupList.vue +6 -2
- package/src/containers/GroupListItem.vue +7 -7
- package/src/containers/Panel.vue +5 -1
- package/src/containers/Row.vue +5 -1
- package/src/containers/Step.vue +5 -1
- package/src/containers/Table.vue +6 -2
- package/src/containers/Tabs.vue +14 -8
- package/src/fields/Cascader.vue +5 -1
- package/src/fields/Checkbox.vue +5 -1
- package/src/fields/CheckboxGroup.vue +6 -2
- package/src/fields/ColorPicker.vue +5 -1
- package/src/fields/Date.vue +5 -1
- package/src/fields/DateTime.vue +5 -1
- package/src/fields/Daterange.vue +5 -1
- package/src/fields/Display.vue +5 -1
- package/src/fields/DynamicField.vue +5 -1
- package/src/fields/Hidden.vue +5 -1
- package/src/fields/Link.vue +5 -1
- package/src/fields/Number.vue +5 -1
- package/src/fields/RadioGroup.vue +5 -1
- package/src/fields/Select.vue +26 -18
- package/src/fields/SelectOptionGroups.vue +7 -3
- package/src/fields/SelectOptions.vue +5 -1
- package/src/fields/Switch.vue +5 -1
- package/src/fields/Text.vue +5 -1
- package/src/fields/Textarea.vue +5 -1
- package/src/fields/Time.vue +5 -1
- package/src/index.ts +39 -37
- package/src/schema.ts +4 -3
- package/types/Form.vue.d.ts +9 -4
- package/types/FormDialog.vue.d.ts +83 -121
- package/types/containers/Col.vue.d.ts +1 -1
- package/types/containers/Container.vue.d.ts +6 -3
- package/types/containers/Fieldset.vue.d.ts +6 -3
- package/types/containers/GroupList.vue.d.ts +1 -1
- package/types/containers/GroupListItem.vue.d.ts +1 -1
- package/types/containers/Panel.vue.d.ts +3 -3
- package/types/containers/Row.vue.d.ts +1 -1
- package/types/containers/Step.vue.d.ts +6 -3
- package/types/containers/Table.vue.d.ts +9 -6
- package/types/containers/Tabs.vue.d.ts +6 -3
- package/types/fields/Cascader.vue.d.ts +1 -1
- package/types/fields/Checkbox.vue.d.ts +1 -1
- package/types/fields/CheckboxGroup.vue.d.ts +1 -1
- package/types/fields/ColorPicker.vue.d.ts +1 -1
- package/types/fields/Date.vue.d.ts +1 -1
- package/types/fields/DateTime.vue.d.ts +1 -1
- package/types/fields/Daterange.vue.d.ts +1 -1
- package/types/fields/Display.vue.d.ts +2 -2
- package/types/fields/DynamicField.vue.d.ts +1 -10
- package/types/fields/Hidden.vue.d.ts +2 -2
- package/types/fields/Link.vue.d.ts +1 -1
- package/types/fields/Number.vue.d.ts +1 -1
- package/types/fields/RadioGroup.vue.d.ts +1 -1
- package/types/fields/Select.vue.d.ts +1 -1
- package/types/fields/SelectOptionGroups.vue.d.ts +2 -2
- package/types/fields/SelectOptions.vue.d.ts +2 -2
- package/types/fields/Switch.vue.d.ts +1 -1
- package/types/fields/Text.vue.d.ts +1 -1
- package/types/fields/Textarea.vue.d.ts +1 -1
- package/types/fields/Time.vue.d.ts +1 -1
- package/types/index.d.ts +4 -1
- package/types/schema.d.ts +4 -3
package/src/fields/Select.vue
CHANGED
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
</TMagicSelect>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script lang="ts" setup
|
|
28
|
+
<script lang="ts" setup>
|
|
29
29
|
import { inject, onBeforeMount, Ref, ref, watch, watchEffect } from 'vue';
|
|
30
30
|
|
|
31
31
|
import { TMagicSelect } from '@tmagic/design';
|
|
32
|
+
import { getValueByKeyPath } from '@tmagic/utils';
|
|
32
33
|
|
|
33
34
|
import { FormState, SelectConfig, SelectGroupOption, SelectOption } from '../schema';
|
|
34
35
|
import { getConfig } from '../utils/config';
|
|
@@ -37,6 +38,10 @@ import { useAddField } from '../utils/useAddField';
|
|
|
37
38
|
import SelectOptionGroups from './SelectOptionGroups.vue';
|
|
38
39
|
import SelectOptions from './SelectOptions.vue';
|
|
39
40
|
|
|
41
|
+
defineOptions({
|
|
42
|
+
name: 'MFormSelect',
|
|
43
|
+
});
|
|
44
|
+
|
|
40
45
|
const props = defineProps<{
|
|
41
46
|
config: SelectConfig;
|
|
42
47
|
model: any;
|
|
@@ -77,13 +82,17 @@ const equalValue = (value: any, v: any): boolean => {
|
|
|
77
82
|
};
|
|
78
83
|
|
|
79
84
|
const mapOptions = (data: any[]) => {
|
|
80
|
-
const {
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
const {
|
|
86
|
+
option = {
|
|
87
|
+
text: 'text',
|
|
88
|
+
value: 'value',
|
|
89
|
+
},
|
|
90
|
+
} = props.config;
|
|
91
|
+
const { text = 'text', value = 'value' } = option;
|
|
83
92
|
|
|
84
93
|
return data.map((item) => ({
|
|
85
|
-
text: typeof text === 'function' ? text(item) : item[text
|
|
86
|
-
value: typeof value === 'function' ? value(item) : item[value
|
|
94
|
+
text: typeof text === 'function' ? text(item) : item[text],
|
|
95
|
+
value: typeof value === 'function' ? value(item) : item[value],
|
|
87
96
|
}));
|
|
88
97
|
};
|
|
89
98
|
|
|
@@ -98,8 +107,10 @@ const getOptions = async () => {
|
|
|
98
107
|
|
|
99
108
|
let items: SelectOption[] | SelectGroupOption[] = [];
|
|
100
109
|
|
|
101
|
-
const {
|
|
102
|
-
|
|
110
|
+
const { option } = props.config;
|
|
111
|
+
|
|
112
|
+
if (!option) return [];
|
|
113
|
+
|
|
103
114
|
const { root = '', totalKey = 'total' } = option;
|
|
104
115
|
let { body = {}, url } = option;
|
|
105
116
|
|
|
@@ -157,12 +168,9 @@ const getOptions = async () => {
|
|
|
157
168
|
});
|
|
158
169
|
}
|
|
159
170
|
|
|
160
|
-
const optionsData = root
|
|
171
|
+
const optionsData = getValueByKeyPath(root, res);
|
|
161
172
|
|
|
162
|
-
const resTotal = globalThis.parseInt(
|
|
163
|
-
totalKey.split('.').reduce((accumulator, currentValue: any) => accumulator[currentValue], res),
|
|
164
|
-
10,
|
|
165
|
-
);
|
|
173
|
+
const resTotal = globalThis.parseInt(getValueByKeyPath(totalKey, res), 10);
|
|
166
174
|
if (resTotal > 0) {
|
|
167
175
|
total.value = resTotal;
|
|
168
176
|
}
|
|
@@ -222,8 +230,10 @@ const getInitLocalOption = async () => {
|
|
|
222
230
|
const getInitOption = async () => {
|
|
223
231
|
if (!props.model) return [];
|
|
224
232
|
|
|
225
|
-
const {
|
|
226
|
-
|
|
233
|
+
const { option } = props.config;
|
|
234
|
+
|
|
235
|
+
if (!option) return [];
|
|
236
|
+
|
|
227
237
|
const { root = '', initRoot = '' } = option;
|
|
228
238
|
let { initBody = {} } = option;
|
|
229
239
|
|
|
@@ -283,9 +293,7 @@ const getInitOption = async () => {
|
|
|
283
293
|
});
|
|
284
294
|
}
|
|
285
295
|
|
|
286
|
-
let initData = (initRoot || root)
|
|
287
|
-
.split('.')
|
|
288
|
-
.reduce((accumulator, currentValue: any) => accumulator[currentValue], res);
|
|
296
|
+
let initData = getValueByKeyPath(initRoot || root, res);
|
|
289
297
|
if (initData) {
|
|
290
298
|
if (!Array.isArray(initData)) {
|
|
291
299
|
initData = [initData];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<TMagicOptionGroup v-for="(group, index) in options" :key="index" :label="group.label" :disabled="group.disabled">
|
|
3
3
|
<component
|
|
4
4
|
v-for="(item, index) in group.options"
|
|
5
|
-
:is="uiComponent
|
|
5
|
+
:is="uiComponent"
|
|
6
6
|
:key="index"
|
|
7
7
|
:label="item.label || item.text"
|
|
8
8
|
:value="item.value"
|
|
@@ -12,14 +12,18 @@
|
|
|
12
12
|
</TMagicOptionGroup>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script lang="ts" setup
|
|
15
|
+
<script lang="ts" setup>
|
|
16
16
|
import { getConfig, TMagicOptionGroup } from '@tmagic/design';
|
|
17
17
|
|
|
18
18
|
import { SelectGroupOption } from '../schema';
|
|
19
19
|
|
|
20
|
+
defineOptions({
|
|
21
|
+
name: 'MFormSelectOptionGroups',
|
|
22
|
+
});
|
|
23
|
+
|
|
20
24
|
defineProps<{
|
|
21
25
|
options: SelectGroupOption[];
|
|
22
26
|
}>();
|
|
23
27
|
|
|
24
|
-
const uiComponent = getConfig('components').option;
|
|
28
|
+
const uiComponent = getConfig('components')?.option.component || 'el-option';
|
|
25
29
|
</script>
|
|
@@ -8,11 +8,15 @@
|
|
|
8
8
|
></TMagicOption>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
|
-
<script lang="ts" setup
|
|
11
|
+
<script lang="ts" setup>
|
|
12
12
|
import { TMagicOption } from '@tmagic/design';
|
|
13
13
|
|
|
14
14
|
import { SelectOption } from '../schema';
|
|
15
15
|
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'MFormSelectOptions',
|
|
18
|
+
});
|
|
19
|
+
|
|
16
20
|
defineProps<{
|
|
17
21
|
options: SelectOption[];
|
|
18
22
|
valueKey?: string;
|
package/src/fields/Switch.vue
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
></TMagicSwitch>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script lang="ts" setup
|
|
12
|
+
<script lang="ts" setup>
|
|
13
13
|
import { computed } from 'vue';
|
|
14
14
|
|
|
15
15
|
import { TMagicSwitch } from '@tmagic/design';
|
|
@@ -17,6 +17,10 @@ import { TMagicSwitch } from '@tmagic/design';
|
|
|
17
17
|
import { SwitchConfig } from '../schema';
|
|
18
18
|
import { useAddField } from '../utils/useAddField';
|
|
19
19
|
|
|
20
|
+
defineOptions({
|
|
21
|
+
name: 'MFormSwitch',
|
|
22
|
+
});
|
|
23
|
+
|
|
20
24
|
const props = defineProps<{
|
|
21
25
|
config: SwitchConfig;
|
|
22
26
|
model: any;
|
package/src/fields/Text.vue
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</TMagicInput>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<script lang="ts" setup
|
|
26
|
+
<script lang="ts" setup>
|
|
27
27
|
import { inject } from 'vue';
|
|
28
28
|
|
|
29
29
|
import { TMagicButton, TMagicInput } from '@tmagic/design';
|
|
@@ -32,6 +32,10 @@ import { isNumber } from '@tmagic/utils';
|
|
|
32
32
|
import { FormState, TextConfig } from '../schema';
|
|
33
33
|
import { useAddField } from '../utils/useAddField';
|
|
34
34
|
|
|
35
|
+
defineOptions({
|
|
36
|
+
name: 'MFormText',
|
|
37
|
+
});
|
|
38
|
+
|
|
35
39
|
const props = defineProps<{
|
|
36
40
|
config: TextConfig;
|
|
37
41
|
model: any;
|
package/src/fields/Textarea.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</TMagicInput>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script lang="ts" setup
|
|
15
|
+
<script lang="ts" setup>
|
|
16
16
|
import { inject } from 'vue';
|
|
17
17
|
|
|
18
18
|
import { TMagicInput } from '@tmagic/design';
|
|
@@ -20,6 +20,10 @@ import { TMagicInput } from '@tmagic/design';
|
|
|
20
20
|
import { FormState, TextareaConfig } from '../schema';
|
|
21
21
|
import { useAddField } from '../utils/useAddField';
|
|
22
22
|
|
|
23
|
+
defineOptions({
|
|
24
|
+
name: 'MFormTextarea',
|
|
25
|
+
});
|
|
26
|
+
|
|
23
27
|
const props = defineProps<{
|
|
24
28
|
config: TextareaConfig;
|
|
25
29
|
model: any;
|
package/src/fields/Time.vue
CHANGED
|
@@ -10,12 +10,16 @@
|
|
|
10
10
|
></TMagicTimePicker>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<script lang="ts" setup
|
|
13
|
+
<script lang="ts" setup>
|
|
14
14
|
import { TMagicTimePicker } from '@tmagic/design';
|
|
15
15
|
|
|
16
16
|
import { TimeConfig } from '../schema';
|
|
17
17
|
import { useAddField } from '../utils/useAddField';
|
|
18
18
|
|
|
19
|
+
defineOptions({
|
|
20
|
+
name: 'MFormTime',
|
|
21
|
+
});
|
|
22
|
+
|
|
19
23
|
const props = defineProps<{
|
|
20
24
|
config: TimeConfig;
|
|
21
25
|
model: any;
|
package/src/index.ts
CHANGED
|
@@ -82,45 +82,47 @@ export { default as MSelect } from './fields/Select.vue';
|
|
|
82
82
|
export { default as MCascader } from './fields/Cascader.vue';
|
|
83
83
|
export { default as MDynamicField } from './fields/DynamicField.vue';
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
export interface InstallOptions {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
}
|
|
86
88
|
|
|
87
|
-
const
|
|
88
|
-
const option = Object.assign(defaultInstallOpt, opt);
|
|
89
|
+
const defaultInstallOpt: InstallOptions = {};
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
app
|
|
92
|
-
|
|
91
|
+
export default {
|
|
92
|
+
install(app: App, opt: InstallOptions = {}) {
|
|
93
|
+
const option = Object.assign(defaultInstallOpt, opt);
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
app.component('m-form-fieldset', Fieldset);
|
|
98
|
-
app.component('m-form-group-list', GroupList);
|
|
99
|
-
app.component('m-form-panel', Panel);
|
|
100
|
-
app.component('m-form-row', Row);
|
|
101
|
-
app.component('m-form-step', MStep);
|
|
102
|
-
app.component('m-form-table', Table);
|
|
103
|
-
app.component('m-form-tab', Tabs);
|
|
104
|
-
app.component('m-fields-text', Text);
|
|
105
|
-
app.component('m-fields-number', Number);
|
|
106
|
-
app.component('m-fields-textarea', Textarea);
|
|
107
|
-
app.component('m-fields-hidden', Hidden);
|
|
108
|
-
app.component('m-fields-date', Date);
|
|
109
|
-
app.component('m-fields-datetime', DateTime);
|
|
110
|
-
app.component('m-fields-daterange', Daterange);
|
|
111
|
-
app.component('m-fields-time', Time);
|
|
112
|
-
app.component('m-fields-checkbox', Checkbox);
|
|
113
|
-
app.component('m-fields-switch', Switch);
|
|
114
|
-
app.component('m-fields-color-picker', ColorPicker);
|
|
115
|
-
app.component('m-fields-checkbox-group', CheckboxGroup);
|
|
116
|
-
app.component('m-fields-radio-group', RadioGroup);
|
|
117
|
-
app.component('m-fields-display', Display);
|
|
118
|
-
app.component('m-fields-link', Link);
|
|
119
|
-
app.component('m-fields-select', Select);
|
|
120
|
-
app.component('m-fields-cascader', Cascader);
|
|
121
|
-
app.component('m-fields-dynamic-field', DynamicField);
|
|
122
|
-
};
|
|
95
|
+
// eslint-disable-next-line no-param-reassign
|
|
96
|
+
app.config.globalProperties.$MAGIC_FORM = option;
|
|
97
|
+
setConfig(option);
|
|
123
98
|
|
|
124
|
-
|
|
125
|
-
|
|
99
|
+
app.component('m-form', Form);
|
|
100
|
+
app.component('m-form-dialog', FormDialog);
|
|
101
|
+
app.component('m-form-container', Container);
|
|
102
|
+
app.component('m-form-fieldset', Fieldset);
|
|
103
|
+
app.component('m-form-group-list', GroupList);
|
|
104
|
+
app.component('m-form-panel', Panel);
|
|
105
|
+
app.component('m-form-row', Row);
|
|
106
|
+
app.component('m-form-step', MStep);
|
|
107
|
+
app.component('m-form-table', Table);
|
|
108
|
+
app.component('m-form-tab', Tabs);
|
|
109
|
+
app.component('m-fields-text', Text);
|
|
110
|
+
app.component('m-fields-number', Number);
|
|
111
|
+
app.component('m-fields-textarea', Textarea);
|
|
112
|
+
app.component('m-fields-hidden', Hidden);
|
|
113
|
+
app.component('m-fields-date', Date);
|
|
114
|
+
app.component('m-fields-datetime', DateTime);
|
|
115
|
+
app.component('m-fields-daterange', Daterange);
|
|
116
|
+
app.component('m-fields-time', Time);
|
|
117
|
+
app.component('m-fields-checkbox', Checkbox);
|
|
118
|
+
app.component('m-fields-switch', Switch);
|
|
119
|
+
app.component('m-fields-color-picker', ColorPicker);
|
|
120
|
+
app.component('m-fields-checkbox-group', CheckboxGroup);
|
|
121
|
+
app.component('m-fields-radio-group', RadioGroup);
|
|
122
|
+
app.component('m-fields-display', Display);
|
|
123
|
+
app.component('m-fields-link', Link);
|
|
124
|
+
app.component('m-fields-select', Select);
|
|
125
|
+
app.component('m-fields-cascader', Cascader);
|
|
126
|
+
app.component('m-fields-dynamic-field', DynamicField);
|
|
127
|
+
},
|
|
126
128
|
};
|
package/src/schema.ts
CHANGED
|
@@ -435,9 +435,9 @@ export interface SelectConfig extends FormItem, Input {
|
|
|
435
435
|
allowCreate?: boolean;
|
|
436
436
|
filterable?: boolean;
|
|
437
437
|
group?: boolean;
|
|
438
|
-
options
|
|
439
|
-
remote
|
|
440
|
-
option
|
|
438
|
+
options?: SelectConfigOption[] | SelectConfigGroupOption[] | SelectOptionFunction;
|
|
439
|
+
remote?: true;
|
|
440
|
+
option?: {
|
|
441
441
|
url: string | ((mForm: FormState | undefined, data: { model: any; formValue: any }) => string);
|
|
442
442
|
initUrl?: string | ((mForm: FormState | undefined, data: { model: any; formValue: any }) => string);
|
|
443
443
|
method?: 'jsonp' | string;
|
|
@@ -662,6 +662,7 @@ export interface GroupListConfig extends FormItem {
|
|
|
662
662
|
tableItems?: FormConfig;
|
|
663
663
|
titleKey?: string;
|
|
664
664
|
itemExtra?: string | FilterFunction;
|
|
665
|
+
expandAll?: boolean;
|
|
665
666
|
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
|
666
667
|
defaultAdd?: (mForm: FormState | undefined, data: any) => any;
|
|
667
668
|
delete?: (model: any, index: number | string | symbol, values: any) => boolean | boolean;
|
package/types/Form.vue.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
18
18
|
labelPosition?: string | undefined;
|
|
19
19
|
keyProp?: string | undefined;
|
|
20
20
|
popperClass?: string | undefined;
|
|
21
|
+
extendState?: ((state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
21
22
|
}>, {
|
|
22
23
|
config: () => never[];
|
|
23
24
|
initValues: () => {};
|
|
@@ -38,7 +39,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
38
39
|
initialized: import("vue").Ref<boolean>;
|
|
39
40
|
changeHandler: () => void;
|
|
40
41
|
resetForm: () => any;
|
|
41
|
-
submitForm: (native?: boolean) => Promise<any>;
|
|
42
|
+
submitForm: (native?: boolean | undefined) => Promise<any>;
|
|
42
43
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], "change" | "field-input" | "field-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
43
44
|
/** 表单配置 */
|
|
44
45
|
config: FormConfig;
|
|
@@ -58,6 +59,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
58
59
|
labelPosition?: string | undefined;
|
|
59
60
|
keyProp?: string | undefined;
|
|
60
61
|
popperClass?: string | undefined;
|
|
62
|
+
extendState?: ((state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
|
|
61
63
|
}>, {
|
|
62
64
|
config: () => never[];
|
|
63
65
|
initValues: () => {};
|
|
@@ -88,7 +90,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
88
90
|
height: string;
|
|
89
91
|
inline: boolean;
|
|
90
92
|
labelPosition: string;
|
|
91
|
-
}>;
|
|
93
|
+
}, {}>;
|
|
92
94
|
export default _default;
|
|
93
95
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
94
96
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -100,7 +102,10 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
104
|
type __VLS_WithDefaults<P, D> = {
|
|
103
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
105
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
104
106
|
default: D[K];
|
|
105
|
-
} : P[K];
|
|
107
|
+
}> : P[K];
|
|
106
108
|
};
|
|
109
|
+
type __VLS_Prettify<T> = {
|
|
110
|
+
[K in keyof T]: T[K];
|
|
111
|
+
} & {};
|