cnhis-design-vue 3.1.16-beta.8 → 3.1.16-beta.9

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 (27) hide show
  1. package/es/packages/big-table/index.d.ts +1 -1
  2. package/es/packages/big-table/src/BigTable.vue.d.ts +2 -23
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +4 -2
  4. package/es/packages/big-table/src/hooks/useAnchor.d.ts +1 -1
  5. package/es/packages/big-table/src/hooks/useAnchor.js +20 -12
  6. package/es/packages/form-config/index.d.ts +77 -3330
  7. package/es/packages/form-config/src/FormConfig.js +42 -34
  8. package/es/packages/form-config/src/FormConfig.vue.d.ts +121 -3374
  9. package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
  10. package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +10 -7
  11. package/es/packages/form-config/src/components/FormConfigEdit.js +1 -1
  12. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +56 -28
  13. package/es/packages/form-config/src/constants/index.d.ts +20 -20
  14. package/es/packages/form-config/src/constants/index.js +27 -36
  15. package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
  16. package/es/packages/form-config/src/hooks/useConfigurationField.js +28 -42
  17. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
  18. package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
  19. package/es/packages/form-config/src/hooks/useSortable.js +1 -1
  20. package/es/packages/form-config/src/types/index.d.ts +21 -4
  21. package/es/packages/form-config/src/utils/index.d.ts +2 -0
  22. package/es/packages/form-config/src/utils/index.js +15 -0
  23. package/es/packages/form-config/style/index.css +26 -2
  24. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +5 -2
  25. package/es/packages/index.css +26 -2
  26. package/global.d.ts +8 -8
  27. package/package.json +1 -1
@@ -2868,7 +2868,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2868
2868
  loadExpandMethod: ({ row, rowIndex }: any) => Promise<void>;
2869
2869
  nestHandleClickRow: (table: any, data: any) => void;
2870
2870
  initAnchor: () => void;
2871
- updateAnchor: (field: string) => void;
2871
+ updateAnchor: (field: string) => Promise<void>;
2872
2872
  anchorEvent: ({ scrollLeft }: {
2873
2873
  scrollLeft: number;
2874
2874
  }) => void;
