pro-design-vue 1.1.0 → 1.1.2
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/index.full.js +480 -400
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +478 -398
- package/es/components/config-provider/src/config-provider-container.vue2.mjs +1 -0
- package/es/components/config-provider/src/config-provider-container.vue2.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider.vue2.mjs +37 -34
- package/es/components/config-provider/src/config-provider.vue2.mjs.map +1 -1
- package/es/components/config-provider/src/intl.mjs +4 -3
- package/es/components/config-provider/src/intl.mjs.map +1 -1
- package/es/components/config-provider/src/typing.d.ts +3 -0
- package/es/components/config-provider/src/useIntl.mjs.map +1 -1
- package/es/components/config-provider/src/useTokens.d.ts +0 -3
- package/es/components/config-provider/src/useTokens.mjs.map +1 -1
- package/es/components/form/src/Form.d.ts +8 -2
- package/es/components/form/src/base/BaseForm.d.ts +8 -2
- package/es/components/form/src/base/BaseForm.mjs +5 -1
- package/es/components/form/src/base/BaseForm.mjs.map +1 -1
- package/es/components/form/src/base/StepForm.d.ts +8 -2
- package/es/components/form/src/components/FormItem.mjs +3 -1
- package/es/components/form/src/components/FormItem.mjs.map +1 -1
- package/es/components/form/src/context/FormContext.d.ts +2 -1
- package/es/components/form/src/context/FormContext.mjs.map +1 -1
- package/es/components/form/src/fields/FieldCascader.d.ts +6 -0
- package/es/components/form/src/fields/FieldCheckbox.d.ts +6 -0
- package/es/components/form/src/fields/FieldCheckboxGroup.d.ts +6 -0
- package/es/components/form/src/fields/FieldDatePicker.d.ts +6 -0
- package/es/components/form/src/fields/FieldDateRangePicker.d.ts +6 -0
- package/es/components/form/src/fields/FieldDigit.d.ts +6 -0
- package/es/components/form/src/fields/FieldDigitRange.d.ts +6 -0
- package/es/components/form/src/fields/FieldPassword.d.ts +6 -0
- package/es/components/form/src/fields/FieldRadioGroup.d.ts +6 -0
- package/es/components/form/src/fields/FieldRate.d.ts +6 -0
- package/es/components/form/src/fields/FieldSelect.d.ts +6 -0
- package/es/components/form/src/fields/FieldSlider.d.ts +6 -0
- package/es/components/form/src/fields/FieldSwitch.d.ts +6 -0
- package/es/components/form/src/fields/FieldText.d.ts +6 -0
- package/es/components/form/src/fields/FieldText.mjs +2 -1
- package/es/components/form/src/fields/FieldText.mjs.map +1 -1
- package/es/components/form/src/fields/FieldTextarea.d.ts +6 -0
- package/es/components/form/src/fields/FieldTimePicker.d.ts +6 -0
- package/es/components/form/src/fields/FieldTimeRangePicker.d.ts +6 -0
- package/es/components/form/src/fields/FieldTreeSelect.d.ts +6 -0
- package/es/components/form/src/fields/FieldUploadButton.d.ts +6 -0
- package/es/components/form/src/fields/FieldUploadDragger.d.ts +6 -0
- package/es/components/form/src/fields/FieldUploadPicture.d.ts +6 -0
- package/es/components/form/src/fields/FieldUploadPictureList.d.ts +6 -0
- package/es/components/form/src/layouts/DrawerForm.d.ts +8 -2
- package/es/components/form/src/layouts/ModalForm.d.ts +8 -2
- package/es/components/form/src/layouts/QueryFilter.d.ts +8 -2
- package/es/components/form/src/layouts/QueryFilter.mjs +50 -45
- package/es/components/form/src/layouts/QueryFilter.mjs.map +1 -1
- package/es/components/form/src/layouts/StepsForm.d.ts +8 -2
- package/es/components/form/src/layouts/StepsForm.mjs +27 -17
- package/es/components/form/src/layouts/StepsForm.mjs.map +1 -1
- package/es/components/form/src/props.d.ts +24 -6
- package/es/components/form/src/props.mjs +7 -1
- package/es/components/form/src/props.mjs.map +1 -1
- package/es/components/table/src/components/InteralTable.vue.mjs.map +1 -1
- package/es/components/table/src/components/InteralTable.vue2.mjs +2 -1
- package/es/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
- package/es/constants/globals.d.ts +4 -0
- package/es/constants/globals.mjs +2 -1
- package/es/constants/globals.mjs.map +1 -1
- package/es/constants/index.mjs +1 -1
- package/es/index.d.ts +67 -15
- package/es/index.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/config-provider/src/config-provider-container.vue2.js +1 -0
- package/lib/components/config-provider/src/config-provider-container.vue2.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.vue2.js +36 -33
- package/lib/components/config-provider/src/config-provider.vue2.js.map +1 -1
- package/lib/components/config-provider/src/intl.js +4 -3
- package/lib/components/config-provider/src/intl.js.map +1 -1
- package/lib/components/config-provider/src/typing.d.ts +3 -0
- package/lib/components/config-provider/src/useIntl.js.map +1 -1
- package/lib/components/config-provider/src/useTokens.d.ts +0 -3
- package/lib/components/config-provider/src/useTokens.js.map +1 -1
- package/lib/components/form/src/Form.d.ts +8 -2
- package/lib/components/form/src/base/BaseForm.d.ts +8 -2
- package/lib/components/form/src/base/BaseForm.js +5 -1
- package/lib/components/form/src/base/BaseForm.js.map +1 -1
- package/lib/components/form/src/base/StepForm.d.ts +8 -2
- package/lib/components/form/src/components/FormItem.js +3 -1
- package/lib/components/form/src/components/FormItem.js.map +1 -1
- package/lib/components/form/src/context/FormContext.d.ts +2 -1
- package/lib/components/form/src/context/FormContext.js.map +1 -1
- package/lib/components/form/src/fields/FieldCascader.d.ts +6 -0
- package/lib/components/form/src/fields/FieldCheckbox.d.ts +6 -0
- package/lib/components/form/src/fields/FieldCheckboxGroup.d.ts +6 -0
- package/lib/components/form/src/fields/FieldDatePicker.d.ts +6 -0
- package/lib/components/form/src/fields/FieldDateRangePicker.d.ts +6 -0
- package/lib/components/form/src/fields/FieldDigit.d.ts +6 -0
- package/lib/components/form/src/fields/FieldDigitRange.d.ts +6 -0
- package/lib/components/form/src/fields/FieldPassword.d.ts +6 -0
- package/lib/components/form/src/fields/FieldRadioGroup.d.ts +6 -0
- package/lib/components/form/src/fields/FieldRate.d.ts +6 -0
- package/lib/components/form/src/fields/FieldSelect.d.ts +6 -0
- package/lib/components/form/src/fields/FieldSlider.d.ts +6 -0
- package/lib/components/form/src/fields/FieldSwitch.d.ts +6 -0
- package/lib/components/form/src/fields/FieldText.d.ts +6 -0
- package/lib/components/form/src/fields/FieldText.js +2 -1
- package/lib/components/form/src/fields/FieldText.js.map +1 -1
- package/lib/components/form/src/fields/FieldTextarea.d.ts +6 -0
- package/lib/components/form/src/fields/FieldTimePicker.d.ts +6 -0
- package/lib/components/form/src/fields/FieldTimeRangePicker.d.ts +6 -0
- package/lib/components/form/src/fields/FieldTreeSelect.d.ts +6 -0
- package/lib/components/form/src/fields/FieldUploadButton.d.ts +6 -0
- package/lib/components/form/src/fields/FieldUploadDragger.d.ts +6 -0
- package/lib/components/form/src/fields/FieldUploadPicture.d.ts +6 -0
- package/lib/components/form/src/fields/FieldUploadPictureList.d.ts +6 -0
- package/lib/components/form/src/layouts/DrawerForm.d.ts +8 -2
- package/lib/components/form/src/layouts/ModalForm.d.ts +8 -2
- package/lib/components/form/src/layouts/QueryFilter.d.ts +8 -2
- package/lib/components/form/src/layouts/QueryFilter.js +50 -45
- package/lib/components/form/src/layouts/QueryFilter.js.map +1 -1
- package/lib/components/form/src/layouts/StepsForm.d.ts +8 -2
- package/lib/components/form/src/layouts/StepsForm.js +26 -16
- package/lib/components/form/src/layouts/StepsForm.js.map +1 -1
- package/lib/components/form/src/props.d.ts +24 -6
- package/lib/components/form/src/props.js +7 -1
- package/lib/components/form/src/props.js.map +1 -1
- package/lib/components/table/src/components/InteralTable.vue.js.map +1 -1
- package/lib/components/table/src/components/InteralTable.vue2.js +2 -1
- package/lib/components/table/src/components/InteralTable.vue2.js.map +1 -1
- package/lib/constants/globals.d.ts +4 -0
- package/lib/constants/globals.js +2 -0
- package/lib/constants/globals.js.map +1 -1
- package/lib/constants/index.js +1 -0
- package/lib/constants/index.js.map +1 -1
- package/lib/index.d.ts +67 -15
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
|
2
|
-
import type { ProFormPropsType, ProFormItemType, Entity, SpanConfig, ProFormActionType } from './type';
|
2
|
+
import type { ProFormPropsType, ProFormItemType, Entity, SpanConfig, ProFormActionType, KeyboardEventHandler } from './type';
|
3
3
|
import type { StepsProps, StepProps, FormProps } from 'ant-design-vue';
|
4
4
|
export declare const antFormProps: () => {
|
5
5
|
layout: {
|
@@ -80,6 +80,9 @@ export declare const commonFieldProps: () => {
|
|
80
80
|
onChange: {
|
81
81
|
type: PropType<ProFormItemType["onChange"]>;
|
82
82
|
};
|
83
|
+
onPressEnter: {
|
84
|
+
type: PropType<KeyboardEventHandler>;
|
85
|
+
};
|
83
86
|
};
|
84
87
|
export declare const baseFormProps: () => {
|
85
88
|
loading: {
|
@@ -104,7 +107,10 @@ export declare const baseFormProps: () => {
|
|
104
107
|
};
|
105
108
|
readonly: BooleanConstructor;
|
106
109
|
grid: BooleanConstructor;
|
107
|
-
isKeyPressSubmit:
|
110
|
+
isKeyPressSubmit: {
|
111
|
+
type: BooleanConstructor;
|
112
|
+
default: undefined;
|
113
|
+
};
|
108
114
|
formKey: StringConstructor;
|
109
115
|
theme: {
|
110
116
|
type: PropType<ProFormPropsType["theme"]>;
|
@@ -259,7 +265,10 @@ export declare const drawerOrModalFormProps: () => {
|
|
259
265
|
};
|
260
266
|
readonly: BooleanConstructor;
|
261
267
|
grid: BooleanConstructor;
|
262
|
-
isKeyPressSubmit:
|
268
|
+
isKeyPressSubmit: {
|
269
|
+
type: BooleanConstructor;
|
270
|
+
default: undefined;
|
271
|
+
};
|
263
272
|
formKey: StringConstructor;
|
264
273
|
theme: {
|
265
274
|
type: PropType<ProFormPropsType["theme"]>;
|
@@ -424,7 +433,10 @@ export declare const queryFilterProps: () => {
|
|
424
433
|
};
|
425
434
|
readonly: BooleanConstructor;
|
426
435
|
grid: BooleanConstructor;
|
427
|
-
isKeyPressSubmit:
|
436
|
+
isKeyPressSubmit: {
|
437
|
+
type: BooleanConstructor;
|
438
|
+
default: undefined;
|
439
|
+
};
|
428
440
|
formKey: StringConstructor;
|
429
441
|
theme: {
|
430
442
|
type: PropType<ProFormPropsType["theme"]>;
|
@@ -575,7 +587,10 @@ export declare const stepsFormProps: () => {
|
|
575
587
|
};
|
576
588
|
readonly: BooleanConstructor;
|
577
589
|
grid: BooleanConstructor;
|
578
|
-
isKeyPressSubmit:
|
590
|
+
isKeyPressSubmit: {
|
591
|
+
type: BooleanConstructor;
|
592
|
+
default: undefined;
|
593
|
+
};
|
579
594
|
formKey: StringConstructor;
|
580
595
|
theme: {
|
581
596
|
type: PropType<ProFormPropsType["theme"]>;
|
@@ -723,7 +738,10 @@ export declare const formProps: () => {
|
|
723
738
|
};
|
724
739
|
readonly: BooleanConstructor;
|
725
740
|
grid: BooleanConstructor;
|
726
|
-
isKeyPressSubmit:
|
741
|
+
isKeyPressSubmit: {
|
742
|
+
type: BooleanConstructor;
|
743
|
+
default: undefined;
|
744
|
+
};
|
727
745
|
formKey: StringConstructor;
|
728
746
|
theme: {
|
729
747
|
type: PropType<ProFormPropsType["theme"]>;
|
@@ -78,6 +78,9 @@ const commonFieldProps = () => ({
|
|
78
78
|
},
|
79
79
|
onChange: {
|
80
80
|
type: Function
|
81
|
+
},
|
82
|
+
onPressEnter: {
|
83
|
+
type: Function
|
81
84
|
}
|
82
85
|
});
|
83
86
|
const baseFormProps = () => ({
|
@@ -102,7 +105,10 @@ const baseFormProps = () => ({
|
|
102
105
|
omitNil: { type: Boolean, default: true },
|
103
106
|
readonly: Boolean,
|
104
107
|
grid: Boolean,
|
105
|
-
isKeyPressSubmit:
|
108
|
+
isKeyPressSubmit: {
|
109
|
+
type: Boolean,
|
110
|
+
default: void 0
|
111
|
+
},
|
106
112
|
formKey: String,
|
107
113
|
theme: {
|
108
114
|
type: String,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../../../packages/components/form/src/props.ts"],"sourcesContent":["/*\n * @Author: shen\n * @Date: 2023-07-30 08:16:14\n * @LastEditors: shen\n * @LastEditTime: 2025-09-09 16:58:33\n * @Description:\n */\nimport type { CSSProperties, ExtractPropTypes, PropType } from 'vue'\nimport type {\n ProFormPropsType,\n ProFormItemType,\n Entity,\n SpanConfig,\n ProFormActionType,\n} from './type'\n\nimport type { StepsProps, StepProps, FormProps } from 'ant-design-vue'\n\nexport const antFormProps = () => ({\n layout: {\n type: String as PropType<FormProps['layout']>,\n default: 'horizontal',\n },\n labelCol: {\n type: Object as PropType<FormProps['labelCol']>,\n },\n wrapperCol: {\n type: Object as PropType<FormProps['wrapperCol']>,\n },\n colon: {\n type: Boolean as PropType<FormProps['colon']>,\n default: true,\n },\n requiredMark: {\n type: [Boolean, String] as PropType<FormProps['requiredMark']>,\n default: true,\n },\n labelAlign: {\n type: String as PropType<FormProps['labelAlign']>,\n default: 'right',\n },\n labelWrap: Boolean as PropType<FormProps['labelWrap']>,\n disabled: {\n type: Boolean as PropType<FormProps['disabled']>,\n default: false,\n },\n prefixCls: String as PropType<FormProps['prefixCls']>,\n validateMessages: Object as PropType<FormProps['validateMessages']>,\n validateTrigger: {\n type: [String, Array] as PropType<FormProps['validateTrigger']>,\n default: 'change',\n },\n validateOnRuleChange: {\n type: Boolean as PropType<FormProps['validateOnRuleChange']>,\n default: true,\n },\n scrollToFirstError: {\n type: [Boolean, Object] as PropType<FormProps['scrollToFirstError']>,\n default: false,\n },\n name: String,\n})\n\nexport const commonFieldProps = () => ({\n value: {\n type: [String, Array, Number, Object, Boolean] as PropType<any>,\n },\n readonly: {\n type: Boolean,\n default: undefined,\n },\n readonlyProps: {\n type: Object as PropType<ProFormItemType['readonlyProps']>,\n default: undefined,\n },\n valueEnum: {\n type: [Function, Object] as PropType<ProFormItemType['valueEnum']>,\n default: undefined,\n },\n options: {\n type: [Array, Function] as PropType<ProFormItemType['options']>,\n default: undefined,\n },\n request: {\n type: Function as PropType<ProFormItemType['request']>,\n default: undefined,\n },\n params: {\n type: [Function, Object] as PropType<ProFormItemType['params']>,\n default: undefined,\n },\n dependencies: {\n type: Array as PropType<ProFormItemType['dependencies']>,\n default: undefined,\n },\n onChange: {\n type: Function as PropType<ProFormItemType['onChange']>,\n },\n})\n\nexport const baseFormProps = () => ({\n ...antFormProps(),\n // name: String,\n loading: {\n type: Boolean,\n default: undefined,\n },\n showLoading: {\n type: Boolean,\n default: true,\n },\n submitOnLoading: {\n type: Boolean,\n default: true,\n },\n gridSubmitter: {\n type: Boolean,\n default: false,\n },\n omitNil: { type: Boolean, default: true },\n readonly: Boolean,\n grid: Boolean,\n isKeyPressSubmit: Boolean,\n formKey: String,\n theme: {\n type: String as PropType<ProFormPropsType['theme']>,\n default: 'custom',\n },\n customUi: {\n type: Boolean,\n default: true,\n },\n initialValues: {\n type: Object as PropType<ProFormPropsType['initialValues']>,\n },\n readonlyProps: {\n type: Object as PropType<ProFormPropsType['readonlyProps']>,\n },\n colProps: {\n type: Object as PropType<ProFormPropsType['colProps']>,\n },\n rowProps: {\n type: Object as PropType<ProFormPropsType['rowProps']>,\n },\n dateFormatter: {\n type: [String, Function, Boolean] as PropType<ProFormPropsType['dateFormatter']>,\n default: 'string',\n },\n params: {\n type: Object as PropType<ProFormPropsType['params']>,\n },\n items: {\n type: Array as PropType<ProFormItemType<Entity, any>[]>,\n },\n request: {\n type: Function as PropType<ProFormPropsType['request']>,\n },\n requestAbort: {\n type: Boolean,\n },\n submitter: {\n type: [Object, Boolean] as PropType<ProFormPropsType['submitter']>,\n default: undefined,\n },\n onReset: {\n type: Function as PropType<ProFormPropsType['onReset']>,\n },\n onFinish: {\n type: Function as PropType<ProFormPropsType['onFinish']>,\n },\n onFinishFailed: {\n type: Function as PropType<ProFormPropsType['onFinishFailed']>,\n },\n onLoadingChange: {\n type: Function as PropType<ProFormPropsType['onLoadingChange']>,\n },\n onValuesChange: {\n type: Function as PropType<ProFormPropsType['onValuesChange']>,\n },\n onInit: {\n type: Function as PropType<(values: any, formAction: ProFormActionType) => void>,\n default: undefined,\n },\n})\n\nexport const drawerOrModalFormProps = () => ({\n ...baseFormProps(),\n submitTimeout: {\n type: Number,\n default: undefined,\n },\n title: {\n type: String,\n default: undefined,\n },\n width: {\n type: [String, Number] as PropType<string | number>,\n default: 800,\n },\n open: {\n type: Boolean,\n default: undefined,\n },\n closeOnFinish: {\n type: Boolean,\n default: true,\n },\n confirmOnValuesChange: {\n type: Boolean,\n default: true,\n },\n onOpenChange: {\n type: Function as PropType<(open: boolean) => void>,\n default: undefined,\n },\n})\n\nexport const queryFilterProps = () => ({\n ...baseFormProps(),\n preserve: {\n type: Boolean,\n default: true,\n },\n defaultCollapsed: {\n type: Boolean,\n default: true,\n },\n collapsed: {\n type: Boolean as PropType<boolean | undefined>,\n default: undefined,\n },\n defaultColsNumber: Number,\n defaultFormItemsNumber: Number,\n labelWidth: {\n type: [String, Number] as PropType<number | 'auto'>,\n default: '80',\n },\n searchText: String,\n resetText: String,\n searchGutter: {\n type: Number,\n default: 24,\n },\n span: {\n type: [Number, Object] as PropType<SpanConfig>,\n },\n // span: definePropType<SpanConfig>([Number, String]),\n showHiddenNum: Boolean,\n ignoreRules: Boolean,\n resetOnSubmit: Boolean,\n onCollapse: {\n type: Function as PropType<(val: boolean) => void>,\n default: undefined,\n },\n onResize: {\n type: Function as PropType<(width: number, height: number) => void>,\n default: undefined,\n },\n})\nexport const stepsFormProps = () => ({\n ...baseFormProps(),\n current: {\n type: Number,\n default: undefined,\n },\n steps: {\n type: Array as PropType<(StepProps & { formProps?: BaseFormProps })[]>,\n default: () => [],\n },\n items: {\n type: Array as PropType<ProFormItemType<Entity, any>[][]>,\n default: () => [],\n },\n stepsProps: {\n type: Object as PropType<StepsProps>,\n },\n containerStyle: {\n type: Object as PropType<CSSProperties>,\n },\n onCurrentChange: {\n type: Function as PropType<(current: number) => void>,\n default: undefined,\n },\n})\n\nexport const formProps = () => ({\n ...baseFormProps(),\n ...drawerOrModalFormProps(),\n ...queryFilterProps(),\n ...stepsFormProps(),\n items: {\n type: Array as PropType<Array<ProFormItemType<Entity, any>[]> | ProFormItemType<Entity, any>[]>,\n default: () => [],\n },\n})\n\nexport type BaseFormProps = Partial<ExtractPropTypes<ReturnType<typeof baseFormProps>>>\n\nexport type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof formProps>>>\nexport type ProQueryFilterProps = Partial<ExtractPropTypes<ReturnType<typeof queryFilterProps>>>\nexport type ProStepsFormProps = Partial<ExtractPropTypes<ReturnType<typeof stepsFormProps>>>\nexport type ProDrawerOrModalFormProps = Partial<\n ExtractPropTypes<ReturnType<typeof drawerOrModalFormProps>>\n>\n"],"names":[],"mappings":";;AAkBO,MAAM,eAAe,OAAO;AAAA,EACjC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,CAAC,OAAA,EAAS,MAAM,CAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,SAAA,EAAW,OAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,SAAA,EAAW,MAAA;AAAA,EACX,gBAAA,EAAkB,MAAA;AAAA,EAClB,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,CAAC,MAAA,EAAQ,KAAK,CAAA;AAAA,IACpB,OAAA,EAA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ACL,IAAA,EAAM,KAAA;AAAA,IACN,OAAA,EAAS,MAAM;AAAC,GAClB;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM;AAAA,GACR;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,QAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAA;AAEO,MAAM,YAAY,OAAO;AAAA,EAC9B,GAAG,aAAA,EAAc;AAAA,EACjB,GAAG,sBAAA,EAAuB;AAAA,EAC1B,GAAG,gBAAA,EAAiB;AAAA,EACpB,GAAG,cAAA,EAAe;AAAA,EAClB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,KAAA;AAAA,IACN,OAAA,EAAS,MAAM;AAAC;AAEpB,CAAA;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../../../packages/components/form/src/props.ts"],"sourcesContent":["/*\n * @Author: shen\n * @Date: 2023-07-30 08:16:14\n * @LastEditors: shen\n * @LastEditTime: 2025-10-10 10:26:27\n * @Description:\n */\nimport type { CSSProperties, ExtractPropTypes, PropType } from 'vue'\nimport type {\n ProFormPropsType,\n ProFormItemType,\n Entity,\n SpanConfig,\n ProFormActionType,\n KeyboardEventHandler,\n} from './type'\n\nimport type { StepsProps, StepProps, FormProps } from 'ant-design-vue'\n\nexport const antFormProps = () => ({\n layout: {\n type: String as PropType<FormProps['layout']>,\n default: 'horizontal',\n },\n labelCol: {\n type: Object as PropType<FormProps['labelCol']>,\n },\n wrapperCol: {\n type: Object as PropType<FormProps['wrapperCol']>,\n },\n colon: {\n type: Boolean as PropType<FormProps['colon']>,\n default: true,\n },\n requiredMark: {\n type: [Boolean, String] as PropType<FormProps['requiredMark']>,\n default: true,\n },\n labelAlign: {\n type: String as PropType<FormProps['labelAlign']>,\n default: 'right',\n },\n labelWrap: Boolean as PropType<FormProps['labelWrap']>,\n disabled: {\n type: Boolean as PropType<FormProps['disabled']>,\n default: false,\n },\n prefixCls: String as PropType<FormProps['prefixCls']>,\n validateMessages: Object as PropType<FormProps['validateMessages']>,\n validateTrigger: {\n type: [String, Array] as PropType<FormProps['validateTrigger']>,\n default: 'change',\n },\n validateOnRuleChange: {\n type: Boolean as PropType<FormProps['validateOnRuleChange']>,\n default: true,\n },\n scrollToFirstError: {\n type: [Boolean, Object] as PropType<FormProps['scrollToFirstError']>,\n default: false,\n },\n name: String,\n})\n\nexport const commonFieldProps = () => ({\n value: {\n type: [String, Array, Number, Object, Boolean] as PropType<any>,\n },\n readonly: {\n type: Boolean,\n default: undefined,\n },\n readonlyProps: {\n type: Object as PropType<ProFormItemType['readonlyProps']>,\n default: undefined,\n },\n valueEnum: {\n type: [Function, Object] as PropType<ProFormItemType['valueEnum']>,\n default: undefined,\n },\n options: {\n type: [Array, Function] as PropType<ProFormItemType['options']>,\n default: undefined,\n },\n request: {\n type: Function as PropType<ProFormItemType['request']>,\n default: undefined,\n },\n params: {\n type: [Function, Object] as PropType<ProFormItemType['params']>,\n default: undefined,\n },\n dependencies: {\n type: Array as PropType<ProFormItemType['dependencies']>,\n default: undefined,\n },\n onChange: {\n type: Function as PropType<ProFormItemType['onChange']>,\n },\n onPressEnter: {\n type: Function as PropType<KeyboardEventHandler>,\n },\n})\n\nexport const baseFormProps = () => ({\n ...antFormProps(),\n // name: String,\n loading: {\n type: Boolean,\n default: undefined,\n },\n showLoading: {\n type: Boolean,\n default: true,\n },\n submitOnLoading: {\n type: Boolean,\n default: true,\n },\n gridSubmitter: {\n type: Boolean,\n default: false,\n },\n omitNil: { type: Boolean, default: true },\n readonly: Boolean,\n grid: Boolean,\n isKeyPressSubmit: {\n type: Boolean,\n default: undefined,\n },\n formKey: String,\n theme: {\n type: String as PropType<ProFormPropsType['theme']>,\n default: 'custom',\n },\n customUi: {\n type: Boolean,\n default: true,\n },\n initialValues: {\n type: Object as PropType<ProFormPropsType['initialValues']>,\n },\n readonlyProps: {\n type: Object as PropType<ProFormPropsType['readonlyProps']>,\n },\n colProps: {\n type: Object as PropType<ProFormPropsType['colProps']>,\n },\n rowProps: {\n type: Object as PropType<ProFormPropsType['rowProps']>,\n },\n dateFormatter: {\n type: [String, Function, Boolean] as PropType<ProFormPropsType['dateFormatter']>,\n default: 'string',\n },\n params: {\n type: Object as PropType<ProFormPropsType['params']>,\n },\n items: {\n type: Array as PropType<ProFormItemType<Entity, any>[]>,\n },\n request: {\n type: Function as PropType<ProFormPropsType['request']>,\n },\n requestAbort: {\n type: Boolean,\n },\n submitter: {\n type: [Object, Boolean] as PropType<ProFormPropsType['submitter']>,\n default: undefined,\n },\n onReset: {\n type: Function as PropType<ProFormPropsType['onReset']>,\n },\n onFinish: {\n type: Function as PropType<ProFormPropsType['onFinish']>,\n },\n onFinishFailed: {\n type: Function as PropType<ProFormPropsType['onFinishFailed']>,\n },\n onLoadingChange: {\n type: Function as PropType<ProFormPropsType['onLoadingChange']>,\n },\n onValuesChange: {\n type: Function as PropType<ProFormPropsType['onValuesChange']>,\n },\n onInit: {\n type: Function as PropType<(values: any, formAction: ProFormActionType) => void>,\n default: undefined,\n },\n})\n\nexport const drawerOrModalFormProps = () => ({\n ...baseFormProps(),\n submitTimeout: {\n type: Number,\n default: undefined,\n },\n title: {\n type: String,\n default: undefined,\n },\n width: {\n type: [String, Number] as PropType<string | number>,\n default: 800,\n },\n open: {\n type: Boolean,\n default: undefined,\n },\n closeOnFinish: {\n type: Boolean,\n default: true,\n },\n confirmOnValuesChange: {\n type: Boolean,\n default: true,\n },\n onOpenChange: {\n type: Function as PropType<(open: boolean) => void>,\n default: undefined,\n },\n})\n\nexport const queryFilterProps = () => ({\n ...baseFormProps(),\n preserve: {\n type: Boolean,\n default: true,\n },\n defaultCollapsed: {\n type: Boolean,\n default: true,\n },\n collapsed: {\n type: Boolean as PropType<boolean | undefined>,\n default: undefined,\n },\n defaultColsNumber: Number,\n defaultFormItemsNumber: Number,\n labelWidth: {\n type: [String, Number] as PropType<number | 'auto'>,\n default: '80',\n },\n searchText: String,\n resetText: String,\n searchGutter: {\n type: Number,\n default: 24,\n },\n span: {\n type: [Number, Object] as PropType<SpanConfig>,\n },\n // span: definePropType<SpanConfig>([Number, String]),\n showHiddenNum: Boolean,\n ignoreRules: Boolean,\n resetOnSubmit: Boolean,\n onCollapse: {\n type: Function as PropType<(val: boolean) => void>,\n default: undefined,\n },\n onResize: {\n type: Function as PropType<(width: number, height: number) => void>,\n default: undefined,\n },\n})\nexport const stepsFormProps = () => ({\n ...baseFormProps(),\n current: {\n type: Number,\n default: undefined,\n },\n steps: {\n type: Array as PropType<(StepProps & { formProps?: BaseFormProps })[]>,\n default: () => [],\n },\n items: {\n type: Array as PropType<ProFormItemType<Entity, any>[][]>,\n default: () => [],\n },\n stepsProps: {\n type: Object as PropType<StepsProps>,\n },\n containerStyle: {\n type: Object as PropType<CSSProperties>,\n },\n onCurrentChange: {\n type: Function as PropType<(current: number) => void>,\n default: undefined,\n },\n})\n\nexport const formProps = () => ({\n ...baseFormProps(),\n ...drawerOrModalFormProps(),\n ...queryFilterProps(),\n ...stepsFormProps(),\n items: {\n type: Array as PropType<Array<ProFormItemType<Entity, any>[]> | ProFormItemType<Entity, any>[]>,\n default: () => [],\n },\n})\n\nexport type BaseFormProps = Partial<ExtractPropTypes<ReturnType<typeof baseFormProps>>>\n\nexport type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof formProps>>>\nexport type ProQueryFilterProps = Partial<ExtractPropTypes<ReturnType<typeof queryFilterProps>>>\nexport type ProStepsFormProps = Partial<ExtractPropTypes<ReturnType<typeof stepsFormProps>>>\nexport type ProDrawerOrModalFormProps = Partial<\n ExtractPropTypes<ReturnType<typeof drawerOrModalFormProps>>\n>\n"],"names":[],"mappings":";;AAmBO,MAAM,eAAe,OAAO;AAAA,EACjC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA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;AAAA,IACN,OAAA,EAAS,MAAM;AAAC;AAEpB,CAAA;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"InteralTable.vue.js","sources":["../../../../../../../packages/components/table/src/components/InteralTable.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-01 09:29:27\n * @LastEditors: shen\n * @LastEditTime: 2025-09-30 16:18:38\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { WatchStopHandle } from 'vue'\nimport {\n computed,\n defineComponent,\n shallowRef,\n ref,\n watchEffect,\n inject,\n watch,\n toRaw,\n triggerRef,\n onActivated,\n isReactive,\n toRef,\n} from 'vue'\nimport { Spin, Pagination } from 'ant-design-vue'\nimport { animateRows as globalAnimateRows } from './config'\nimport { baseTableProps } from './interface'\nimport { DOWN, LEFT, UP } from './Drag/constant'\nimport { addNestItemData, deleteNestItemData } from '../utils/util'\nimport { useEditProvider } from '../hooks/useEdit'\nimport { useProvidePopup } from './context/PopupContext'\nimport { useHScrollSyncProvide } from '../hooks/useHScrollSync'\nimport { useVScrollSyncProvide } from '../hooks/useVScrollSync'\nimport { useProvideTable } from './context/TableContext'\nimport { useProvideRangeStore } from '../hooks/useRangeStore'\nimport { usePrefixCls } from '@pro-design-vue/hooks'\nimport { resize } from '@pro-design-vue/directives'\nimport { omit, debounce, isPromise } from '@pro-design-vue/utils'\nimport useKVMap from '../hooks/useKVMap'\nimport useLicense from '../hooks/useLicense'\nimport devWarning from '../utils/devWarning'\nimport eagerComputed from '../utils/eagerComputed'\nimport getScrollBarSize from '../utils/getScrollBarSize'\nimport useColumns from '../hooks/useColumns'\nimport useSorter from '../hooks/useSorter'\nimport useFilter from '../hooks/useFilter'\nimport useCal from '../hooks/useCal'\nimport useFlattenRecords from '../hooks/useFlattenRecords'\nimport useSelection from '../hooks/useRowSelection'\nimport usePagination, { getPaginationParam } from '../hooks/usePagination'\nimport raf from '../utils/raf'\nimport easeoutScroll from '../utils/easeoutScroll'\nimport useData from '../hooks/useData'\nimport supportSticky from '../utils/supportSticky'\nimport classNames from '../utils/classNames'\nimport useCellProps from '../hooks/useCellProps'\nimport KeyCode from '../utils/KeyCode'\nimport TableSlotsContextProvider from './context/TableSlotsContext'\nimport MeasureWidth from './MeasureWidth.vue'\nimport PopupContainer from './PopupContainer.vue'\nimport AutoHeightHeader from './AutoHeightHeader/Header.vue'\nimport Header from './Header/Header.vue'\nimport Body from './Body/Body.vue'\n\nimport type { SpinProps } from 'ant-design-vue/es/spin'\nimport type {\n GetRowKey,\n Key,\n SorterResult,\n TableLocale,\n ColumnType,\n ResizeActionType,\n DragRowEventInfo,\n DragColumnEventInfo,\n DefaultRecordType,\n TableAction,\n} from './interface'\nimport type { CustomSlotsType } from '../utils/type'\nimport type { RangeCell } from '../hooks/RangeInterface'\nimport type { SortState } from '../hooks/useSorter'\nimport type { FilterState } from '../hooks/useFilter'\nimport type { ContextSlots } from './context/TableSlotsContext'\n\nexport type FilterValue = (Key | boolean)[]\nexport interface ChangeEventInfo<RecordType> {\n pagination: {\n current?: number\n pageSize?: number\n total?: number\n }\n filters: Record<string, FilterValue | null>\n sorter: SorterResult<RecordType> | SorterResult<RecordType>[]\n filterStates: FilterState<RecordType>[]\n sorterStates: SortState<RecordType>[]\n currentDataSource: RecordType[]\n action: TableAction\n}\nconst EMPTY_LIST: any[] = []\n\nexport default defineComponent({\n name: 'ProTable',\n inheritAttrs: false,\n directives: { resize },\n components: {\n TableSlotsContextProvider,\n Spin,\n MeasureWidth,\n Pagination,\n PopupContainer,\n AutoHeightHeader,\n ProHeader: Header,\n ProBody: Body,\n },\n props: baseTableProps(),\n emits: [\n 'update:pagination',\n 'scroll',\n 'update:selectedRowKeys',\n 'update:expandedRowKeys',\n 'update:columns',\n 'update:sorter',\n 'update:filters',\n 'expand',\n 'expandedRowsChange',\n 'resizeColumn',\n 'update:dataSource',\n 'cellKeydown',\n ],\n slots: {} as CustomSlotsType<ContextSlots>,\n setup(props, { expose, emit, slots }) {\n const rowKey = computed(() => props.rowKey ?? 'id')\n const popupContainer = shallowRef<any>(null)\n const customUiCls = usePrefixCls('custom-ui')\n\n const { editCellKeys, openEditor, closeEditor } = useEditProvider()\n\n useProvidePopup()\n\n const getPopupContainer = computed(() => props.getPopupContainer!)\n const { status, watermarkMsg } = useLicense()\n\n const dragRowsHandle = new Map<Key, Set<HTMLSpanElement>>()\n const draggingRowKey = ref<Key | null>(null)\n const insertToRowKey = ref<Key | null>(null)\n const dragColumnsHandle = new Map<Key, Set<HTMLDivElement>>()\n const draggingColumnKey = ref<Key>('')\n const latestRangeStartCell = shallowRef<RangeCell | null>(null)\n const mergedSummaryFixed = computed(() =>\n props.summaryFixed === true || props.summaryFixed === ('' as any)\n ? 'bottom'\n : props.summaryFixed,\n )\n const realHeaderHeight = ref(0)\n\n watchEffect(() => {\n devWarning(\n !(typeof rowKey.value == 'function' && rowKey.value.length > 1),\n 'table',\n '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.',\n )\n })\n\n const localeData: any = inject('localeData', {\n antLocale: {\n Table: {\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting',\n },\n },\n })\n\n const locale = computed<TableLocale>(() => {\n const antLocale = localeData?.antLocale || {}\n return {\n ...(antLocale.locale === 'zh-cn'\n ? {\n triggerDesc: '\\u70B9\\u51FB\\u964D\\u5E8F',\n triggerAsc: '\\u70B9\\u51FB\\u5347\\u5E8F',\n cancelSort: '\\u53D6\\u6D88\\u6392\\u5E8F',\n }\n : {}),\n ...(antLocale.Table || {}),\n ...(props.locale || {}),\n }\n })\n\n const scrollTop = ref(0)\n const scrollLeft = ref(0)\n const rootRef = ref<HTMLDivElement>()\n const bodyWidth = ref(0)\n const bodyHeight = ref(0)\n const measureWidthRef = shallowRef<HTMLDivElement>()\n\n const mergedScrollX = eagerComputed(() => props.scrollX ?? props.scroll?.x)\n const mergedScrollY = eagerComputed(() => props.scroll?.y ?? props.height ?? props.maxHeight)\n const bodyScrollWidth = ref(typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0)\n\n watch(mergedScrollX, () => {\n bodyScrollWidth.value = typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0\n })\n\n const virtual = eagerComputed<boolean>(() => !(props.virtual === false || !mergedScrollY.value))\n const xVirtual = eagerComputed<boolean>(\n () => props.xVirtual || (props.virtual !== false && props.xVirtual !== false),\n )\n\n const getRowKey = computed<GetRowKey>(() =>\n typeof rowKey.value == 'function'\n ? rowKey.value\n : (record: Record<string, any>) => {\n return record?.[rowKey.value as string]\n },\n )\n\n const rawData = shallowRef<DefaultRecordType[]>([])\n const rawColumns = shallowRef<ColumnType[]>([])\n\n let dataSourceWatchStopHandle: WatchStopHandle\n let columnsWatchStopHandle: WatchStopHandle\n watch(\n () => props.deepWatchDataSource,\n () => {\n dataSourceWatchStopHandle && dataSourceWatchStopHandle()\n dataSourceWatchStopHandle = watch(\n () => props.dataSource,\n () => {\n rawData.value = toRaw(props.dataSource) || EMPTY_LIST\n triggerRef(rawData)\n },\n { immediate: true, deep: !!props.deepWatchDataSource },\n )\n },\n { immediate: true, deep: true },\n )\n\n watch(\n () => props.deepWatchColumns,\n () => {\n columnsWatchStopHandle && columnsWatchStopHandle()\n columnsWatchStopHandle = watch(\n () => props.columns,\n () => {\n rawColumns.value = toRaw(props.columns) || EMPTY_LIST\n triggerRef(rawColumns)\n },\n { immediate: true, deep: true },\n )\n },\n { immediate: true, deep: !!props.deepWatchColumns },\n )\n\n const childrenColumnName = computed(() => props.childrenColumnName || 'children')\n\n const { getRecordByKey, getIndexsByKey, getKeyByIndexs, allDataRowKeys, allDataRootRowKeys } =\n useKVMap(rawData, childrenColumnName, getRowKey)\n\n const defaultExpandedRowKeys = shallowRef<Key[]>([])\n watchEffect(() => {\n props.defaultExpandedRowKeys && (defaultExpandedRowKeys.value = props.defaultExpandedRowKeys)\n props.defaultExpandAllRows && (defaultExpandedRowKeys.value = allDataRowKeys.value)\n })\n\n const mergedRowSelection = computed(() => {\n const rowSelection = props.rowSelection || {}\n const { checkStrictly = true } = rowSelection\n return { ...rowSelection, checkStrictly }\n })\n\n const expandedRowKeys = computed(\n () => new Set(props.expandedRowKeys || defaultExpandedRowKeys.value || []),\n )\n\n const spinProps = computed<SpinProps>(() => {\n if (typeof props.loading === 'boolean') {\n return { spinning: props.loading }\n } else if (typeof props.loading === 'object') {\n return { spinning: true, ...props.loading }\n } else {\n return { spinning: false }\n }\n })\n\n onActivated(() => {\n scrollTo({ left: 0, top: 0 })\n })\n\n let triggerOnChange: any = () => {}\n\n const scrollBarSize = shallowRef(getScrollBarSize())\n const baseHeight = computed(() =>\n props.size === 'small' ? 39 : props.size === 'middle' ? 47 : 55,\n )\n const expandedRowRender = computed(() => props.expandedRowRender)\n const expandType = eagerComputed(() =>\n rawData.value.some((column) => column?.[childrenColumnName.value])\n ? 'nest'\n : expandedRowRender.value\n ? 'row'\n : null,\n )\n const expandable = eagerComputed(() => !!props.expandedRowRender)\n\n const columns = useColumns({\n props,\n rawColumns,\n bodyScrollWidth,\n baseHeight,\n measureWidthRef,\n expandable,\n expandType,\n scrollLeft,\n bodyWidth,\n xVirtual,\n draggingColumnKey,\n latestRangeStartCell,\n })\n\n const { sortedData, sorterStates, sorter, changeSorter } = useSorter(\n props,\n rawData,\n columns.allColumns,\n (sorter, sorterStates) => {\n scrollTop.value > bodyHeight.value && updateAnimate()\n triggerOnChange({ sorter, sorterStates }, 'sort', false)\n },\n )\n\n const { filterData, filterStates, filters, changeFilter } = useFilter(\n props,\n sortedData,\n columns.allColumns,\n (filters, filterStates) => {\n triggerOnChange({ filters, filterStates }, 'filter', true)\n },\n )\n\n const total = eagerComputed(() => filterData.value.length)\n const paginationParam = computed(() => {\n if (props.pagination === false) {\n return {}\n }\n return getPaginationParam(props.pagination, mergedPagination.value)\n })\n\n const triggeronPaginationChange = (current: number, pageSize: number) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n props['onUpdate:pagination'] &&\n emit(\n 'update:pagination',\n isReactive(props.pagination)\n ? Object.assign(props.pagination || {}, pagination)\n : pagination,\n )\n }\n\n const {\n mergedPagination,\n pos,\n refreshPagination,\n onChange: onPaginationChange,\n onShowSizeChange,\n pageData,\n } = usePagination(total, props, filterData, (current, pageSize) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n triggeronPaginationChange(current, pageSize)\n updateAnimate()\n triggerOnChange({ pagination }, 'paginate')\n })\n\n const {\n flattenData,\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n getRowFlattenIndexByKey,\n isMyChildren,\n getRowByFlattenIndex,\n } = useFlattenRecords(\n pageData,\n childrenColumnName,\n expandedRowKeys,\n getRowKey,\n expandType,\n mergedRowSelection,\n )\n\n const cal = useCal(props, flattenData, bodyHeight, scrollTop, virtual, keyEntities)\n\n const { rowPosition, viewportHeight, startIndex, endIndex } = cal\n const { leftWidth, rightWidth, centerWidth, bodyMaxWidth } = columns\n\n const selection = useSelection(props, mergedRowSelection, rawData, {\n prefixCls: computed(() => props.prefixCls!),\n pageData,\n getRowKey,\n getRecordByKey,\n childrenColumnName,\n locale,\n flattenData,\n keyEntities,\n checkboxPropsMap,\n allDataRowKeys,\n allDataRootRowKeys,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n })\n\n const bodyRef = ref<HTMLDivElement>()\n let leftRaf: any, topRaf: any\n\n const scrollTo = (options: any = {}, type = 'auto', isAnimate = false) => {\n if (!isAnimate) {\n updateAnimate()\n }\n const mergeOptions = typeof options == 'number' ? { top: options } : options\n let left, top\n if ('left' in mergeOptions) {\n left = mergeOptions.left || 0\n } else if ('columnIndex' in mergeOptions) {\n const position = columns.getColumnPosition(mergeOptions.columnIndex!)\n if (position) {\n left = position.left - leftWidth.value\n }\n } else if ('columnKey' in mergeOptions) {\n const position = columns.getColumnPositionByKey(mergeOptions.columnKey!)\n if (position) {\n left = position.left - leftWidth.value\n }\n }\n if ('top' in mergeOptions) {\n top = Math.min(Math.max(mergeOptions.top || 0, 0), maxScrollTop.value)\n } else if ('rowKey' in mergeOptions) {\n const pos = cal.getRowPositionByKey(mergeOptions.rowKey!)\n if (pos) {\n top = pos\n }\n }\n\n left = Math.max(Math.min(maxScrollLeft.value, left || 0), 0)\n if (!showVerticalScrollbar.value) {\n top = 0\n }\n if (type === 'smooth') {\n if (left !== undefined) {\n raf.cancel(leftRaf)\n leftRaf = easeoutScroll(scrollLeft.value, left, (val: number) => {\n scrollLeft.value = val\n })\n }\n if (top !== undefined) {\n raf.cancel(topRaf)\n topRaf = easeoutScroll(scrollTop.value, top, (val: number) => {\n scrollTop.value = val\n })\n }\n } else {\n if (left !== undefined) {\n scrollLeft.value = left\n }\n if (top !== undefined) {\n scrollTop.value = top\n }\n }\n }\n\n const useAnimate = ref(false)\n const animateRows = computed(() => {\n return !!(props.animateRows ?? globalAnimateRows.value)\n })\n\n let timer: any\n watch(\n animateRows,\n (newVal) => {\n useAnimate.value = newVal\n },\n { immediate: true },\n )\n\n const updateAnimate = () => {\n useAnimate.value = false\n clearTimeout(timer)\n timer = setTimeout(() => {\n useAnimate.value = animateRows.value\n }, 100)\n }\n\n const maxScrollLeft = computed(() => bodyMaxWidth.value - bodyWidth.value)\n const maxScrollTop = computed(() => viewportHeight.value - bodyHeight.value)\n const onScroll = (e) => {\n emit('scroll', e)\n }\n\n useHScrollSyncProvide({ scrollLeft, maxScrollLeft, onScroll, bodyWidth })\n useVScrollSyncProvide({ scrollTop, maxScrollTop, onScroll, updateAnimate, bodyWidth })\n\n const { data, pos: dataRowPosition } = useData(\n props,\n rowPosition,\n flattenData,\n startIndex,\n endIndex,\n draggingRowKey,\n useAnimate,\n getRowFlattenIndexByKey,\n latestRangeStartCell,\n )\n\n const pingedLeft = ref(false)\n const pingedRight = ref(false)\n const noPinged = ref(false)\n\n watchEffect(() => {\n pingedLeft.value = supportSticky && !!scrollLeft.value\n pingedRight.value =\n supportSticky &&\n centerWidth.value - (bodyWidth.value - leftWidth.value - rightWidth.value) >\n scrollLeft.value\n noPinged.value = !pingedLeft.value && !pingedRight.value\n })\n\n const rootClass = computed(() =>\n classNames({\n [`${props.prefixCls}`]: true,\n [`${props.prefixCls}-support-sticky`]: supportSticky,\n [`${props.prefixCls}-stripe`]: props.stripe,\n [`${props.prefixCls}-bordered`]: props.bordered,\n [`${props.prefixCls}-${props.size}`]: true,\n [`${props.prefixCls}-ping-left`]: pingedLeft.value,\n [`${props.prefixCls}-ping-right`]: pingedRight.value,\n [`${props.prefixCls}-no-ping`]: noPinged.value,\n [`${props.prefixCls}-has-animate`]: animateRows.value,\n }),\n )\n const rootStyle = computed(() => ({\n height: typeof props.height == 'number' ? `${props.height}px` : props.height,\n maxHeight: typeof props.maxHeight == 'number' ? `${props.maxHeight}px` : props.maxHeight,\n minHeight: typeof props.minHeight == 'number' ? `${props.minHeight}px` : props.minHeight,\n }))\n\n const showHorizontalScrollbar = ref(false)\n const debounceFn = debounce(() => {\n showHorizontalScrollbar.value = bodyMaxWidth.value > bodyWidth.value\n if (bodyWidth.value > bodyScrollWidth.value) {\n bodyScrollWidth.value = bodyWidth.value\n }\n }, 100)\n\n watch([bodyMaxWidth, bodyWidth], () => {\n debounceFn()\n })\n\n const showVerticalScrollbar = eagerComputed(\n () => !!mergedScrollY.value && bodyHeight.value + 0.9 < viewportHeight.value,\n )\n const scrollToFirstRow = eagerComputed(\n () => !props.scroll || (props.scroll && props.scroll.scrollToFirstRowOnChange !== false),\n )\n\n triggerOnChange = (\n info: Partial<ChangeEventInfo<DefaultRecordType>>,\n action: TableAction,\n reset = false,\n ) => {\n if (reset) {\n refreshPagination()\n triggeronPaginationChange(1, mergedPagination.value.pageSize!)\n if (props.pagination) {\n props.pagination.onChange?.(1, mergedPagination.value.pageSize)\n }\n }\n if (scrollToFirstRow.value) {\n scrollTop.value = 0\n }\n props.onChange?.(\n info.pagination || mergedPagination.value,\n info.filters || filters.value,\n info.sorter || sorter.value,\n {\n currentDataSource: info.currentDataSource || filterData.value,\n action,\n },\n )\n }\n\n const paginationProps = computed(() => {\n return omit(mergedPagination.value, ['position', 'onChange', 'onShowSizeChange'])\n })\n\n const paginationClass = computed(() => {\n return {\n [`${props.prefixCls}-pagination`]: true,\n [`${props.prefixCls}-pagination-${pos.value.bottom}`]: true,\n [`${customUiCls}`]: true,\n }\n })\n const bottomPaginationHeight = ref(0)\n const bottomPaginationStyle = computed<any>(() => {\n if (!props.paginationSticky) {\n return {}\n }\n if (props.paginationSticky === true) {\n return { position: 'sticky', 'z-index': 9, bottom: '0px' }\n }\n return {\n position: 'sticky',\n 'z-index': 9,\n bottom: `${props.paginationSticky?.offsetBottom ?? 0}px`,\n }\n })\n\n const indentSize = computed(() => (typeof props.indentSize == 'number' ? props.indentSize : 15))\n\n const cellProps = useCellProps({\n leftColumns: columns.leftColumns,\n rightColumns: columns.rightColumns,\n visibleCenterColumns: columns.visibleCenterColumns,\n allColumns: columns.allColumns,\n data,\n mergedRowHeights: cal.mergedRowHeights,\n startIndex,\n getColumnPosition: columns.getColumnPosition,\n bodyWidth,\n leftWidth,\n centerWidth,\n getRowHeight: cal.getRowHeight,\n customCell: toRef(props, 'customCell'),\n })\n\n watch(\n [realHeaderHeight, scrollLeft],\n () => {\n popupContainer.value?.alignPopup?.()\n },\n { flush: 'post' },\n )\n\n useProvideTable({\n ...cal,\n ...columns,\n ...cellProps,\n rootRef,\n rawData,\n getRowFlattenIndexByKey,\n prefixCls: computed(() => props.prefixCls!),\n draggingRowKey,\n insertToRowKey,\n status,\n useAnimate,\n animateRows,\n watermarkMsg,\n onResizeColumn: (w: number, col: ColumnType, action: ResizeActionType) => {\n const width = col.width\n const result = props.onResizeColumn?.(w, col, action)\n if (result !== false) {\n if (!(width === w && col.width === w)) {\n col.width = width !== col.width ? col.width : w\n triggerRef(rawColumns)\n }\n if (action === 'end') {\n emit('update:columns', rawColumns.value, 'resize')\n }\n }\n },\n onRowDragEnd: (opt: DragRowEventInfo) => {\n const { insertToRowKey, record, fromIndexs, rowKey, dir, preTargetInfo, nextTargetInfo } =\n opt\n const rawRecord = toRaw(record)\n const dragEnd = props.onRowDragEnd?.({ ...opt, record: rawRecord, fromIndexs })\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (!isMyChildren(rowKey, preTargetInfo?.rowKey as Key) && insertToRowKey !== rowKey) {\n if (insertToRowKey !== null) {\n const parentRecord = getRecordByKey(insertToRowKey)\n if (\n insertToRowKey === preTargetInfo?.rowKey ||\n insertToRowKey === nextTargetInfo?.rowKey\n ) {\n if (dir === DOWN) {\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n } else {\n if (dir === DOWN) {\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n } else {\n if (dir === DOWN && preTargetInfo) {\n addNestItemData(\n rawData.value,\n [preTargetInfo.indexs[0]!],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else if (dir === UP && nextTargetInfo) {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs ? [preTargetInfo!.indexs[0]!] : [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n triggerRef(rawData)\n emit('update:dataSource', rawData.value)\n }\n }\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n virtual,\n xVirtual,\n dataRowPosition,\n rawColumns,\n bodyHeight,\n scrollTop,\n scrollLeft,\n supportSticky,\n childrenColumnName,\n bodyScrollWidth,\n baseHeight,\n startIndex,\n data,\n pageData,\n getRecordByKey,\n getIndexsByKey,\n expandType,\n flattenData,\n expandedRowKeys,\n indentSize,\n props,\n bodyWidth,\n scrollTo,\n scrollBarSize,\n leftWidth,\n rightWidth,\n centerWidth,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getRowKey,\n selection,\n updateSelectedRowKeys: (keys: Key[]) => {\n emit('update:selectedRowKeys', keys)\n },\n locale,\n sorterStates,\n changeSorter,\n changeFilter,\n filterStates,\n onTriggerExpand: (record, key: Key) => {\n let keys: Key[]\n const hasKey = expandedRowKeys.value.has(key)\n if (hasKey) {\n expandedRowKeys.value.delete(key)\n keys = [...expandedRowKeys.value]\n } else {\n keys = [...expandedRowKeys.value, key]\n }\n defaultExpandedRowKeys.value = keys\n emit('update:expandedRowKeys', keys)\n emit('expand', !hasKey, record)\n emit('expandedRowsChange', keys)\n },\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n mergedRowSelection,\n getPopupContainer,\n allDataRowKeys,\n allDataRootRowKeys,\n dragRowsHandle,\n isMyChildren,\n getKeyByIndexs,\n getRowByFlattenIndex,\n draggingColumnKey,\n dragColumnsHandle,\n onColumnDragEnd: (arg: DragColumnEventInfo) => {\n const { dir, column, targetColumn } = arg\n const dragEnd = props.onColumnDragEnd?.(arg)\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (column === targetColumn || column.key === targetColumn.key) return\n const index = rawColumns.value.findIndex(\n (col) => col === column || col.key === column.key,\n )\n const targetIndex = rawColumns.value.findIndex(\n (col) => col === targetColumn || col.key === targetColumn.key,\n )\n if (dir === LEFT) {\n rawColumns.value.splice(index, 1)\n rawColumns.value.splice(targetIndex, 0, column)\n } else {\n rawColumns.value.splice(targetIndex + 1, 0, column)\n rawColumns.value.splice(index, 1)\n }\n triggerRef(rawColumns)\n emit('update:columns', rawColumns.value, 'drag')\n }\n\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n onColumnDrag: () => {},\n columnDrag: computed(() => props.columnDrag),\n summaryFixed: mergedSummaryFixed,\n realHeaderHeight,\n bottomPaginationHeight,\n pos,\n })\n\n const tabGuardTopRef = ref()\n const tabGuardBottomRef = ref()\n\n const {\n navigationService,\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n onBodyKeydown,\n } = useProvideRangeStore({\n allColumns: columns.allColumns,\n flattenData,\n rangeSelection: computed(() => props.rangeSelection),\n getRowByFlattenIndex,\n rootRef,\n prefixCls: computed(() => props.prefixCls!),\n allCellProps: cellProps.allCellProps,\n tabGuardTopRef,\n tabGuardBottomRef,\n ensureCellColumnVisible: (cell: RangeCell) => {\n if (!cell.column || cell.column.fixed) return\n const sl = scrollLeft.value\n const pos = columns.getColumnPositionByKey(cell.column.columnKey)\n if (pos) {\n const { width, left } = pos\n const lw = leftWidth.value\n const rw = rightWidth.value\n left - lw < sl\n ? (scrollLeft.value = left - lw)\n : left + width > sl + bodyWidth.value - rw &&\n (scrollLeft.value = left + width - bodyWidth.value + rw)\n }\n },\n ensureCellRowVisible: (cell: RangeCell) => {\n const { rowIndex } = cell\n const st = scrollTop.value\n const row = getRowByFlattenIndex(rowIndex)\n const pos = cal.getRowPositionByKey(row.rowKey)\n const cprops =\n (cellProps.allCellProps.value[row.rowKey]?.[cell.column!.columnKey] || {}).props || {}\n const height = cal.getRowHeight(rowIndex, cprops.rowSpan)\n if (pos !== undefined) {\n updateAnimate()\n if (pos < st) {\n scrollTop.value = pos\n } else {\n if (pos + height > st + bodyHeight.value) {\n scrollTop.value = pos + height - bodyHeight.value\n }\n }\n }\n },\n latestRangeStartCell,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n scrollLeft,\n scrollTop,\n scrollTo,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getIndexsByKey,\n formatRangeCellText: (parmas) => {\n if (props.formatRangeCellText) {\n return props.formatRangeCellText(parmas)\n } else if (parmas.value) {\n return parmas.value\n }\n return ''\n },\n editCellKeys,\n copyDelimiter: computed(() => props.copyDelimiter),\n })\n\n expose({\n scrollTo,\n scrollLeft,\n scrollTop,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n openEditor: (cellInfos: any[]) => {\n openEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n },\n closeEditor: (cellInfos: any[]) => {\n if (cellInfos) {\n closeEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n } else {\n closeEditor()\n }\n },\n })\n\n return {\n bodyRef,\n spinProps,\n rowPosition,\n viewportHeight,\n startIndex,\n data,\n watermarkMsg,\n rootStyle,\n rootClass,\n onBodyKeydown,\n watermarkStyle: computed<any>(() => ({\n minWidth: '100px!important',\n minHeight: '40px!important',\n position: 'absolute!important',\n fontSize: '20px!important',\n opacity: '0.8!important',\n bottom: '40px!important',\n right: '40px!important',\n pointerEvents: 'none',\n display: 'block!important',\n zIndex: '999999!important',\n color: '#000000!important',\n margin: '0px!important',\n padding: '0px!important',\n transform: 'unset!important',\n })),\n mergedPagination,\n pos,\n onPaginationChange,\n scrollBarSize,\n scrollTop,\n bodyScrollWidth,\n bodyWidth,\n scrollLeft,\n cal,\n selection,\n locale,\n paginationProps,\n slots,\n mergedScrollX,\n mergedScrollY,\n bodyHeight,\n measureWidthRef,\n flattenData,\n rootRef,\n mergedSummaryFixed,\n handleResize: (e: CustomEvent) => {\n realHeaderHeight.value = e.detail.height\n },\n handlePaginationResize: (e: CustomEvent) => {\n bottomPaginationHeight.value = e.detail.height\n },\n popupContainer,\n handleGuardTopKeydown: (e: KeyboardEvent) => {\n e.keyCode !== KeyCode.TAB ||\n e.shiftKey ||\n (navigationService.getFirstCellToFocus(e.shiftKey), e.preventDefault())\n },\n handleGuardBottomKeydown: (e: KeyboardEvent) => {\n e.keyCode === KeyCode.TAB &&\n e.shiftKey &&\n (navigationService.getLastCellToFocus(e.shiftKey), e.preventDefault())\n },\n tabGuardTopRef,\n tabGuardBottomRef,\n onShowSizeChange,\n customUiCls,\n paginationClass,\n bottomPaginationStyle,\n }\n },\n})\n</script>\n\n<template>\n <TableSlotsContextProvider :value=\"{ ...slots }\">\n <Spin v-bind=\"spinProps\">\n <Pagination\n v-if=\"pos.top\"\n :class=\"`${prefixCls}-pagination ${prefixCls}-pagination-${pos.top} ${customUiCls}`\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n <div\n ref=\"tabGuardTopRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardTopKeydown\"\n ></div>\n <div key=\"content\" ref=\"ref\" :class=\"rootClass\" :style=\"rootStyle\">\n <template v-if=\"showHeader\">\n <AutoHeightHeader\n v-if=\"autoHeaderHeight\"\n :prefix-cls=\"prefixCls\"\n :sticky=\"sticky\"\n @resizeheight=\"handleResize\"\n />\n <ProHeader v-else :prefix-cls=\"prefixCls\" :sticky=\"sticky\" @resizeheight=\"handleResize\" />\n </template>\n <ProBody\n ref=\"bodyRef\"\n v-model:bodyScrollWidth=\"bodyScrollWidth\"\n v-model:bodyWidth=\"bodyWidth\"\n v-model:bodyHeight=\"bodyHeight\"\n :prefix-cls=\"prefixCls\"\n :wrap-text=\"wrapText\"\n :scroll-x=\"mergedScrollX\"\n :height=\"mergedScrollY\"\n :summary-fixed=\"mergedSummaryFixed\"\n :summary=\"$slots.summary\"\n :empty-text=\"$slots.emptyText\"\n @keydown=\"onBodyKeydown\"\n />\n </div>\n <div\n ref=\"tabGuardBottomRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardBottomKeydown\"\n ></div>\n <div v-if=\"$slots.footer\" key=\"footer\" :class=\"`${prefixCls}-footer`\">\n <slot name=\"footer\" />\n </div>\n <PopupContainer ref=\"popupContainer\" :prefix-cls=\"prefixCls\" />\n <div\n v-if=\"pos.bottom\"\n v-resize:height\n :style=\"bottomPaginationStyle\"\n :class=\"`${prefixCls}-pagination-wrap`\"\n @resizeheight=\"handlePaginationResize\"\n >\n <Pagination\n :class=\"paginationClass\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n </div>\n </Spin>\n <MeasureWidth ref=\"measureWidthRef\" />\n </TableSlotsContextProvider>\n</template>\n"],"names":["_createBlock","_createVNode","_normalizeProps","_guardReactiveProps","_withCtx","_openBlock","_mergeProps","_createCommentVNode","_createElementVNode","_normalizeClass","_normalizeStyle","_createElementBlock","_Fragment","_renderSlot","_withDirectives"],"mappings":";;;;;;;;;;;;;;;;;;0BA4gCEA,eAAA,CAoE4B,oCAAA,EAAA;AAAA,IApEA,KAAA,EAAK,KAAO,IAAA,CAAA,KAAA;AAAK,GAAA,EAAA;AAAA,yBAC3C,MAiEO;AAAA,MAjEPC,eAAA;AAAA,QAiEO,eAAA;AAAA,QAAAC,kBAAA,CAAAC,sBAAA,CAjEO,IAAA,CAAA,SAAS,CAAA,CAAA;AAAA,QAAA;AAAA,UAAA,OAAA,EAAAC,YACrB,MAME;AAAA,YALM,KAAA,GAAA,CAAI,GAAA,IAAAC,eAAA,EADZL,eAAA,CAME,uBANFM,cAAA,CAME;AAAA,cAAA,GAAA,EAAA,CAAA;AAAA,cAJC,KAAA,EAAK,CAAA,EAAK,IAAA,UAAS,CAAA,YAAA,EAAe,IAAA,CAAA,SAAS,CAAA,YAAA,EAAe,IAAA,CAAA,GAAA,CAAI,GAAG,CAAA,CAAA,EAAI,KAAA,WAAW,CAAA;AAAA,aAAA,EACz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GAAA,EAAA,CAAA;AAAA,gBAVH,KAAA,EAAKD,kBAAA,CAAE,IAAA,CAAA,qBAAqB,CAAA;AAAA,gBAC5B,KAAA,EAAKD,kBAAA,IAAK,IAAA,CAAA,SAAS,CAAA,gBAAA,CAAA,CAAA;AAAA,gBACnB,cAAA,EAAY,MAAA,CAAA,CAAA,CAAA,KAAA,OAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,sBAAA,IAAA,IAAA,CAAA,sBAAA,CAAA,GAAA,IAAA,CAAA;AAAA,eAAA;AAAA;gBAEfR,eAAA,CAKE,uBALFK,cAAA,CAKE,EAJC,OAAO,IAAA,CAAA,eAAA,EAAe,EACf,IAAA,CAAA,eAAA,EAAe;AAAA,kBACtB,UAAQ,IAAA,CAAA,kBAAA;AAAA,kBACR,kBAAkB,IAAA,CAAA;AAAA,iBAAA,GAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,kBAAA,CAAA;AAAA;;;;0CATZ,QAAM;AAAA,aAAA,CAAA,GAAAC,sBAAA,CAAA,MAAA,EAAA,IAAA;AAAA;;;;;;;MAanBN,eAAA;AAAA,QAAsC,uBAAA;AAAA,QAAA,EAAxB,KAAI,iBAAA,EAAiB;AAAA,QAAA,IAAA;AAAA,QAAA;AAAA;AAAA;AAAA,KAAA,CAAA;AAAA;;;;;;;;"}
|
1
|
+
{"version":3,"file":"InteralTable.vue.js","sources":["../../../../../../../packages/components/table/src/components/InteralTable.vue"],"sourcesContent":["<!--\n * @Author: shen\n * @Date: 2023-11-01 09:29:27\n * @LastEditors: shen\n * @LastEditTime: 2025-10-10 09:13:26\n * @Description:\n-->\n<script lang=\"ts\">\nimport type { WatchStopHandle } from 'vue'\nimport {\n computed,\n defineComponent,\n shallowRef,\n ref,\n watchEffect,\n inject,\n watch,\n toRaw,\n triggerRef,\n onActivated,\n isReactive,\n toRef,\n} from 'vue'\nimport { Spin, Pagination } from 'ant-design-vue'\nimport { animateRows as globalAnimateRows } from './config'\nimport { baseTableProps } from './interface'\nimport { DOWN, LEFT, UP } from './Drag/constant'\nimport { addNestItemData, deleteNestItemData } from '../utils/util'\nimport { useEditProvider } from '../hooks/useEdit'\nimport { useProvidePopup } from './context/PopupContext'\nimport { useHScrollSyncProvide } from '../hooks/useHScrollSync'\nimport { useVScrollSyncProvide } from '../hooks/useVScrollSync'\nimport { useProvideTable } from './context/TableContext'\nimport { useProvideRangeStore } from '../hooks/useRangeStore'\nimport { usePrefixCls } from '@pro-design-vue/hooks'\nimport { resize } from '@pro-design-vue/directives'\nimport { omit, debounce, isPromise } from '@pro-design-vue/utils'\nimport useKVMap from '../hooks/useKVMap'\nimport useLicense from '../hooks/useLicense'\nimport devWarning from '../utils/devWarning'\nimport eagerComputed from '../utils/eagerComputed'\nimport getScrollBarSize from '../utils/getScrollBarSize'\nimport useColumns from '../hooks/useColumns'\nimport useSorter from '../hooks/useSorter'\nimport useFilter from '../hooks/useFilter'\nimport useCal from '../hooks/useCal'\nimport useFlattenRecords from '../hooks/useFlattenRecords'\nimport useSelection from '../hooks/useRowSelection'\nimport usePagination, { getPaginationParam } from '../hooks/usePagination'\nimport raf from '../utils/raf'\nimport easeoutScroll from '../utils/easeoutScroll'\nimport useData from '../hooks/useData'\nimport supportSticky from '../utils/supportSticky'\nimport classNames from '../utils/classNames'\nimport useCellProps from '../hooks/useCellProps'\nimport KeyCode from '../utils/KeyCode'\nimport TableSlotsContextProvider from './context/TableSlotsContext'\nimport MeasureWidth from './MeasureWidth.vue'\nimport PopupContainer from './PopupContainer.vue'\nimport AutoHeightHeader from './AutoHeightHeader/Header.vue'\nimport Header from './Header/Header.vue'\nimport Body from './Body/Body.vue'\n\nimport type { SpinProps } from 'ant-design-vue/es/spin'\nimport type {\n GetRowKey,\n Key,\n SorterResult,\n TableLocale,\n ColumnType,\n ResizeActionType,\n DragRowEventInfo,\n DragColumnEventInfo,\n DefaultRecordType,\n TableAction,\n} from './interface'\nimport type { CustomSlotsType } from '../utils/type'\nimport type { RangeCell } from '../hooks/RangeInterface'\nimport type { SortState } from '../hooks/useSorter'\nimport type { FilterState } from '../hooks/useFilter'\nimport type { ContextSlots } from './context/TableSlotsContext'\nimport { DEFAULT_LOCALE } from '@pro-design-vue/constants'\n\nexport type FilterValue = (Key | boolean)[]\nexport interface ChangeEventInfo<RecordType> {\n pagination: {\n current?: number\n pageSize?: number\n total?: number\n }\n filters: Record<string, FilterValue | null>\n sorter: SorterResult<RecordType> | SorterResult<RecordType>[]\n filterStates: FilterState<RecordType>[]\n sorterStates: SortState<RecordType>[]\n currentDataSource: RecordType[]\n action: TableAction\n}\nconst EMPTY_LIST: any[] = []\n\nexport default defineComponent({\n name: 'ProTable',\n inheritAttrs: false,\n directives: { resize },\n components: {\n TableSlotsContextProvider,\n Spin,\n MeasureWidth,\n Pagination,\n PopupContainer,\n AutoHeightHeader,\n ProHeader: Header,\n ProBody: Body,\n },\n props: baseTableProps(),\n emits: [\n 'update:pagination',\n 'scroll',\n 'update:selectedRowKeys',\n 'update:expandedRowKeys',\n 'update:columns',\n 'update:sorter',\n 'update:filters',\n 'expand',\n 'expandedRowsChange',\n 'resizeColumn',\n 'update:dataSource',\n 'cellKeydown',\n ],\n slots: {} as CustomSlotsType<ContextSlots>,\n setup(props, { expose, emit, slots }) {\n const rowKey = computed(() => props.rowKey ?? 'id')\n const popupContainer = shallowRef<any>(null)\n const customUiCls = usePrefixCls('custom-ui')\n\n const { editCellKeys, openEditor, closeEditor } = useEditProvider()\n\n useProvidePopup()\n\n const getPopupContainer = computed(() => props.getPopupContainer!)\n const { status, watermarkMsg } = useLicense()\n\n const dragRowsHandle = new Map<Key, Set<HTMLSpanElement>>()\n const draggingRowKey = ref<Key | null>(null)\n const insertToRowKey = ref<Key | null>(null)\n const dragColumnsHandle = new Map<Key, Set<HTMLDivElement>>()\n const draggingColumnKey = ref<Key>('')\n const latestRangeStartCell = shallowRef<RangeCell | null>(null)\n const mergedSummaryFixed = computed(() =>\n props.summaryFixed === true || props.summaryFixed === ('' as any)\n ? 'bottom'\n : props.summaryFixed,\n )\n const realHeaderHeight = ref(0)\n\n watchEffect(() => {\n devWarning(\n !(typeof rowKey.value == 'function' && rowKey.value.length > 1),\n 'table',\n '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.',\n )\n })\n\n const localeData: any = inject('localeData', {\n antLocale: {\n Table: {\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting',\n },\n },\n })\n\n const locale = computed<TableLocale>(() => {\n const antLocale = localeData?.antLocale || {}\n return {\n ...(antLocale.locale === DEFAULT_LOCALE.toLocaleLowerCase()\n ? {\n triggerDesc: '\\u70B9\\u51FB\\u964D\\u5E8F',\n triggerAsc: '\\u70B9\\u51FB\\u5347\\u5E8F',\n cancelSort: '\\u53D6\\u6D88\\u6392\\u5E8F',\n }\n : {}),\n ...(antLocale.Table || {}),\n ...(props.locale || {}),\n }\n })\n\n const scrollTop = ref(0)\n const scrollLeft = ref(0)\n const rootRef = ref<HTMLDivElement>()\n const bodyWidth = ref(0)\n const bodyHeight = ref(0)\n const measureWidthRef = shallowRef<HTMLDivElement>()\n\n const mergedScrollX = eagerComputed(() => props.scrollX ?? props.scroll?.x)\n const mergedScrollY = eagerComputed(() => props.scroll?.y ?? props.height ?? props.maxHeight)\n const bodyScrollWidth = ref(typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0)\n\n watch(mergedScrollX, () => {\n bodyScrollWidth.value = typeof mergedScrollX.value == 'number' ? mergedScrollX.value : 0\n })\n\n const virtual = eagerComputed<boolean>(() => !(props.virtual === false || !mergedScrollY.value))\n const xVirtual = eagerComputed<boolean>(\n () => props.xVirtual || (props.virtual !== false && props.xVirtual !== false),\n )\n\n const getRowKey = computed<GetRowKey>(() =>\n typeof rowKey.value == 'function'\n ? rowKey.value\n : (record: Record<string, any>) => {\n return record?.[rowKey.value as string]\n },\n )\n\n const rawData = shallowRef<DefaultRecordType[]>([])\n const rawColumns = shallowRef<ColumnType[]>([])\n\n let dataSourceWatchStopHandle: WatchStopHandle\n let columnsWatchStopHandle: WatchStopHandle\n watch(\n () => props.deepWatchDataSource,\n () => {\n dataSourceWatchStopHandle && dataSourceWatchStopHandle()\n dataSourceWatchStopHandle = watch(\n () => props.dataSource,\n () => {\n rawData.value = toRaw(props.dataSource) || EMPTY_LIST\n triggerRef(rawData)\n },\n { immediate: true, deep: !!props.deepWatchDataSource },\n )\n },\n { immediate: true, deep: true },\n )\n\n watch(\n () => props.deepWatchColumns,\n () => {\n columnsWatchStopHandle && columnsWatchStopHandle()\n columnsWatchStopHandle = watch(\n () => props.columns,\n () => {\n rawColumns.value = toRaw(props.columns) || EMPTY_LIST\n triggerRef(rawColumns)\n },\n { immediate: true, deep: true },\n )\n },\n { immediate: true, deep: !!props.deepWatchColumns },\n )\n\n const childrenColumnName = computed(() => props.childrenColumnName || 'children')\n\n const { getRecordByKey, getIndexsByKey, getKeyByIndexs, allDataRowKeys, allDataRootRowKeys } =\n useKVMap(rawData, childrenColumnName, getRowKey)\n\n const defaultExpandedRowKeys = shallowRef<Key[]>([])\n watchEffect(() => {\n props.defaultExpandedRowKeys && (defaultExpandedRowKeys.value = props.defaultExpandedRowKeys)\n props.defaultExpandAllRows && (defaultExpandedRowKeys.value = allDataRowKeys.value)\n })\n\n const mergedRowSelection = computed(() => {\n const rowSelection = props.rowSelection || {}\n const { checkStrictly = true } = rowSelection\n return { ...rowSelection, checkStrictly }\n })\n\n const expandedRowKeys = computed(\n () => new Set(props.expandedRowKeys || defaultExpandedRowKeys.value || []),\n )\n\n const spinProps = computed<SpinProps>(() => {\n if (typeof props.loading === 'boolean') {\n return { spinning: props.loading }\n } else if (typeof props.loading === 'object') {\n return { spinning: true, ...props.loading }\n } else {\n return { spinning: false }\n }\n })\n\n onActivated(() => {\n scrollTo({ left: 0, top: 0 })\n })\n\n let triggerOnChange: any = () => {}\n\n const scrollBarSize = shallowRef(getScrollBarSize())\n const baseHeight = computed(() =>\n props.size === 'small' ? 39 : props.size === 'middle' ? 47 : 55,\n )\n const expandedRowRender = computed(() => props.expandedRowRender)\n const expandType = eagerComputed(() =>\n rawData.value.some((column) => column?.[childrenColumnName.value])\n ? 'nest'\n : expandedRowRender.value\n ? 'row'\n : null,\n )\n const expandable = eagerComputed(() => !!props.expandedRowRender)\n\n const columns = useColumns({\n props,\n rawColumns,\n bodyScrollWidth,\n baseHeight,\n measureWidthRef,\n expandable,\n expandType,\n scrollLeft,\n bodyWidth,\n xVirtual,\n draggingColumnKey,\n latestRangeStartCell,\n })\n\n const { sortedData, sorterStates, sorter, changeSorter } = useSorter(\n props,\n rawData,\n columns.allColumns,\n (sorter, sorterStates) => {\n scrollTop.value > bodyHeight.value && updateAnimate()\n triggerOnChange({ sorter, sorterStates }, 'sort', false)\n },\n )\n\n const { filterData, filterStates, filters, changeFilter } = useFilter(\n props,\n sortedData,\n columns.allColumns,\n (filters, filterStates) => {\n triggerOnChange({ filters, filterStates }, 'filter', true)\n },\n )\n\n const total = eagerComputed(() => filterData.value.length)\n const paginationParam = computed(() => {\n if (props.pagination === false) {\n return {}\n }\n return getPaginationParam(props.pagination, mergedPagination.value)\n })\n\n const triggeronPaginationChange = (current: number, pageSize: number) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n props['onUpdate:pagination'] &&\n emit(\n 'update:pagination',\n isReactive(props.pagination)\n ? Object.assign(props.pagination || {}, pagination)\n : pagination,\n )\n }\n\n const {\n mergedPagination,\n pos,\n refreshPagination,\n onChange: onPaginationChange,\n onShowSizeChange,\n pageData,\n } = usePagination(total, props, filterData, (current, pageSize) => {\n const pagination = { ...paginationParam.value, current, pageSize }\n triggeronPaginationChange(current, pageSize)\n updateAnimate()\n triggerOnChange({ pagination }, 'paginate')\n })\n\n const {\n flattenData,\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n getRowFlattenIndexByKey,\n isMyChildren,\n getRowByFlattenIndex,\n } = useFlattenRecords(\n pageData,\n childrenColumnName,\n expandedRowKeys,\n getRowKey,\n expandType,\n mergedRowSelection,\n )\n\n const cal = useCal(props, flattenData, bodyHeight, scrollTop, virtual, keyEntities)\n\n const { rowPosition, viewportHeight, startIndex, endIndex } = cal\n const { leftWidth, rightWidth, centerWidth, bodyMaxWidth } = columns\n\n const selection = useSelection(props, mergedRowSelection, rawData, {\n prefixCls: computed(() => props.prefixCls!),\n pageData,\n getRowKey,\n getRecordByKey,\n childrenColumnName,\n locale,\n flattenData,\n keyEntities,\n checkboxPropsMap,\n allDataRowKeys,\n allDataRootRowKeys,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n })\n\n const bodyRef = ref<HTMLDivElement>()\n let leftRaf: any, topRaf: any\n\n const scrollTo = (options: any = {}, type = 'auto', isAnimate = false) => {\n if (!isAnimate) {\n updateAnimate()\n }\n const mergeOptions = typeof options == 'number' ? { top: options } : options\n let left, top\n if ('left' in mergeOptions) {\n left = mergeOptions.left || 0\n } else if ('columnIndex' in mergeOptions) {\n const position = columns.getColumnPosition(mergeOptions.columnIndex!)\n if (position) {\n left = position.left - leftWidth.value\n }\n } else if ('columnKey' in mergeOptions) {\n const position = columns.getColumnPositionByKey(mergeOptions.columnKey!)\n if (position) {\n left = position.left - leftWidth.value\n }\n }\n if ('top' in mergeOptions) {\n top = Math.min(Math.max(mergeOptions.top || 0, 0), maxScrollTop.value)\n } else if ('rowKey' in mergeOptions) {\n const pos = cal.getRowPositionByKey(mergeOptions.rowKey!)\n if (pos) {\n top = pos\n }\n }\n\n left = Math.max(Math.min(maxScrollLeft.value, left || 0), 0)\n if (!showVerticalScrollbar.value) {\n top = 0\n }\n if (type === 'smooth') {\n if (left !== undefined) {\n raf.cancel(leftRaf)\n leftRaf = easeoutScroll(scrollLeft.value, left, (val: number) => {\n scrollLeft.value = val\n })\n }\n if (top !== undefined) {\n raf.cancel(topRaf)\n topRaf = easeoutScroll(scrollTop.value, top, (val: number) => {\n scrollTop.value = val\n })\n }\n } else {\n if (left !== undefined) {\n scrollLeft.value = left\n }\n if (top !== undefined) {\n scrollTop.value = top\n }\n }\n }\n\n const useAnimate = ref(false)\n const animateRows = computed(() => {\n return !!(props.animateRows ?? globalAnimateRows.value)\n })\n\n let timer: any\n watch(\n animateRows,\n (newVal) => {\n useAnimate.value = newVal\n },\n { immediate: true },\n )\n\n const updateAnimate = () => {\n useAnimate.value = false\n clearTimeout(timer)\n timer = setTimeout(() => {\n useAnimate.value = animateRows.value\n }, 100)\n }\n\n const maxScrollLeft = computed(() => bodyMaxWidth.value - bodyWidth.value)\n const maxScrollTop = computed(() => viewportHeight.value - bodyHeight.value)\n const onScroll = (e) => {\n emit('scroll', e)\n }\n\n useHScrollSyncProvide({ scrollLeft, maxScrollLeft, onScroll, bodyWidth })\n useVScrollSyncProvide({ scrollTop, maxScrollTop, onScroll, updateAnimate, bodyWidth })\n\n const { data, pos: dataRowPosition } = useData(\n props,\n rowPosition,\n flattenData,\n startIndex,\n endIndex,\n draggingRowKey,\n useAnimate,\n getRowFlattenIndexByKey,\n latestRangeStartCell,\n )\n\n const pingedLeft = ref(false)\n const pingedRight = ref(false)\n const noPinged = ref(false)\n\n watchEffect(() => {\n pingedLeft.value = supportSticky && !!scrollLeft.value\n pingedRight.value =\n supportSticky &&\n centerWidth.value - (bodyWidth.value - leftWidth.value - rightWidth.value) >\n scrollLeft.value\n noPinged.value = !pingedLeft.value && !pingedRight.value\n })\n\n const rootClass = computed(() =>\n classNames({\n [`${props.prefixCls}`]: true,\n [`${props.prefixCls}-support-sticky`]: supportSticky,\n [`${props.prefixCls}-stripe`]: props.stripe,\n [`${props.prefixCls}-bordered`]: props.bordered,\n [`${props.prefixCls}-${props.size}`]: true,\n [`${props.prefixCls}-ping-left`]: pingedLeft.value,\n [`${props.prefixCls}-ping-right`]: pingedRight.value,\n [`${props.prefixCls}-no-ping`]: noPinged.value,\n [`${props.prefixCls}-has-animate`]: animateRows.value,\n }),\n )\n const rootStyle = computed(() => ({\n height: typeof props.height == 'number' ? `${props.height}px` : props.height,\n maxHeight: typeof props.maxHeight == 'number' ? `${props.maxHeight}px` : props.maxHeight,\n minHeight: typeof props.minHeight == 'number' ? `${props.minHeight}px` : props.minHeight,\n }))\n\n const showHorizontalScrollbar = ref(false)\n const debounceFn = debounce(() => {\n showHorizontalScrollbar.value = bodyMaxWidth.value > bodyWidth.value\n if (bodyWidth.value > bodyScrollWidth.value) {\n bodyScrollWidth.value = bodyWidth.value\n }\n }, 100)\n\n watch([bodyMaxWidth, bodyWidth], () => {\n debounceFn()\n })\n\n const showVerticalScrollbar = eagerComputed(\n () => !!mergedScrollY.value && bodyHeight.value + 0.9 < viewportHeight.value,\n )\n const scrollToFirstRow = eagerComputed(\n () => !props.scroll || (props.scroll && props.scroll.scrollToFirstRowOnChange !== false),\n )\n\n triggerOnChange = (\n info: Partial<ChangeEventInfo<DefaultRecordType>>,\n action: TableAction,\n reset = false,\n ) => {\n if (reset) {\n refreshPagination()\n triggeronPaginationChange(1, mergedPagination.value.pageSize!)\n if (props.pagination) {\n props.pagination.onChange?.(1, mergedPagination.value.pageSize)\n }\n }\n if (scrollToFirstRow.value) {\n scrollTop.value = 0\n }\n props.onChange?.(\n info.pagination || mergedPagination.value,\n info.filters || filters.value,\n info.sorter || sorter.value,\n {\n currentDataSource: info.currentDataSource || filterData.value,\n action,\n },\n )\n }\n\n const paginationProps = computed(() => {\n return omit(mergedPagination.value, ['position', 'onChange', 'onShowSizeChange'])\n })\n\n const paginationClass = computed(() => {\n return {\n [`${props.prefixCls}-pagination`]: true,\n [`${props.prefixCls}-pagination-${pos.value.bottom}`]: true,\n [`${customUiCls}`]: true,\n }\n })\n const bottomPaginationHeight = ref(0)\n const bottomPaginationStyle = computed<any>(() => {\n if (!props.paginationSticky) {\n return {}\n }\n if (props.paginationSticky === true) {\n return { position: 'sticky', 'z-index': 9, bottom: '0px' }\n }\n return {\n position: 'sticky',\n 'z-index': 9,\n bottom: `${props.paginationSticky?.offsetBottom ?? 0}px`,\n }\n })\n\n const indentSize = computed(() => (typeof props.indentSize == 'number' ? props.indentSize : 15))\n\n const cellProps = useCellProps({\n leftColumns: columns.leftColumns,\n rightColumns: columns.rightColumns,\n visibleCenterColumns: columns.visibleCenterColumns,\n allColumns: columns.allColumns,\n data,\n mergedRowHeights: cal.mergedRowHeights,\n startIndex,\n getColumnPosition: columns.getColumnPosition,\n bodyWidth,\n leftWidth,\n centerWidth,\n getRowHeight: cal.getRowHeight,\n customCell: toRef(props, 'customCell'),\n })\n\n watch(\n [realHeaderHeight, scrollLeft],\n () => {\n popupContainer.value?.alignPopup?.()\n },\n { flush: 'post' },\n )\n\n useProvideTable({\n ...cal,\n ...columns,\n ...cellProps,\n rootRef,\n rawData,\n getRowFlattenIndexByKey,\n prefixCls: computed(() => props.prefixCls!),\n draggingRowKey,\n insertToRowKey,\n status,\n useAnimate,\n animateRows,\n watermarkMsg,\n onResizeColumn: (w: number, col: ColumnType, action: ResizeActionType) => {\n const width = col.width\n const result = props.onResizeColumn?.(w, col, action)\n if (result !== false) {\n if (!(width === w && col.width === w)) {\n col.width = width !== col.width ? col.width : w\n triggerRef(rawColumns)\n }\n if (action === 'end') {\n emit('update:columns', rawColumns.value, 'resize')\n }\n }\n },\n onRowDragEnd: (opt: DragRowEventInfo) => {\n const { insertToRowKey, record, fromIndexs, rowKey, dir, preTargetInfo, nextTargetInfo } =\n opt\n const rawRecord = toRaw(record)\n const dragEnd = props.onRowDragEnd?.({ ...opt, record: rawRecord, fromIndexs })\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (!isMyChildren(rowKey, preTargetInfo?.rowKey as Key) && insertToRowKey !== rowKey) {\n if (insertToRowKey !== null) {\n const parentRecord = getRecordByKey(insertToRowKey)\n if (\n insertToRowKey === preTargetInfo?.rowKey ||\n insertToRowKey === nextTargetInfo?.rowKey\n ) {\n if (dir === DOWN) {\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n parentRecord[childrenColumnName.value],\n [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n } else {\n if (dir === DOWN) {\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs as number[],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n } else {\n if (dir === DOWN && preTargetInfo) {\n addNestItemData(\n rawData.value,\n [preTargetInfo.indexs[0]!],\n childrenColumnName.value,\n rawRecord,\n )\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n } else if (dir === UP && nextTargetInfo) {\n deleteNestItemData(rawData.value, fromIndexs, childrenColumnName.value)\n addNestItemData(\n rawData.value,\n preTargetInfo?.indexs ? [preTargetInfo!.indexs[0]!] : [],\n childrenColumnName.value,\n rawRecord,\n )\n }\n }\n triggerRef(rawData)\n emit('update:dataSource', rawData.value)\n }\n }\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n virtual,\n xVirtual,\n dataRowPosition,\n rawColumns,\n bodyHeight,\n scrollTop,\n scrollLeft,\n supportSticky,\n childrenColumnName,\n bodyScrollWidth,\n baseHeight,\n startIndex,\n data,\n pageData,\n getRecordByKey,\n getIndexsByKey,\n expandType,\n flattenData,\n expandedRowKeys,\n indentSize,\n props,\n bodyWidth,\n scrollTo,\n scrollBarSize,\n leftWidth,\n rightWidth,\n centerWidth,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getRowKey,\n selection,\n updateSelectedRowKeys: (keys: Key[]) => {\n emit('update:selectedRowKeys', keys)\n },\n locale,\n sorterStates,\n changeSorter,\n changeFilter,\n filterStates,\n onTriggerExpand: (record, key: Key) => {\n let keys: Key[]\n const hasKey = expandedRowKeys.value.has(key)\n if (hasKey) {\n expandedRowKeys.value.delete(key)\n keys = [...expandedRowKeys.value]\n } else {\n keys = [...expandedRowKeys.value, key]\n }\n defaultExpandedRowKeys.value = keys\n emit('update:expandedRowKeys', keys)\n emit('expand', !hasKey, record)\n emit('expandedRowsChange', keys)\n },\n keyEntities,\n pageDataRowKeys,\n pageDataEnableRowKeys,\n checkboxPropsMap,\n mergedRowSelection,\n getPopupContainer,\n allDataRowKeys,\n allDataRootRowKeys,\n dragRowsHandle,\n isMyChildren,\n getKeyByIndexs,\n getRowByFlattenIndex,\n draggingColumnKey,\n dragColumnsHandle,\n onColumnDragEnd: (arg: DragColumnEventInfo) => {\n const { dir, column, targetColumn } = arg\n const dragEnd = props.onColumnDragEnd?.(arg)\n if (dragEnd === false) {\n return\n }\n\n const handler = () => {\n if (column === targetColumn || column.key === targetColumn.key) return\n const index = rawColumns.value.findIndex(\n (col) => col === column || col.key === column.key,\n )\n const targetIndex = rawColumns.value.findIndex(\n (col) => col === targetColumn || col.key === targetColumn.key,\n )\n if (dir === LEFT) {\n rawColumns.value.splice(index, 1)\n rawColumns.value.splice(targetIndex, 0, column)\n } else {\n rawColumns.value.splice(targetIndex + 1, 0, column)\n rawColumns.value.splice(index, 1)\n }\n triggerRef(rawColumns)\n emit('update:columns', rawColumns.value, 'drag')\n }\n\n if (isPromise(dragEnd)) {\n dragEnd\n .then(() => {\n handler()\n })\n .catch(() => {})\n } else {\n handler()\n }\n },\n onColumnDrag: () => {},\n columnDrag: computed(() => props.columnDrag),\n summaryFixed: mergedSummaryFixed,\n realHeaderHeight,\n bottomPaginationHeight,\n pos,\n })\n\n const tabGuardTopRef = ref()\n const tabGuardBottomRef = ref()\n\n const {\n navigationService,\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n onBodyKeydown,\n } = useProvideRangeStore({\n allColumns: columns.allColumns,\n flattenData,\n rangeSelection: computed(() => props.rangeSelection),\n getRowByFlattenIndex,\n rootRef,\n prefixCls: computed(() => props.prefixCls!),\n allCellProps: cellProps.allCellProps,\n tabGuardTopRef,\n tabGuardBottomRef,\n ensureCellColumnVisible: (cell: RangeCell) => {\n if (!cell.column || cell.column.fixed) return\n const sl = scrollLeft.value\n const pos = columns.getColumnPositionByKey(cell.column.columnKey)\n if (pos) {\n const { width, left } = pos\n const lw = leftWidth.value\n const rw = rightWidth.value\n left - lw < sl\n ? (scrollLeft.value = left - lw)\n : left + width > sl + bodyWidth.value - rw &&\n (scrollLeft.value = left + width - bodyWidth.value + rw)\n }\n },\n ensureCellRowVisible: (cell: RangeCell) => {\n const { rowIndex } = cell\n const st = scrollTop.value\n const row = getRowByFlattenIndex(rowIndex)\n const pos = cal.getRowPositionByKey(row.rowKey)\n const cprops =\n (cellProps.allCellProps.value[row.rowKey]?.[cell.column!.columnKey] || {}).props || {}\n const height = cal.getRowHeight(rowIndex, cprops.rowSpan)\n if (pos !== undefined) {\n updateAnimate()\n if (pos < st) {\n scrollTop.value = pos\n } else {\n if (pos + height > st + bodyHeight.value) {\n scrollTop.value = pos + height - bodyHeight.value\n }\n }\n }\n },\n latestRangeStartCell,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n scrollLeft,\n scrollTop,\n scrollTo,\n showVerticalScrollbar,\n showHorizontalScrollbar,\n getIndexsByKey,\n formatRangeCellText: (parmas) => {\n if (props.formatRangeCellText) {\n return props.formatRangeCellText(parmas)\n } else if (parmas.value) {\n return parmas.value\n }\n return ''\n },\n editCellKeys,\n copyDelimiter: computed(() => props.copyDelimiter),\n })\n\n expose({\n scrollTo,\n scrollLeft,\n scrollTop,\n bodyRef: computed(() => {\n return (bodyRef.value as any)?.bodyRef\n }),\n getSelectedRange,\n clearAllSelectedRange,\n copySelectedRange,\n appendCellToSelectedRange,\n openEditor: (cellInfos: any[]) => {\n openEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n },\n closeEditor: (cellInfos: any[]) => {\n if (cellInfos) {\n closeEditor(cellInfos.map((info) => `${info.rowKey} ${info.columnKey}`))\n } else {\n closeEditor()\n }\n },\n })\n\n return {\n bodyRef,\n spinProps,\n rowPosition,\n viewportHeight,\n startIndex,\n data,\n watermarkMsg,\n rootStyle,\n rootClass,\n onBodyKeydown,\n watermarkStyle: computed<any>(() => ({\n minWidth: '100px!important',\n minHeight: '40px!important',\n position: 'absolute!important',\n fontSize: '20px!important',\n opacity: '0.8!important',\n bottom: '40px!important',\n right: '40px!important',\n pointerEvents: 'none',\n display: 'block!important',\n zIndex: '999999!important',\n color: '#000000!important',\n margin: '0px!important',\n padding: '0px!important',\n transform: 'unset!important',\n })),\n mergedPagination,\n pos,\n onPaginationChange,\n scrollBarSize,\n scrollTop,\n bodyScrollWidth,\n bodyWidth,\n scrollLeft,\n cal,\n selection,\n locale,\n paginationProps,\n slots,\n mergedScrollX,\n mergedScrollY,\n bodyHeight,\n measureWidthRef,\n flattenData,\n rootRef,\n mergedSummaryFixed,\n handleResize: (e: CustomEvent) => {\n realHeaderHeight.value = e.detail.height\n },\n handlePaginationResize: (e: CustomEvent) => {\n bottomPaginationHeight.value = e.detail.height\n },\n popupContainer,\n handleGuardTopKeydown: (e: KeyboardEvent) => {\n e.keyCode !== KeyCode.TAB ||\n e.shiftKey ||\n (navigationService.getFirstCellToFocus(e.shiftKey), e.preventDefault())\n },\n handleGuardBottomKeydown: (e: KeyboardEvent) => {\n e.keyCode === KeyCode.TAB &&\n e.shiftKey &&\n (navigationService.getLastCellToFocus(e.shiftKey), e.preventDefault())\n },\n tabGuardTopRef,\n tabGuardBottomRef,\n onShowSizeChange,\n customUiCls,\n paginationClass,\n bottomPaginationStyle,\n }\n },\n})\n</script>\n\n<template>\n <TableSlotsContextProvider :value=\"{ ...slots }\">\n <Spin v-bind=\"spinProps\">\n <Pagination\n v-if=\"pos.top\"\n :class=\"`${prefixCls}-pagination ${prefixCls}-pagination-${pos.top} ${customUiCls}`\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n <div\n ref=\"tabGuardTopRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardTopKeydown\"\n ></div>\n <div key=\"content\" ref=\"ref\" :class=\"rootClass\" :style=\"rootStyle\">\n <template v-if=\"showHeader\">\n <AutoHeightHeader\n v-if=\"autoHeaderHeight\"\n :prefix-cls=\"prefixCls\"\n :sticky=\"sticky\"\n @resizeheight=\"handleResize\"\n />\n <ProHeader v-else :prefix-cls=\"prefixCls\" :sticky=\"sticky\" @resizeheight=\"handleResize\" />\n </template>\n <ProBody\n ref=\"bodyRef\"\n v-model:bodyScrollWidth=\"bodyScrollWidth\"\n v-model:bodyWidth=\"bodyWidth\"\n v-model:bodyHeight=\"bodyHeight\"\n :prefix-cls=\"prefixCls\"\n :wrap-text=\"wrapText\"\n :scroll-x=\"mergedScrollX\"\n :height=\"mergedScrollY\"\n :summary-fixed=\"mergedSummaryFixed\"\n :summary=\"$slots.summary\"\n :empty-text=\"$slots.emptyText\"\n @keydown=\"onBodyKeydown\"\n />\n </div>\n <div\n ref=\"tabGuardBottomRef\"\n role=\"presentation\"\n tabindex=\"0\"\n :style=\"{ position: 'absolute', width: '0', height: '0' }\"\n @keydown=\"handleGuardBottomKeydown\"\n ></div>\n <div v-if=\"$slots.footer\" key=\"footer\" :class=\"`${prefixCls}-footer`\">\n <slot name=\"footer\" />\n </div>\n <PopupContainer ref=\"popupContainer\" :prefix-cls=\"prefixCls\" />\n <div\n v-if=\"pos.bottom\"\n v-resize:height\n :style=\"bottomPaginationStyle\"\n :class=\"`${prefixCls}-pagination-wrap`\"\n @resizeheight=\"handlePaginationResize\"\n >\n <Pagination\n :class=\"paginationClass\"\n v-bind=\"paginationProps\"\n @change=\"onPaginationChange\"\n @show-size-change=\"onShowSizeChange\"\n />\n </div>\n </Spin>\n <MeasureWidth ref=\"measureWidthRef\" />\n </TableSlotsContextProvider>\n</template>\n"],"names":["_createBlock","_createVNode","_normalizeProps","_guardReactiveProps","_withCtx","_openBlock","_mergeProps","_createCommentVNode","_createElementVNode","_normalizeClass","_normalizeStyle","_createElementBlock","_Fragment","_renderSlot","_withDirectives"],"mappings":";;;;;;;;;;;;;;;;;;0BA6gCEA,eAAA,CAoE4B,oCAAA,EAAA;AAAA,IApEA,KAAA,EAAK,KAAO,IAAA,CAAA,KAAA;AAAK,GAAA,EAAA;AAAA,yBAC3C,MAiEO;AAAA,MAjEPC,eAAA;AAAA,QAiEO,eAAA;AAAA,QAAAC,kBAAA,CAAAC,sBAAA,CAjEO,IAAA,CAAA,SAAS,CAAA,CAAA;AAAA,QAAA;AAAA,UAAA,OAAA,EAAAC,YACrB,MAME;AAAA,YALM,KAAA,GAAA,CAAI,GAAA,IAAAC,eAAA,EADZL,eAAA,CAME,uBANFM,cAAA,CAME;AAAA,cAAA,GAAA,EAAA,CAAA;AAAA,cAJC,KAAA,EAAK,CAAA,EAAK,IAAA,UAAS,CAAA,YAAA,EAAe,IAAA,CAAA,SAAS,CAAA,YAAA,EAAe,IAAA,CAAA,GAAA,CAAI,GAAG,CAAA,CAAA,EAAI,KAAA,WAAW,CAAA;AAAA,aAAA,EACzE,KAAA,eAAA,EAAe;AAAA,cACtB,UAAQ,IAAA,CAAA,kBAAA;AAAA,cACR,kBAAkB,IAAA,CAAA;AAAA,aAAA,CAAA,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,kBAAA,CAAA,CAAA,IAAAC,sBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;AAAA,YAErBC,sBAAA;AAAA,cAMO,KAAA;AAAA,cAAA;AAAA,gBALL,GAAA,EAAI,gBAAA;AAAA,gBACJ,IAAA,EAAK,cAAA;AAAA,gBACL,QAAA,EAAS,GAAA;AAAA,gBACR,OAA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,CAKE,EAJC,OAAO,IAAA,CAAA,eAAA,EAAe,EACf,IAAA,CAAA,eAAA,EAAe;AAAA,kBACtB,UAAQ,IAAA,CAAA,kBAAA;AAAA,kBACR,kBAAkB,IAAA,CAAA;AAAA,iBAAA,GAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,kBAAA,CAAA;AAAA;;;;0CATZ,QAAM;AAAA,aAAA,CAAA,GAAAC,sBAAA,CAAA,MAAA,EAAA,IAAA;AAAA;;;;;;;MAanBN,eAAA;AAAA,QAAsC,uBAAA;AAAA,QAAA,EAAxB,KAAI,iBAAA,EAAiB;AAAA,QAAA,IAAA;AAAA,QAAA;AAAA;AAAA;AAAA,KAAA,CAAA;AAAA;;;;;;;;"}
|
@@ -41,6 +41,7 @@ var Header = require('./Header/Header.vue.js');
|
|
41
41
|
var Body = require('./Body/Body.vue.js');
|
42
42
|
var resize = require('../../../../directives/resize.js');
|
43
43
|
var index = require('../../../../hooks/use-prefix-cls/index.js');
|
44
|
+
var globals = require('../../../../constants/globals.js');
|
44
45
|
var lodashUnified = require('lodash-unified');
|
45
46
|
var omit = require('../../../../utils/omit.js');
|
46
47
|
var validate = require('../../../../utils/validate.js');
|
@@ -116,7 +117,7 @@ var _sfc_main = vue.defineComponent({
|
|
116
117
|
const locale = vue.computed(() => {
|
117
118
|
const antLocale = (localeData == null ? void 0 : localeData.antLocale) || {};
|
118
119
|
return {
|
119
|
-
...antLocale.locale ===
|
120
|
+
...antLocale.locale === globals.DEFAULT_LOCALE.toLocaleLowerCase() ? {
|
120
121
|
triggerDesc: "\u70B9\u51FB\u964D\u5E8F",
|
121
122
|
triggerAsc: "\u70B9\u51FB\u5347\u5E8F",
|
122
123
|
cancelSort: "\u53D6\u6D88\u6392\u5E8F"
|