cnhis-design-vue 3.1.33-beta.0 → 3.1.33-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 +123 -123
- package/es/components/big-table/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +8 -8
- package/es/components/big-table/src/components/edit-form/edit-time.js +7 -4
- package/es/components/fabric-chart/index.d.ts +389 -181
- package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +181 -0
- package/es/components/fabric-chart/src/BirthProcessChart.vue.js +171 -0
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +390 -182
- package/es/components/fabric-chart/src/FabricChart.vue.js +21 -327
- package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +214 -0
- package/es/components/fabric-chart/src/TemperatureChart.vue.js +358 -0
- package/es/components/fabric-chart/src/components/PopupMenu.js +2 -2
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +3 -2
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +2 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +26 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +419 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/useCenter.js +4 -37
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +5 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +16 -0
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +9 -2
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +34 -1
- package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useGrid.js +28 -18
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +3 -1
- package/es/components/fabric-chart/src/interface.d.ts +24 -6
- package/es/components/fabric-chart/src/interface.js +0 -3
- package/es/components/fabric-chart/src/utils/utils.d.ts +11 -0
- package/es/components/fabric-chart/src/utils/utils.js +27 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.js +5 -1
- package/es/components/form-render/src/components/renderer/radio.js +10 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +0 -6
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +14 -8
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/iho-table/index.d.ts +1 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.js +7 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +11 -0
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +26 -0
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +17 -12
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +16 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +8 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +9 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +11 -24
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +8 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +10 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +10 -23
- package/es/components/iho-table/src/types/index.d.ts +6 -1
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +4 -0
- package/es/components/iho-table/src/types/pluginType.js +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +10 -0
- package/es/components/iho-table/src/utils/index.js +34 -7
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.js +72 -56
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/shortcut-provider/src/utils/index.d.ts +0 -1
- package/es/components/shortcut-provider/src/utils/index.js +26 -3
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +3 -0
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createVNode, mergeProps } from 'vue';
|
|
|
2
2
|
import { NInput } from 'naive-ui';
|
|
3
3
|
import '../../../../index.js';
|
|
4
4
|
import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { IhoTableRenderHelper } from '../../../utils/index.js';
|
|
6
6
|
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
7
|
|
|
8
8
|
function inputRendererPlugin() {
|
|
@@ -11,34 +11,21 @@ function inputRendererPlugin() {
|
|
|
11
11
|
name: pluginName,
|
|
12
12
|
vxe(instance) {
|
|
13
13
|
instance.renderer.add(EDITABLE_WIDGET_TYPE.INPUT, {
|
|
14
|
-
renderCell(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}) {
|
|
18
|
-
return [createVNode("span", null, [row[column.field]])];
|
|
19
|
-
},
|
|
20
|
-
renderEdit({
|
|
21
|
-
props
|
|
22
|
-
}, {
|
|
14
|
+
renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
|
|
15
|
+
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
16
|
+
fieldItem,
|
|
23
17
|
row,
|
|
24
18
|
column,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
emitFormClick,
|
|
29
|
-
emitFormChange
|
|
30
|
-
} = useIhoTableFormEvent({
|
|
31
|
-
row,
|
|
32
|
-
column,
|
|
33
|
-
$rowIndex
|
|
34
|
-
});
|
|
19
|
+
emitFormChange,
|
|
20
|
+
emitFormClick
|
|
21
|
+
}) => {
|
|
35
22
|
return [createVNode(NInput, mergeProps({
|
|
36
23
|
"value": row[column.field],
|
|
37
24
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
38
25
|
"onBlur": emitFormChange,
|
|
39
26
|
"onClick": emitFormClick
|
|
40
|
-
},
|
|
41
|
-
}
|
|
27
|
+
}, fieldItem.componentProps), null)];
|
|
28
|
+
})
|
|
42
29
|
});
|
|
43
30
|
}
|
|
44
31
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createVNode, mergeProps } from 'vue';
|
|
|
2
2
|
import { NInputNumber } from 'naive-ui';
|
|
3
3
|
import '../../../../index.js';
|
|
4
4
|
import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { IhoTableRenderHelper } from '../../../utils/index.js';
|
|
6
6
|
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
7
|
|
|
8
8
|
function numberRendererPlugin() {
|
|
@@ -11,33 +11,20 @@ function numberRendererPlugin() {
|
|
|
11
11
|
name: pluginName,
|
|
12
12
|
vxe(instance) {
|
|
13
13
|
instance.renderer.add(EDITABLE_WIDGET_TYPE.NUMBER, {
|
|
14
|
-
renderCell(
|
|
15
|
-
|
|
16
|
-
column
|
|
17
|
-
}) {
|
|
18
|
-
return [createVNode("span", null, [row[column.field]])];
|
|
19
|
-
},
|
|
20
|
-
renderEdit({
|
|
21
|
-
props
|
|
22
|
-
}, {
|
|
14
|
+
renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
|
|
15
|
+
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
23
16
|
row,
|
|
24
17
|
column,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
createCustomEvent
|
|
31
|
-
} = useIhoTableFormEvent({
|
|
32
|
-
row,
|
|
33
|
-
column,
|
|
34
|
-
$rowIndex
|
|
35
|
-
});
|
|
18
|
+
fieldItem,
|
|
19
|
+
emitFormClick,
|
|
20
|
+
emitFormChange,
|
|
21
|
+
createCustomEvent
|
|
22
|
+
}) => {
|
|
36
23
|
const {
|
|
37
24
|
placeholder = "\u8BF7\u8F93\u5165"
|
|
38
|
-
} =
|
|
25
|
+
} = fieldItem.componentProps || {};
|
|
39
26
|
const config = {
|
|
40
|
-
...
|
|
27
|
+
...fieldItem.componentProps || {},
|
|
41
28
|
clearable: true,
|
|
42
29
|
placeholder,
|
|
43
30
|
onBlur: createCustomEvent("formChange", {
|
|
@@ -50,7 +37,7 @@ function numberRendererPlugin() {
|
|
|
50
37
|
"value": row[column.field],
|
|
51
38
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
52
39
|
}, config), null)];
|
|
53
|
-
}
|
|
40
|
+
})
|
|
54
41
|
});
|
|
55
42
|
}
|
|
56
43
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createVNode, mergeProps } from 'vue';
|
|
2
2
|
import '../../../../../index.js';
|
|
3
3
|
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { IhoTableRenderHelper } from '../../../../utils/index.js';
|
|
5
5
|
import EditSelect from './editSelect.js';
|
|
6
6
|
import { getDefaultValue } from './selectUtils.js';
|
|
7
7
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
@@ -15,26 +15,18 @@ function selectRendererPlugin() {
|
|
|
15
15
|
renderCell({
|
|
16
16
|
props
|
|
17
17
|
}, {
|
|
18
|
-
row
|
|
19
|
-
column
|
|
18
|
+
row
|
|
20
19
|
}) {
|
|
21
20
|
return [createVNode("span", null, [getDefaultValue(row, props)])];
|
|
22
21
|
},
|
|
23
|
-
renderEdit({
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
23
|
+
fieldItem,
|
|
24
|
+
emitFormClick,
|
|
26
25
|
row,
|
|
27
26
|
column,
|
|
28
27
|
$rowIndex
|
|
29
|
-
}) {
|
|
30
|
-
|
|
31
|
-
emitFormClick
|
|
32
|
-
} = useIhoTableFormEvent({
|
|
33
|
-
row,
|
|
34
|
-
column,
|
|
35
|
-
$rowIndex
|
|
36
|
-
});
|
|
37
|
-
return [createVNode(EditSelect, mergeProps((props == null ? void 0 : props.componentProps) || {}, {
|
|
28
|
+
}) => {
|
|
29
|
+
return [createVNode(EditSelect, mergeProps(fieldItem.componentProps, {
|
|
38
30
|
"column": column,
|
|
39
31
|
"row": row,
|
|
40
32
|
"index": $rowIndex,
|
|
@@ -42,7 +34,7 @@ function selectRendererPlugin() {
|
|
|
42
34
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
43
35
|
"onClick": emitFormClick
|
|
44
36
|
}), null)];
|
|
45
|
-
}
|
|
37
|
+
})
|
|
46
38
|
});
|
|
47
39
|
}
|
|
48
40
|
});
|
|
@@ -3,7 +3,7 @@ import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
|
3
3
|
import { isFunction, isObject } from 'lodash-es';
|
|
4
4
|
import '../../../../../index.js';
|
|
5
5
|
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { IhoTableRenderHelper, getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
7
7
|
import { isSeparateColumn, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
|
|
8
8
|
import EditSeparate from './editSeparate.vue.js';
|
|
9
9
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
@@ -35,27 +35,21 @@ function separateRendererPlugins() {
|
|
|
35
35
|
};
|
|
36
36
|
return createVNode("section", null, [separateRow.separateData[column.field]]);
|
|
37
37
|
},
|
|
38
|
-
renderEdit(
|
|
38
|
+
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
39
|
+
fieldItem,
|
|
39
40
|
column,
|
|
40
41
|
row,
|
|
41
|
-
|
|
42
|
-
}) {
|
|
43
|
-
var _a
|
|
42
|
+
emitFormClick
|
|
43
|
+
}) => {
|
|
44
|
+
var _a;
|
|
44
45
|
const uuid = inject(InjectionIhoTableUUID);
|
|
45
46
|
const separateRow = getSeparateRowData(uuid, row);
|
|
46
47
|
const height = getRowHeight();
|
|
47
48
|
const slots = {};
|
|
48
|
-
if (
|
|
49
|
-
const separate = toRaw(
|
|
49
|
+
if (fieldItem.separateSlot) {
|
|
50
|
+
const separate = toRaw(fieldItem.separateSlot);
|
|
50
51
|
slots.menu = isFunction(separate) ? separate : isObject(separate) ? (props) => h(separate, props) : void 0;
|
|
51
52
|
}
|
|
52
|
-
const {
|
|
53
|
-
emitFormClick
|
|
54
|
-
} = useIhoTableFormEvent({
|
|
55
|
-
row,
|
|
56
|
-
column,
|
|
57
|
-
$rowIndex
|
|
58
|
-
});
|
|
59
53
|
return [createVNode(EditSeparate, {
|
|
60
54
|
"value": row[column.field],
|
|
61
55
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
@@ -63,10 +57,10 @@ function separateRendererPlugins() {
|
|
|
63
57
|
"height": height,
|
|
64
58
|
"column": column,
|
|
65
59
|
"row": row,
|
|
66
|
-
"displayContent": (
|
|
60
|
+
"displayContent": (_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field],
|
|
67
61
|
"onClick": emitFormClick
|
|
68
62
|
}, slots)];
|
|
69
|
-
}
|
|
63
|
+
})
|
|
70
64
|
});
|
|
71
65
|
},
|
|
72
66
|
apply(hooks) {
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createVNode, mergeProps } from 'vue';
|
|
|
2
2
|
import '../../../../index.js';
|
|
3
3
|
import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
|
|
4
4
|
import { NTimePicker } from 'naive-ui';
|
|
5
|
-
import {
|
|
5
|
+
import { IhoTableRenderHelper } from '../../../utils/index.js';
|
|
6
6
|
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
7
|
|
|
8
8
|
function timeRendererPlugin() {
|
|
@@ -11,33 +11,20 @@ function timeRendererPlugin() {
|
|
|
11
11
|
name: pluginName,
|
|
12
12
|
vxe(instance) {
|
|
13
13
|
instance.renderer.add(EDITABLE_WIDGET_TYPE.TIME, {
|
|
14
|
-
renderCell(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}) {
|
|
18
|
-
return [createVNode("span", null, [row[column.field]])];
|
|
19
|
-
},
|
|
20
|
-
renderEdit({
|
|
21
|
-
props
|
|
22
|
-
}, {
|
|
14
|
+
renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
|
|
15
|
+
renderEdit: IhoTableRenderHelper.createRenderEdit(({
|
|
16
|
+
fieldItem,
|
|
23
17
|
row,
|
|
24
18
|
column,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
emitFormClick,
|
|
29
|
-
emitFormChange
|
|
30
|
-
} = useIhoTableFormEvent({
|
|
31
|
-
row,
|
|
32
|
-
column,
|
|
33
|
-
$rowIndex
|
|
34
|
-
});
|
|
19
|
+
emitFormChange,
|
|
20
|
+
emitFormClick
|
|
21
|
+
}) => {
|
|
35
22
|
const {
|
|
36
23
|
placeholder = "\u8BF7\u9009\u62E9",
|
|
37
24
|
valueFormat = "HH:mm"
|
|
38
|
-
} =
|
|
25
|
+
} = fieldItem.componentProps || {};
|
|
39
26
|
const config = {
|
|
40
|
-
...
|
|
27
|
+
...fieldItem.componentProps || {},
|
|
41
28
|
placeholder,
|
|
42
29
|
valueFormat,
|
|
43
30
|
format: valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
@@ -48,7 +35,7 @@ function timeRendererPlugin() {
|
|
|
48
35
|
"formattedValue": row[column.field],
|
|
49
36
|
"onUpdate:formattedValue": ($event) => row[column.field] = $event
|
|
50
37
|
}, config), null)];
|
|
51
|
-
}
|
|
38
|
+
})
|
|
52
39
|
});
|
|
53
40
|
}
|
|
54
41
|
});
|
|
@@ -2,7 +2,7 @@ import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
|
|
|
2
2
|
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes } from 'vxe-table';
|
|
3
3
|
import { VxeTableEventProps } from 'vxe-table/types/table';
|
|
4
4
|
import { IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
|
|
5
|
-
import { IHO_TABLE_FILTER_STATUS } from '../../../../../es/components/iho-table/src/plugins/filterPlugin/types';
|
|
5
|
+
import { FilterState, IHO_TABLE_FILTER_STATUS } from '../../../../../es/components/iho-table/src/plugins/filterPlugin/types';
|
|
6
6
|
export * from './pluginType';
|
|
7
7
|
export interface IhoTableRowGroupItem {
|
|
8
8
|
groupName: string;
|
|
@@ -59,6 +59,10 @@ export declare type LowCodeTableFieldItem = {
|
|
|
59
59
|
showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
|
|
60
60
|
options: AnyObject[];
|
|
61
61
|
annotation: boolean;
|
|
62
|
+
filterDefaultValue: Partial<{
|
|
63
|
+
checked: string[];
|
|
64
|
+
sortStatus: 0 | 1 | 2;
|
|
65
|
+
}>;
|
|
62
66
|
}> & Partial<Pick<VxeTableDefines.ColumnInfo, 'resizable'>>;
|
|
63
67
|
export declare type IhoTableFormChangePayload = {
|
|
64
68
|
column: IhoTableFieldItem;
|
|
@@ -89,4 +93,5 @@ export declare type IhoTableAnchorItem = {
|
|
|
89
93
|
};
|
|
90
94
|
export declare type IhoTableExpose = {
|
|
91
95
|
$table: VxeTableInstance;
|
|
96
|
+
setFilter(fieldName: string, value: Partial<Omit<FilterState, 'options'>>): void;
|
|
92
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './pluginType.js';
|
|
1
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractExposeHooks, AbstractFieldHooks, AbstractSetupHooks } from './pluginType.js';
|
|
@@ -26,6 +26,7 @@ export declare type TableHooks = Readonly<{
|
|
|
26
26
|
dataHooks: AbstractDataHooks;
|
|
27
27
|
setupHooks: AbstractSetupHooks;
|
|
28
28
|
domInsertHooks: AbstractDomInsertHooks;
|
|
29
|
+
exposeHooks: AbstractExposeHooks;
|
|
29
30
|
}>;
|
|
30
31
|
export declare type WithTableConfig<T = []> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
|
|
31
32
|
declare type ConfigHookType<T> = SyncWaterfallHook<WithTableConfig<T>>;
|
|
@@ -150,4 +151,7 @@ export declare abstract class AbstractDomInsertHooks {
|
|
|
150
151
|
abstract readonly header: SyncWaterfallHook<[VNode[]]>;
|
|
151
152
|
abstract readonly footer: SyncWaterfallHook<[VNode[]]>;
|
|
152
153
|
}
|
|
154
|
+
export declare abstract class AbstractExposeHooks {
|
|
155
|
+
abstract readonly expose: SyncWaterfallHook<[Record<string, Func>, Ref<IhoTableConfig>]>;
|
|
156
|
+
}
|
|
153
157
|
export {};
|
|
@@ -10,5 +10,7 @@ class AbstractSetupHooks {
|
|
|
10
10
|
}
|
|
11
11
|
class AbstractDomInsertHooks {
|
|
12
12
|
}
|
|
13
|
+
class AbstractExposeHooks {
|
|
14
|
+
}
|
|
13
15
|
|
|
14
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks };
|
|
16
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractExposeHooks, AbstractFieldHooks, AbstractSetupHooks };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnyObject, Nullable } from '../../../../../es/shared/types';
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
3
|
import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
|
|
4
|
+
import { VxeGlobalRendererHandles } from 'vxe-table/types/v-x-e-table/renderer';
|
|
4
5
|
import { EventListenerToEventName, IhoTableFieldItem, IhoTableFormChangePayload, LowCodeTableFieldItem } from '../../../../../es/components/iho-table';
|
|
5
6
|
export declare function IhoTableLog(message: string): void;
|
|
6
7
|
export declare function IhoTableWarn(message: string): void;
|
|
@@ -24,3 +25,12 @@ export declare function useIhoTableFormEvent({ row, column, $rowIndex }: {
|
|
|
24
25
|
createCustomEvent: (eventName: 'formChange' | 'formClick', params: Partial<IhoTableFormChangePayload>) => () => void;
|
|
25
26
|
};
|
|
26
27
|
export declare function getLowCodeFieldFromField(field: IhoTableFieldItem): LowCodeTableFieldItem | undefined;
|
|
28
|
+
declare function createDefaultRenderCell(): ((renderOpts: import("vxe-table").VxeColumnPropTypes.EditRender, params: VxeGlobalRendererHandles.RenderCellParams) => VxeGlobalRendererHandles.RenderResult) | undefined;
|
|
29
|
+
declare function createRenderEdit(renderer: (payload: VxeGlobalRendererHandles.RenderEditParams & {
|
|
30
|
+
fieldItem: Partial<LowCodeTableFieldItem>;
|
|
31
|
+
} & ReturnType<typeof useIhoTableFormEvent>) => VxeGlobalRendererHandles.RenderResult): ((renderOpts: import("vxe-table").VxeColumnPropTypes.EditRender, params: VxeGlobalRendererHandles.RenderEditParams) => VxeGlobalRendererHandles.RenderResult) | undefined;
|
|
32
|
+
export declare const IhoTableRenderHelper: Readonly<{
|
|
33
|
+
createDefaultRenderCell: typeof createDefaultRenderCell;
|
|
34
|
+
createRenderEdit: typeof createRenderEdit;
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { inject, reactive, nextTick, unref, createVNode } from 'vue';
|
|
1
2
|
import { isNumber } from 'lodash-es';
|
|
2
|
-
import { inject, reactive, nextTick, unref } from 'vue';
|
|
3
3
|
import { InjectionIhoTableConfig, InjectionIhoTableEmits } from '../constants/index.js';
|
|
4
4
|
|
|
5
|
-
function IhoTableLog(message) {
|
|
6
|
-
return console.log(`[IhoTable]: ${message}`);
|
|
7
|
-
}
|
|
8
5
|
function IhoTableWarn(message) {
|
|
9
6
|
return console.warn(`[IhoTable]: ${message}`);
|
|
10
7
|
}
|
|
@@ -75,14 +72,44 @@ function useIhoTableFormEvent({
|
|
|
75
72
|
}
|
|
76
73
|
function createCustomEvent(eventName, params) {
|
|
77
74
|
return function() {
|
|
78
|
-
emit(eventName, {
|
|
75
|
+
emit(eventName, {
|
|
76
|
+
...getPayload(),
|
|
77
|
+
...params
|
|
78
|
+
});
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
return {
|
|
81
|
+
return {
|
|
82
|
+
emitFormChange,
|
|
83
|
+
emitFormClick,
|
|
84
|
+
createCustomEvent
|
|
85
|
+
};
|
|
82
86
|
}
|
|
83
87
|
function getLowCodeFieldFromField(field) {
|
|
84
88
|
var _a;
|
|
85
89
|
return (_a = field.editRender) == null ? void 0 : _a.props;
|
|
86
90
|
}
|
|
91
|
+
function createDefaultRenderCell() {
|
|
92
|
+
return function(_, {
|
|
93
|
+
row,
|
|
94
|
+
column
|
|
95
|
+
}) {
|
|
96
|
+
return [createVNode("span", null, [row[column.field]])];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function createRenderEdit(renderer) {
|
|
100
|
+
return function({
|
|
101
|
+
props
|
|
102
|
+
}, params) {
|
|
103
|
+
return renderer({
|
|
104
|
+
...params,
|
|
105
|
+
fieldItem: props || {},
|
|
106
|
+
...useIhoTableFormEvent(params)
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const IhoTableRenderHelper = Object.freeze({
|
|
111
|
+
createDefaultRenderCell,
|
|
112
|
+
createRenderEdit
|
|
113
|
+
});
|
|
87
114
|
|
|
88
|
-
export {
|
|
115
|
+
export { IhoTableRenderHelper, IhoTableUtils, IhoTableWarn, getColumnRenderWidth, getEventName, getLowCodeFieldFromField, getRowHeight, useIhoTableFormEvent, useUUIDMap };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:#5585f5}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:rgba(0,0,0,.05)}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
|
|
1
|
+
.iho-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle{box-shadow:7px 0 8px -3px rgba(0,0,0,.15)}.iho-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle{box-shadow:-7px 0 8px -3px rgba(0,0,0,.15)}.iho-table__boldCell{font-weight:700}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar{background-color:transparent;height:10px;width:10px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#f2f2f2;border:3px dashed transparent;border-radius:5px}.iho-table .vxe-table--body-wrapper::-webkit-scrollbar-thumb:hover,.iho-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar-thumb:hover{background:#b2b2b2}.iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table__filterIcon{cursor:pointer;padding:0 4px}.iho-table__filterIcon:hover{opacity:.7}.iho-table__filterIcon.is-active{color:#5585f5}.iho-table__filterWrapper{display:flex;flex-direction:column;gap:8px;width:200px}.iho-table__filterButton{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:30px;padding:0 8px}.iho-table__filterButton--active{color:#5585f5}.iho-table__filterButton:hover{background:rgba(0,0,0,.05)}.iho-table__filterListWrapper{border:1px solid rgba(0,0,0,.05)}.iho-table__filterListItem{align-items:center;border-radius:4px;display:flex;height:32px;padding:0 8px}.iho-table__filterListItem:hover{background:rgba(0,0,0,.05)}.iho-table__filterFooter{display:flex;justify-content:space-between}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}
|