@@ -1127,12 +1127,6 @@ declare const _default: import("vue").DefineComponent<{
1127
1127
  textColorGhostPressedWarning: string;
1128
1128
  textColorGhostFocusWarning: string;
1129
1129
  textColorGhostDisabledWarning: string;
1130
- /**
1131
- * 判断是否渲染EditForm
1132
- * @param {*} row
1133
- * @param {*} column
1134
- * @returns
1135
- */
1136
1130
  borderWarning: string;
1137
1131
  borderHoverWarning: string;
1138
1132
  borderPressedWarning: string;
@@ -1684,22 +1678,7 @@ declare const _default: import("vue").DefineComponent<{
1684
1678
  onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
1685
1679
  onChange: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
1686
1680
  onClear: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
1687
- status: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>; /**
1688
- * 针对 bigTable 的设置列
1689
- * type: 列的类型
1690
- * field: 列字段名(注:属性层级越深,渲染性能将直线下降)
1691
- * title: 列标题(支持开启国际化)
1692
- * width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
1693
- * minWidth: 最小列宽度;会自动将剩余空间按比例分配
1694
- * resizable: 列是否允许拖动列宽调整大小
1695
- * visible: 列是否显示
1696
- * fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
1697
- * align: 列对齐方式
1698
- * headerAlign: 表头列的对齐方式
1699
- * footerAlign: 表尾列的对齐方式
1700
- * formatter: 格式化显示内容 Function({cellValue, row, column})
1701
- * sortable: 是否允许列排序
1702
- */
1681
+ status: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
1703
1682
  'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
1704
1683
  onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
1705
1684
  textDecoration: import("vue").PropType<string | [string, string]>;
@@ -2888,7 +2867,7 @@ declare const _default: import("vue").DefineComponent<{
2888
2867
  loadExpandMethod: ({ row, rowIndex }: any) => Promise<void>;
2889
2868
  nestHandleClickRow: (table: any, data: any) => void;
2890
2869
  initAnchor: () => void;
2891
- updateAnchor: (field: string) => void;
2870
+ updateAnchor: (field: string) => Promise<void>;
2892
2871
  anchorEvent: ({ scrollLeft }: {
2893
2872
  scrollLeft: number;
2894
2873
  }) => void;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createBlock, unref, withCtx, renderList, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, mergeProps, renderSlot, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
1
+ import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, nextTick, createVNode, h, resolveComponent, Teleport, createTextVNode, watch, openBlock, createElementBlock, Fragment, createBlock, unref, withCtx, renderList, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, mergeProps, renderSlot, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
2
2
  import { isArray, isFunction } from 'lodash-es';
3
3
  import bigTableState from './bigTableState.js';
4
4
  import bigTableProps from './bigTableProps.js';
@@ -243,7 +243,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
243
243
  let columns = formatColumns(config);
244
244
  columns = handleGroupColums(columns, props);
245
245
  xGrid.value && xGrid.value.reloadColumn(columns);
246
- initAnchor();
246
+ nextTick(() => {
247
+ initAnchor();
248
+ });
247
249
  setGroupTreeExpand();
248
250
  resetTableInlineEditStatus();
249
251
  };
@@ -1,6 +1,6 @@
1
1
  export declare const useAnchor: (props: any, state: any, emit: any, xGrid: any) => {
2
2
  initAnchor: () => void;
3
- updateAnchor: (field: string) => void;
3
+ updateAnchor: (field: string) => Promise<void>;
4
4
  anchorEvent: ({ scrollLeft }: {
5
5
  scrollLeft: number;
6
6
  }) => void;
@@ -1,29 +1,37 @@
1
1
  import { useThrottleFn } from '@vueuse/core';
2
2
 
3
3
  const useAnchor = (props, state, emit, xGrid) => {
4
+ let setAnchorStatus = true;
4
5
  function initAnchor() {
5
- var _a;
6
+ var _a, _b, _c;
6
7
  if ((_a = props.anchor) == null ? void 0 : _a.length) {
7
8
  const columns = xGrid.value.getColumns();
8
9
  let left = 0;
9
10
  columns.forEach((column) => {
10
- const { field, minWidth, width } = column;
11
+ const { field, minWidth, width, fixed } = column;
11
12
  const colWidth = +(minWidth || width);
12
- left += colWidth;
13
- const anchorObj = props.anchor.find((v) => v.field === field);
14
- anchorObj && state.anchorList.push({
15
- ...anchorObj,
16
- left: left - colWidth
17
- });
13
+ if (fixed == "left") ; else {
14
+ left += colWidth;
15
+ const anchorObj = props.anchor.find((v) => v.field === field);
16
+ anchorObj && state.anchorList.push({
17
+ ...anchorObj,
18
+ left: left - colWidth
19
+ });
20
+ }
18
21
  });
19
- state.anchorValue = state.anchorList[0].field;
22
+ state.anchorValue = ((_c = (_b = state.anchorList) == null ? void 0 : _b[0]) == null ? void 0 : _c.field) || "";
20
23
  }
21
24
  }
22
- function updateAnchor(field) {
23
- xGrid.value.scrollToColumn(field);
25
+ async function updateAnchor(field) {
26
+ setAnchorStatus = false;
27
+ const anchorObj = state.anchorList.find((v) => v.field === field);
28
+ await xGrid.value.scrollTo(anchorObj.left);
29
+ setTimeout(() => {
30
+ setAnchorStatus = true;
31
+ });
24
32
  }
25
33
  function setAnchorValue({ scrollLeft }) {
26
- if (state.anchorList.length) {
34
+ if (state.anchorList.length && setAnchorStatus) {
27
35
  const anchorObj = state.anchorList.find((v) => scrollLeft < v.left);
28
36
  if (anchorObj) {
29
37
  state.anchorValue = anchorObj.field;