cnhis-design-vue 3.1.14-beta.1 → 3.1.14-beta.10
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/README.md +1 -1
- package/es/packages/annotation-edit/index.d.ts +17 -0
- package/es/packages/annotation-edit/index.js +10 -0
- package/es/packages/annotation-edit/src/AnnotationEdit.d.ts +16 -0
- package/es/packages/annotation-edit/src/AnnotationEdit.js +119 -0
- package/es/packages/annotation-edit/style/index.css +15 -0
- package/es/packages/big-table/index.d.ts +2 -9
- package/es/packages/big-table/src/BigTable.vue.d.ts +30 -18
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +53 -25
- package/es/packages/big-table/src/bigTableEmits.js +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +25 -8
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue_vue_type_script_setup_true_lang.js +29 -9
- package/es/packages/big-table/src/components/separate.vue.d.ts +3 -4
- package/es/packages/big-table/src/components/separate.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/packages/big-table/src/hooks/useEdit.d.ts +25 -7
- package/es/packages/big-table/src/hooks/useSeparateRow.d.ts +1 -1
- package/es/packages/big-table/src/hooks/useSeparateRow.js +14 -10
- package/es/packages/big-table/src/utils.js +3 -3
- package/es/packages/big-table/style/index.css +15 -2
- package/es/packages/button-print/index.d.ts +1 -0
- package/es/packages/button-print/index.js +1 -0
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/packages/button-print/src/utils/index.d.ts +1 -0
- package/es/packages/button-print/src/utils/index.js +1 -0
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +1 -1
- package/es/packages/fabric-chart/index.d.ts +7 -2
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +8 -3
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +40 -9
- package/es/packages/fabric-chart/src/hooks/index.d.ts +1 -1
- package/es/packages/fabric-chart/src/hooks/index.js +2 -2
- package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -14
- package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +6 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.js +67 -1
- package/es/packages/fabric-chart/src/hooks/useLeft.js +14 -14
- package/es/packages/fabric-chart/src/hooks/useRight.js +2 -13
- package/es/packages/fabric-chart/src/hooks/useTop.js +10 -20
- package/es/packages/fabric-chart/src/interface.d.ts +7 -0
- package/es/packages/form-render/index.d.ts +1 -1
- package/es/packages/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +1 -1
- package/es/packages/form-render/src/components/renderer/cascader.js +4 -8
- package/es/packages/form-render/src/components/renderer/formItem.js +8 -92
- package/es/packages/form-render/src/components/renderer/input.js +5 -16
- package/es/packages/form-render/src/components/renderer/inputNumber.d.ts +12 -0
- package/es/packages/form-render/src/components/renderer/inputNumber.js +11 -4
- package/es/packages/form-render/src/components/renderer/select.js +9 -2
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +15 -2
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +16 -15
- package/es/packages/form-render/src/hooks/useAnchor.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +3 -3
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +10 -6
- package/es/packages/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/packages/form-render/src/utils/index.d.ts +9 -2
- package/es/packages/form-render/src/utils/index.js +43 -14
- package/es/packages/form-render/style/index.css +17 -15
- package/es/packages/index.css +32 -17
- package/es/packages/index.d.ts +1 -0
- package/es/packages/index.js +1 -0
- package/es/packages/info-header/index.d.ts +1375 -358
- package/es/packages/info-header/src/HiddenContent.vue.d.ts +689 -178
- package/es/packages/info-header/src/HiddenContent.vue_vue_type_script_setup_true_lang.js +11 -13
- package/es/packages/info-header/src/InfoEllipsis.js +4 -0
- package/es/packages/info-header/src/InfoEllipsis.vue.d.ts +833 -0
- package/es/packages/info-header/src/InfoEllipsis.vue_vue_type_script_setup_true_lang.js +41 -0
- package/es/packages/info-header/src/InfoHeader.vue.d.ts +1375 -358
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.js +9 -13
- package/es/{packages/info-header/src → src/components/SlotRender}/SlotRender.d.ts +3 -5
- package/es/{packages/info-header/src → src/components/SlotRender}/SlotRender.js +9 -9
- package/es/src/components/SlotRender/index.d.ts +2 -0
- package/es/src/components/SlotRender/index.js +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../../../es/src/types';
|
|
2
|
+
declare const Annotation: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>> & {
|
|
13
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: string;
|
|
16
|
+
}>>;
|
|
17
|
+
export default Annotation;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { COMPONENT_NAMESPACE } from '../../src/global/variable';
|
|
2
|
+
import { safeComponentRegister } from '../../src/utils';
|
|
3
|
+
import script from './src/AnnotationEdit.js';
|
|
4
|
+
|
|
5
|
+
const Annotation = script;
|
|
6
|
+
Annotation.install = function(app) {
|
|
7
|
+
safeComponentRegister(app, Annotation, COMPONENT_NAMESPACE + "Annotation");
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { Annotation as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}>> & {
|
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
modelValue: string;
|
|
15
|
+
}>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, createVNode, unref } from 'vue';
|
|
2
|
+
import { FileTrayFull, FileTray } from '@vicons/ionicons5';
|
|
3
|
+
import { NPopover, NIcon, NInput } from 'naive-ui';
|
|
4
|
+
|
|
5
|
+
var script = defineComponent({
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(props, {
|
|
14
|
+
emit
|
|
15
|
+
}) {
|
|
16
|
+
const modelValue = computed({
|
|
17
|
+
get() {
|
|
18
|
+
return props.modelValue;
|
|
19
|
+
},
|
|
20
|
+
set(value) {
|
|
21
|
+
emit("update:modelValue", value);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const __showPopper = ref(false);
|
|
25
|
+
const showPopper = computed({
|
|
26
|
+
get() {
|
|
27
|
+
return __showPopper.value;
|
|
28
|
+
},
|
|
29
|
+
async set(value) {
|
|
30
|
+
__showPopper.value = value;
|
|
31
|
+
if (!value && isEdit.value) {
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
33
|
+
isEdit.value = false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const isEdit = ref(false);
|
|
38
|
+
let clickTimer;
|
|
39
|
+
function iconClick() {
|
|
40
|
+
clearTimeout(clickTimer);
|
|
41
|
+
if (showPopper.value && isEdit.value) {
|
|
42
|
+
showPopper.value = false;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
clickTimer = setTimeout(() => {
|
|
46
|
+
if (!unref(modelValue)) {
|
|
47
|
+
isEdit.value = showPopper.value = true;
|
|
48
|
+
}
|
|
49
|
+
}, 200);
|
|
50
|
+
}
|
|
51
|
+
function iconDbClick() {
|
|
52
|
+
clearTimeout(clickTimer);
|
|
53
|
+
if (!unref(modelValue))
|
|
54
|
+
return;
|
|
55
|
+
showPopper.value = true;
|
|
56
|
+
isEdit.value = true;
|
|
57
|
+
}
|
|
58
|
+
function iconMouseenter() {
|
|
59
|
+
if (!unref(modelValue))
|
|
60
|
+
return;
|
|
61
|
+
showPopper.value = true;
|
|
62
|
+
}
|
|
63
|
+
function iconMouseleave() {
|
|
64
|
+
if (!unref(modelValue) || isEdit.value)
|
|
65
|
+
return;
|
|
66
|
+
showPopper.value = false;
|
|
67
|
+
}
|
|
68
|
+
function renderAnnotation() {
|
|
69
|
+
return createVNode("section", {
|
|
70
|
+
"class": ["annotation-edit", {
|
|
71
|
+
"is-active": !!unref(modelValue)
|
|
72
|
+
}],
|
|
73
|
+
"style": {
|
|
74
|
+
"--icon-right": "-5"
|
|
75
|
+
},
|
|
76
|
+
"annotation-hover-show": !unref(modelValue) && !isEdit.value
|
|
77
|
+
}, [createVNode(NPopover, {
|
|
78
|
+
"style": {
|
|
79
|
+
maxWidth: "200px",
|
|
80
|
+
wordBreak: "break-all"
|
|
81
|
+
},
|
|
82
|
+
"show": showPopper.value,
|
|
83
|
+
"onUpdate:show": ($event) => showPopper.value = $event,
|
|
84
|
+
"trigger": "manual",
|
|
85
|
+
"duration": 100
|
|
86
|
+
}, {
|
|
87
|
+
default: renderDefault,
|
|
88
|
+
trigger: renderTrigger
|
|
89
|
+
})]);
|
|
90
|
+
function renderText() {
|
|
91
|
+
return createVNode("span", null, [unref(modelValue)]);
|
|
92
|
+
}
|
|
93
|
+
function renderTextarea() {
|
|
94
|
+
return createVNode(NInput, {
|
|
95
|
+
"type": "textarea",
|
|
96
|
+
"value": modelValue.value,
|
|
97
|
+
"onUpdate:value": ($event) => modelValue.value = $event
|
|
98
|
+
}, null);
|
|
99
|
+
}
|
|
100
|
+
function renderDefault() {
|
|
101
|
+
return createVNode("div", null, [isEdit.value ? renderTextarea() : renderText()]);
|
|
102
|
+
}
|
|
103
|
+
function renderTrigger() {
|
|
104
|
+
return createVNode("div", {
|
|
105
|
+
"class": "annotation-edit__icon",
|
|
106
|
+
"onMouseleave": iconMouseleave,
|
|
107
|
+
"onMouseenter": iconMouseenter,
|
|
108
|
+
"onDblclick": iconDbClick,
|
|
109
|
+
"onClick": iconClick
|
|
110
|
+
}, [createVNode(NIcon, {
|
|
111
|
+
"component": unref(modelValue) ? FileTrayFull : FileTray
|
|
112
|
+
}, null)]);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return renderAnnotation;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export { script as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.annotation-edit {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
color: #0067ee;
|
|
4
|
+
font-size: 16px;
|
|
5
|
+
user-select: none;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.annotation-edit.is-active {
|
|
10
|
+
color: rgba(255, 152, 40);
|
|
11
|
+
}
|
|
12
|
+
.annotation-edit__icon {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
@@ -2928,6 +2928,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2928
2928
|
handleFilterSearchChange: (value: any, columnName: any, field: any) => void;
|
|
2929
2929
|
handleFilterClearAll: (field: any) => void;
|
|
2930
2930
|
handleCancelFilter: () => void;
|
|
2931
|
+
mergeQuickSearchConfig: (filterFields: any, props: any) => void;
|
|
2931
2932
|
handleFilter: (field: any) => void;
|
|
2932
2933
|
onmousedownFunc: (e: any) => void;
|
|
2933
2934
|
maskInsert: () => void;
|
|
@@ -2952,15 +2953,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2952
2953
|
}) => Promise<any>;
|
|
2953
2954
|
getAsyncTableData: (params: any) => Promise<void>;
|
|
2954
2955
|
setChecklist: (list: any) => any;
|
|
2955
|
-
colspanMethod: (
|
|
2956
|
-
row: any;
|
|
2957
|
-
column: any;
|
|
2958
|
-
_rowIndex: any;
|
|
2959
|
-
_columnIndex: any;
|
|
2960
|
-
}) => {
|
|
2961
|
-
rowspan: number;
|
|
2962
|
-
colspan: number;
|
|
2963
|
-
} | undefined;
|
|
2956
|
+
colspanMethod: (payload: any) => any;
|
|
2964
2957
|
footerRowspanMethod: (obj: any) => {
|
|
2965
2958
|
rowspan: number;
|
|
2966
2959
|
colspan: number;
|
|
@@ -1084,9 +1084,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1084
1084
|
textColorDisabledSuccess: string;
|
|
1085
1085
|
textColorTextSuccess: string;
|
|
1086
1086
|
textColorTextHoverSuccess: string;
|
|
1087
|
-
textColorTextPressedSuccess: string;
|
|
1088
|
-
* 删除选中scan数据
|
|
1089
|
-
*/
|
|
1087
|
+
textColorTextPressedSuccess: string;
|
|
1090
1088
|
textColorTextFocusSuccess: string;
|
|
1091
1089
|
textColorTextDisabledSuccess: string;
|
|
1092
1090
|
textColorGhostSuccess: string;
|
|
@@ -1153,7 +1151,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1153
1151
|
borderDisabledError: string;
|
|
1154
1152
|
rippleColorError: string;
|
|
1155
1153
|
waveOpacity: string;
|
|
1156
|
-
fontWeight: string;
|
|
1154
|
+
fontWeight: string; /**
|
|
1155
|
+
* 初始化props
|
|
1156
|
+
* @param {*} unionItem
|
|
1157
|
+
* @param {*} row
|
|
1158
|
+
* @param {*} column
|
|
1159
|
+
* @param {*} $rowIndex
|
|
1160
|
+
* @returns
|
|
1161
|
+
*/
|
|
1157
1162
|
fontWeightStrong: string;
|
|
1158
1163
|
paddingTiny: string;
|
|
1159
1164
|
paddingSmall: string;
|
|
@@ -1246,7 +1251,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1246
1251
|
textColorGhostPressedPrimary: string;
|
|
1247
1252
|
textColorGhostFocusPrimary: string;
|
|
1248
1253
|
textColorGhostDisabledPrimary: string;
|
|
1249
|
-
borderPrimary: string;
|
|
1254
|
+
borderPrimary: string; /**
|
|
1255
|
+
* tsx渲染表格
|
|
1256
|
+
*/
|
|
1250
1257
|
borderHoverPrimary: string;
|
|
1251
1258
|
borderPressedPrimary: string;
|
|
1252
1259
|
borderFocusPrimary: string;
|
|
@@ -2928,6 +2935,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2928
2935
|
handleFilterSearchChange: (value: any, columnName: any, field: any) => void;
|
|
2929
2936
|
handleFilterClearAll: (field: any) => void;
|
|
2930
2937
|
handleCancelFilter: () => void;
|
|
2938
|
+
mergeQuickSearchConfig: (filterFields: any, props: any) => void;
|
|
2931
2939
|
handleFilter: (field: any) => void;
|
|
2932
2940
|
onmousedownFunc: (e: any) => void;
|
|
2933
2941
|
maskInsert: () => void;
|
|
@@ -2952,15 +2960,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2952
2960
|
}) => Promise<any>;
|
|
2953
2961
|
getAsyncTableData: (params: any) => Promise<void>;
|
|
2954
2962
|
setChecklist: (list: any) => any;
|
|
2955
|
-
colspanMethod: (
|
|
2956
|
-
row: any;
|
|
2957
|
-
column: any;
|
|
2958
|
-
_rowIndex: any;
|
|
2959
|
-
_columnIndex: any;
|
|
2960
|
-
}) => {
|
|
2961
|
-
rowspan: number;
|
|
2962
|
-
colspan: number;
|
|
2963
|
-
} | undefined;
|
|
2963
|
+
colspanMethod: (payload: any) => any;
|
|
2964
2964
|
footerRowspanMethod: (obj: any) => {
|
|
2965
2965
|
rowspan: number;
|
|
2966
2966
|
colspan: number;
|
|
@@ -3291,7 +3291,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3291
3291
|
buttonColor2: string;
|
|
3292
3292
|
buttonColor2Hover: string;
|
|
3293
3293
|
buttonColor2Pressed: string;
|
|
3294
|
-
boxShadow1: string;
|
|
3294
|
+
boxShadow1: string; /**
|
|
3295
|
+
* 针对 bigTable 的设置列
|
|
3296
|
+
* type: 列的类型
|
|
3297
|
+
* field: 列字段名(注:属性层级越深,渲染性能将直线下降)
|
|
3298
|
+
* title: 列标题(支持开启国际化)
|
|
3299
|
+
* width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
|
|
3300
|
+
* minWidth: 最小列宽度;会自动将剩余空间按比例分配
|
|
3301
|
+
* resizable: 列是否允许拖动列宽调整大小
|
|
3302
|
+
* visible: 列是否显示
|
|
3303
|
+
* fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
|
|
3304
|
+
* align: 列对齐方式
|
|
3305
|
+
* headerAlign: 表头列的对齐方式
|
|
3306
|
+
* footerAlign: 表尾列的对齐方式
|
|
3307
|
+
* formatter: 格式化显示内容 Function({cellValue, row, column})
|
|
3308
|
+
* sortable: 是否允许列排序
|
|
3309
|
+
*/
|
|
3295
3310
|
boxShadow2: string;
|
|
3296
3311
|
boxShadow3: string;
|
|
3297
3312
|
fontFamily: string;
|
|
@@ -4042,9 +4057,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4042
4057
|
readonly color: StringConstructor;
|
|
4043
4058
|
readonly component: import("vue").PropType<import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
4044
4059
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Icon", {
|
|
4045
|
-
/**
|
|
4046
|
-
* computed
|
|
4047
|
-
*/
|
|
4048
4060
|
color: string;
|
|
4049
4061
|
opacity1Depth: string;
|
|
4050
4062
|
opacity2Depth: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, mergeProps, withCtx, renderSlot, createBlock, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
|
|
2
|
+
import { isArray, isFunction } from 'lodash-es';
|
|
2
3
|
import { useSeparateRow } from '../../../packages/big-table/src/hooks/useSeparateRow';
|
|
3
4
|
import bigTableState from './bigTableState.js';
|
|
4
5
|
import bigTableProps from './bigTableProps.js';
|
|
@@ -13,10 +14,10 @@ import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline } from
|
|
|
13
14
|
import './components/NoData.js';
|
|
14
15
|
import TextOverTooltip from '../../../src/components/TextOverTooltip';
|
|
15
16
|
import SvgIcon from '../../../src/components/SvgIcon';
|
|
16
|
-
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NSpace, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
17
|
+
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NSpace, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
17
18
|
import CGrid from '../../../packages/grid';
|
|
18
19
|
import vexutils from '../../../src/utils/vexutils';
|
|
19
|
-
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap,
|
|
20
|
+
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, handleTableImageSize, visibleMethod, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } from './utils.js';
|
|
20
21
|
import './components/input-button.js';
|
|
21
22
|
import './components/separate.js';
|
|
22
23
|
import xb_big from '../../../src/assets/img/xb_big';
|
|
@@ -251,6 +252,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
251
252
|
} = useSeparateRow(() => {
|
|
252
253
|
var _a, _b;
|
|
253
254
|
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) != null ? _b : [];
|
|
255
|
+
}, (columnName) => {
|
|
256
|
+
var _a, _b;
|
|
257
|
+
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) == null ? void 0 : _b.find((field) => field.columnName === columnName);
|
|
254
258
|
}, xGrid);
|
|
255
259
|
const onResizableChange = (payload) => {
|
|
256
260
|
onColumnResize(payload);
|
|
@@ -539,8 +543,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
539
543
|
index: $rowIndex,
|
|
540
544
|
type: formType,
|
|
541
545
|
onFormChange,
|
|
542
|
-
|
|
543
|
-
emit("
|
|
546
|
+
onClick: () => {
|
|
547
|
+
emit("formClick", {
|
|
544
548
|
value: row[col.columnName],
|
|
545
549
|
row,
|
|
546
550
|
column: col,
|
|
@@ -768,7 +772,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
768
772
|
height: state.filterHeight + state.distance + "px"
|
|
769
773
|
}
|
|
770
774
|
}, [!field.searchFilterText ? createVNode("div", {
|
|
771
|
-
"class": "
|
|
775
|
+
"class": "sort-item"
|
|
772
776
|
}, [createVNode(NCheckbox, {
|
|
773
777
|
"indeterminate": field.indeterminate,
|
|
774
778
|
"checked": field.checkAll,
|
|
@@ -781,13 +785,17 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
781
785
|
"value": field.CONVERT,
|
|
782
786
|
"onUpdate:value": (val) => handleFilterChange(val, item.columnName, field)
|
|
783
787
|
}, {
|
|
784
|
-
default: () => [createVNode(
|
|
785
|
-
"
|
|
788
|
+
default: () => [createVNode(NGrid, {
|
|
789
|
+
"cols": 1
|
|
786
790
|
}, _isSlot(_slot = field.filterItems.map((item2) => {
|
|
787
|
-
return createVNode(
|
|
788
|
-
"
|
|
789
|
-
|
|
790
|
-
|
|
791
|
+
return createVNode(NGi, {
|
|
792
|
+
"class": "sort-item"
|
|
793
|
+
}, {
|
|
794
|
+
default: () => [createVNode(NCheckbox, {
|
|
795
|
+
"value": item2.value,
|
|
796
|
+
"label": item2.key
|
|
797
|
+
}, null)]
|
|
798
|
+
});
|
|
791
799
|
})) ? _slot : {
|
|
792
800
|
default: () => [_slot]
|
|
793
801
|
})]
|
|
@@ -824,11 +832,13 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
824
832
|
}, {
|
|
825
833
|
default: () => [createTextVNode("\u6E05\u7A7A")]
|
|
826
834
|
})]) : null, createVNode("div", null, [createVNode(NButton, {
|
|
835
|
+
"size": "small",
|
|
827
836
|
"class": "checkbox-btn",
|
|
828
837
|
"onClick": () => handleCancelFilter()
|
|
829
838
|
}, {
|
|
830
839
|
default: () => [createTextVNode("\u53D6\u6D88")]
|
|
831
840
|
}), createVNode(NButton, {
|
|
841
|
+
"size": "small",
|
|
832
842
|
"class": "checkbox-btn",
|
|
833
843
|
"type": "primary",
|
|
834
844
|
"onClick": () => handleFilter(field)
|
|
@@ -875,7 +885,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
875
885
|
};
|
|
876
886
|
const handleFilterChange = (value, name, field) => {
|
|
877
887
|
reScrollFilterWrap();
|
|
878
|
-
|
|
888
|
+
field.CONVERT = value;
|
|
879
889
|
field.checkAll = value.length === field.filterItems.length;
|
|
880
890
|
field.indeterminate = !!value.length && value.length !== field.filterItems.length;
|
|
881
891
|
};
|
|
@@ -910,8 +920,20 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
910
920
|
const handleCancelFilter = () => {
|
|
911
921
|
hideFilterWrap(state, props);
|
|
912
922
|
};
|
|
923
|
+
function mergeQuickSearchConfig(filterFields, props2) {
|
|
924
|
+
if (!isArray(props2.quickSearchConfig))
|
|
925
|
+
return;
|
|
926
|
+
props2.quickSearchConfig.length = 0;
|
|
927
|
+
Object.entries(filterFields).forEach(([field_key, filterField]) => {
|
|
928
|
+
props2.quickSearchConfig.push({
|
|
929
|
+
field_key,
|
|
930
|
+
value: filterField.CONVERT || []
|
|
931
|
+
});
|
|
932
|
+
});
|
|
933
|
+
}
|
|
913
934
|
const handleFilter = (field) => {
|
|
914
935
|
let conObj = mergeConObjFn(state, props);
|
|
936
|
+
mergeQuickSearchConfig(state.filterFields, props);
|
|
915
937
|
emit("onSave", conObj, false, [], [], {
|
|
916
938
|
isBigTable: true
|
|
917
939
|
});
|
|
@@ -1121,13 +1143,18 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
1121
1143
|
};
|
|
1122
1144
|
});
|
|
1123
1145
|
};
|
|
1124
|
-
const colspanMethod = ({
|
|
1125
|
-
row,
|
|
1126
|
-
column,
|
|
1127
|
-
_rowIndex,
|
|
1128
|
-
_columnIndex
|
|
1129
|
-
}) => {
|
|
1146
|
+
const colspanMethod = (payload) => {
|
|
1130
1147
|
var _a;
|
|
1148
|
+
const {
|
|
1149
|
+
row,
|
|
1150
|
+
column,
|
|
1151
|
+
_rowIndex,
|
|
1152
|
+
_columnIndex
|
|
1153
|
+
} = payload;
|
|
1154
|
+
if (isFunction(attr.spanMethod))
|
|
1155
|
+
return attr.spanMethod(payload);
|
|
1156
|
+
if (isFunction(attr["span-method"]))
|
|
1157
|
+
return attr["span-method"](payload);
|
|
1131
1158
|
if (state.isTree != 3) {
|
|
1132
1159
|
return {
|
|
1133
1160
|
rowspan: 1,
|
|
@@ -1287,6 +1314,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
1287
1314
|
updateAddCheckedRows(row);
|
|
1288
1315
|
};
|
|
1289
1316
|
const handlerClickRow = (data) => {
|
|
1317
|
+
var _a;
|
|
1318
|
+
if (((_a = attr.checkboxConfig) == null ? void 0 : _a.trigger) === "default")
|
|
1319
|
+
return false;
|
|
1290
1320
|
if (isScanMultiTable.value || props.isInlineOperating)
|
|
1291
1321
|
return false;
|
|
1292
1322
|
if (vexutils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
|
|
@@ -2125,11 +2155,6 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
2125
2155
|
watch(() => currentCheckedKeys, (val) => {
|
|
2126
2156
|
setVisibleCheckAllWrap(state, props, currentCheckedKeys.value);
|
|
2127
2157
|
});
|
|
2128
|
-
watch(() => props.quickSearchConfig, (val) => {
|
|
2129
|
-
setFilterStatus(state, props);
|
|
2130
|
-
}, {
|
|
2131
|
-
deep: true
|
|
2132
|
-
});
|
|
2133
2158
|
watch(() => props.tableDataCache, (val) => {
|
|
2134
2159
|
setAllCheckedRows(val);
|
|
2135
2160
|
}, {
|
|
@@ -2239,7 +2264,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
2239
2264
|
const handleMenuClickEvent = (payload) => emit("menuClick", payload);
|
|
2240
2265
|
expose({
|
|
2241
2266
|
formatData,
|
|
2242
|
-
xGrid
|
|
2267
|
+
xGrid,
|
|
2268
|
+
loadColumn,
|
|
2269
|
+
loadData
|
|
2243
2270
|
});
|
|
2244
2271
|
return (_ctx, _cache) => {
|
|
2245
2272
|
return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(` <div
|
|
@@ -2296,7 +2323,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
2296
2323
|
visibleMethod: unref(visibleMethod),
|
|
2297
2324
|
trigger: "cell",
|
|
2298
2325
|
reserve: true,
|
|
2299
|
-
highlight: true
|
|
2326
|
+
highlight: true,
|
|
2327
|
+
..._ctx.$attrs.checkboxConfig || {}
|
|
2300
2328
|
},
|
|
2301
2329
|
"radio-config": {
|
|
2302
2330
|
checkField: "checked",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../../es/src/types';
|
|
2
2
|
import { CSSProperties, PropType } from 'vue';
|
|
3
|
-
import { VxeTableDefines } from 'vxe-table';
|
|
4
3
|
declare const _default: import("vue").DefineComponent<{
|
|
5
4
|
col: {
|
|
6
|
-
type: PropType<
|
|
5
|
+
type: PropType<AnyObject>;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
row: {
|
|
@@ -17,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
16
|
}, {
|
|
18
17
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
19
18
|
col: {
|
|
20
|
-
type: PropType<
|
|
19
|
+
type: PropType<AnyObject>;
|
|
21
20
|
required: true;
|
|
22
21
|
};
|
|
23
22
|
row: {
|
|
@@ -31,16 +30,34 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
30
|
}>> & {
|
|
32
31
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
33
32
|
}>>;
|
|
33
|
+
popoverRef: import("vue").Ref<any>;
|
|
34
34
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
35
|
+
editContent: import("vue").Ref<any>;
|
|
35
36
|
getRowData: (row: AnyObject) => {
|
|
36
37
|
separateData: Record<string, string>;
|
|
37
38
|
index: number;
|
|
38
39
|
rawRow: AnyObject;
|
|
39
40
|
row: AnyObject;
|
|
40
41
|
} | undefined;
|
|
41
|
-
editContent: import("vue").Ref<string>;
|
|
42
42
|
updateShow: (show: boolean) => void;
|
|
43
43
|
style: CSSProperties;
|
|
44
|
+
SlotRender: import("vue").DefineComponent<{
|
|
45
|
+
renderer: {
|
|
46
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/src/types").Func<any[], any>>;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
rootSlots: {
|
|
50
|
+
type: PropType<Record<string, import("../../../../../../es/src/types").Func<any[], any>>>;
|
|
51
|
+
};
|
|
52
|
+
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
renderer: {
|
|
54
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../../../es/src/types").Func<any[], any>>;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
rootSlots: {
|
|
58
|
+
type: PropType<Record<string, import("../../../../../../es/src/types").Func<any[], any>>>;
|
|
59
|
+
};
|
|
60
|
+
}>>, {}>;
|
|
44
61
|
NPopover: import("vue").DefineComponent<{
|
|
45
62
|
internalOnAfterLeave: PropType<() => void>;
|
|
46
63
|
internalRenderBody: PropType<import("naive-ui/es/popover/src/interface").InternalRenderBody>;
|
|
@@ -1191,7 +1208,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1191
1208
|
}>;
|
|
1192
1209
|
Separate: import("vue").DefineComponent<{
|
|
1193
1210
|
col: {
|
|
1194
|
-
type: PropType<
|
|
1211
|
+
type: PropType<AnyObject>;
|
|
1195
1212
|
required: true;
|
|
1196
1213
|
};
|
|
1197
1214
|
row: {
|
|
@@ -1201,7 +1218,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1201
1218
|
}, {
|
|
1202
1219
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
1203
1220
|
col: {
|
|
1204
|
-
type: PropType<
|
|
1221
|
+
type: PropType<AnyObject>;
|
|
1205
1222
|
required: true;
|
|
1206
1223
|
};
|
|
1207
1224
|
row: {
|
|
@@ -1220,7 +1237,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1220
1237
|
displayContent: import("vue").ComputedRef<string>;
|
|
1221
1238
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1222
1239
|
col: {
|
|
1223
|
-
type: PropType<
|
|
1240
|
+
type: PropType<AnyObject>;
|
|
1224
1241
|
required: true;
|
|
1225
1242
|
};
|
|
1226
1243
|
row: {
|
|
@@ -1230,7 +1247,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1230
1247
|
}>>, {}>;
|
|
1231
1248
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1232
1249
|
col: {
|
|
1233
|
-
type: PropType<
|
|
1250
|
+
type: PropType<AnyObject>;
|
|
1234
1251
|
required: true;
|
|
1235
1252
|
};
|
|
1236
1253
|
row: {
|