cnhis-design-vue 3.1.36-beta.1 → 3.1.36-beta.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.
Files changed (26) hide show
  1. package/es/components/big-table/index.d.ts +13 -0
  2. package/es/components/big-table/src/BigTable.vue.d.ts +13 -0
  3. package/es/components/big-table/src/BigTable.vue2.js +20 -1
  4. package/es/components/big-table/src/bigTableProps.d.ts +4 -0
  5. package/es/components/big-table/src/bigTableProps.js +2 -1
  6. package/es/components/big-table/style/index.css +1 -1
  7. package/es/components/iho-table/index.d.ts +0 -17
  8. package/es/components/iho-table/index.js +1 -0
  9. package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -18
  10. package/es/components/iho-table/src/IhoTable.vue.js +13 -18
  11. package/es/components/iho-table/src/constants/index.d.ts +3 -2
  12. package/es/components/iho-table/src/constants/index.js +2 -1
  13. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -2
  14. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +3 -0
  15. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +34 -18
  16. package/es/components/iho-table/src/plugins/filterPlugin/index.js +5 -12
  17. package/es/components/iho-table/src/plugins/index.js +1 -1
  18. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +43 -6
  19. package/es/components/iho-table/src/utils/index.d.ts +3 -1
  20. package/es/components/iho-table/src/utils/index.js +27 -11
  21. package/es/components/index.css +1 -1
  22. package/package.json +2 -2
  23. package/es/components/iho-table/src/components/IhoTableColumn.d.ts +0 -21
  24. package/es/components/iho-table/src/components/IhoTableColumn.js +0 -79
  25. package/es/components/iho-table/src/components/index.d.ts +0 -1
  26. package/es/components/iho-table/src/components/index.js +0 -1
@@ -1,79 +0,0 @@
1
- import { defineComponent, resolveComponent, createVNode } from 'vue';
2
- import { shallowOmit, widthAppend, arrayed } from '../../../../shared/utils/index.js';
3
- import { isEmpty, isObject, isString, isFunction } from 'lodash-es';
4
- import Annotation from '../../../annotation-edit/index.js';
5
- import { NEllipsis } from 'naive-ui';
6
- import { getLowCodeFieldFromField } from '../utils/index.js';
7
-
8
- const ColumnComponent = defineComponent({
9
- name: "IhoTableColumn",
10
- props: {
11
- field: {
12
- type: Object,
13
- required: true
14
- },
15
- annotation: {
16
- type: Object
17
- }
18
- },
19
- setup(props) {
20
- const VxeColumn = resolveComponent("vxe-column");
21
- const VxeColumnGroup = resolveComponent("vxe-colgroup");
22
- function renderHeader(payload, headerSlot) {
23
- var _a;
24
- const hasAnnotation = isObject(props.annotation) && ((_a = getLowCodeFieldFromField(props.field)) == null ? void 0 : _a.annotation) !== false;
25
- const customHeader = isString(headerSlot) ? headerSlot : isFunction(headerSlot) ? headerSlot(payload) : null;
26
- return createVNode("section", {
27
- "class": "iho-table__headerWrapper"
28
- }, [createVNode("section", {
29
- "style": {
30
- width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20) - (props.field.sortable ? 24 : 0))
31
- }
32
- }, [[...arrayed(customHeader != null ? customHeader : createVNode(NEllipsis, {
33
- "style": {
34
- maxWidth: "100%"
35
- }
36
- }, {
37
- default: () => props.field.title
38
- }))]]), hasAnnotation ? createVNode(Annotation, {
39
- "modelValue": props.annotation[props.field.field],
40
- "onUpdate:modelValue": ($event) => props.annotation[props.field.field] = $event
41
- }, null) : null]);
42
- }
43
- function columnSlot(field) {
44
- var _a;
45
- const result = {
46
- ...field.slots
47
- };
48
- if (!field.type && ((_a = getLowCodeFieldFromField(props.field)) == null ? void 0 : _a.annotation) !== false) {
49
- result.header = (payload) => {
50
- var _a2;
51
- return renderHeader(payload, (_a2 = field.slots) == null ? void 0 : _a2.header);
52
- };
53
- }
54
- return result;
55
- }
56
- function renderColumn(field) {
57
- return createVNode(VxeColumn, shallowOmit(field, ["slots"]), columnSlot(field));
58
- }
59
- function renderColumnGroup(group, children) {
60
- return createVNode(VxeColumnGroup, shallowOmit(group, ["children"]), {
61
- default: () => children.map((child) => createVNode(ColumnComponent, {
62
- "field": child,
63
- "annotation": props.annotation
64
- }, null))
65
- });
66
- }
67
- return () => {
68
- return !isEmpty(children()) ? renderColumnGroup(field(), children()) : renderColumn(field());
69
- function field() {
70
- return props.field;
71
- }
72
- function children() {
73
- return props.field.children;
74
- }
75
- };
76
- }
77
- });
78
-
79
- export { ColumnComponent as default };
@@ -1 +0,0 @@
1
- export { default as IhoTableColumn } from './IhoTableColumn';
@@ -1 +0,0 @@
1
- export { default as IhoTableColumn } from './IhoTableColumn.js';