cnhis-design-vue 3.1.13 → 3.1.14-beta.0

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.
@@ -1,4 +1,5 @@
1
1
  import { SFCWithInstall } from '../../../es/src/types';
2
+ export * from './src/hooks/export';
2
3
  declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
3
4
  data: {
4
5
  type: ArrayConstructor;
@@ -5,6 +5,7 @@ import { expandXEUtils } from '../../src/utils/utilExpand';
5
5
  import { CGrid } from '../../packages/index';
6
6
  import './src/BigTable.js';
7
7
  import script from './src/BigTable.vue_vue_type_script_setup_true_lang.js';
8
+ export { useColumnConfigAdaptor } from './src/hooks/useColumnConfigAdaptor.js';
8
9
 
9
10
  const BigTable = script;
10
11
  BigTable.install = function(app) {
@@ -0,0 +1 @@
1
+ export * from './useColumnConfigAdaptor';
@@ -0,0 +1 @@
1
+ export { useColumnConfigAdaptor } from './useColumnConfigAdaptor.js';
@@ -1,7 +1,6 @@
1
1
  import { AnyObject } from '../../../../../es/src/types';
2
2
  interface FormConfigLikePayload {
3
3
  fieldList: AnyObject[];
4
- rowGroupConfig: Partial<Record<'firstRowGroup' | 'secondRowGroup', AnyObject[]>>;
5
4
  }
6
5
  declare type EditRules = Record<string, AnyObject[]>;
7
6
  export declare function useColumnConfigAdaptor(): {
@@ -3,12 +3,11 @@ import { isObject, cloneDeep, isString, isFunction, isArray } from 'lodash-es';
3
3
  const REMOVE_PROPERTY = Symbol("remove property");
4
4
  function useColumnConfigAdaptor() {
5
5
  function formConfigLikeAdaptor(payload) {
6
- if (!isObject(payload))
7
- return { fieldList: [], rowGroupConfig: {} };
8
6
  const editRules = {};
7
+ if (!isObject(payload))
8
+ return { fieldList: [], editRules };
9
9
  const fieldList = formConfigLikeFieldListTransfer(payload.fieldList);
10
- const rowGroupConfig = payload.rowGroupConfig;
11
- return { fieldList, rowGroupConfig, editRules };
10
+ return { fieldList, editRules };
12
11
  function formConfigLikeFieldListTransfer(fieldList2) {
13
12
  const fixedWayEnumValueMap = /* @__PURE__ */ new Map([
14
13
  ["NONE", 0],
@@ -21,6 +21,7 @@ import CShortcutProvider from './shortcut-provider';
21
21
  import CShortcutSetter from './shortcut-setter';
22
22
  export * from './form-render';
23
23
  export * from './shortcut-provider';
24
+ export * from './big-table';
24
25
  declare function install(app: App): void;
25
26
  export { CGrid, CBigTable, CFieldSet, CDragLayout, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CFormTable, CInfoHeader, CTimeLine, CBpmnWorkflow, CStepsWheel, Editor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter };
26
27
  declare const _default: {
@@ -54,6 +54,7 @@ export { useAnchor } from './form-render/src/hooks/useAnchor.js';
54
54
  export { useFormContext } from './form-render/src/hooks/useFormContext.js';
55
55
  export { ShortcutManager, useShortcuts } from './shortcut-provider/src/hooks/useShortcuts.js';
56
56
  export { useShortcutSignature } from './shortcut-provider/src/hooks/useShortcutSignature.js';
57
+ export { useColumnConfigAdaptor } from './big-table/src/hooks/useColumnConfigAdaptor.js';
57
58
 
58
59
  const components = {
59
60
  CGrid: Grid,
@@ -15,6 +15,10 @@ declare const StepsWheel: SFCWithInstall<import("vue").DefineComponent<{
15
15
  type: BooleanConstructor;
16
16
  default: boolean;
17
17
  };
18
+ lastNodeRender: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
18
22
  }, {
19
23
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
20
24
  stepInfo: {
@@ -32,10 +36,15 @@ declare const StepsWheel: SFCWithInstall<import("vue").DefineComponent<{
32
36
  type: BooleanConstructor;
33
37
  default: boolean;
34
38
  };
39
+ lastNodeRender: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
35
43
  }>> & {
36
44
  [x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
37
45
  }>>;
38
46
  nodeRowCount: import("vue").ComputedRef<number>;
47
+ lastNodeRenderShow: import("vue").ComputedRef<boolean>;
39
48
  stepInfoList: import("vue").Ref<any[]>;
40
49
  handleNode: (nodeList: any[], cols: number) => void;
41
50
  lineCircleLeft: (stepItem: any) => boolean;
@@ -540,9 +549,14 @@ declare const StepsWheel: SFCWithInstall<import("vue").DefineComponent<{
540
549
  type: BooleanConstructor;
541
550
  default: boolean;
542
551
  };
552
+ lastNodeRender: {
553
+ type: BooleanConstructor;
554
+ default: boolean;
555
+ };
543
556
  }>>, {
544
557
  stepInfo: Record<string, any>;
545
558
  currentStep: number;
546
559
  toolTipShow: boolean;
560
+ lastNodeRender: boolean;
547
561
  }>>;
548
562
  export default StepsWheel;
@@ -14,6 +14,10 @@ declare const _default: import("vue").DefineComponent<{
14
14
  type: BooleanConstructor;
15
15
  default: boolean;
16
16
  };
17
+ lastNodeRender: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
17
21
  }, {
18
22
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
19
23
  stepInfo: {
@@ -31,10 +35,15 @@ declare const _default: import("vue").DefineComponent<{
31
35
  type: BooleanConstructor;
32
36
  default: boolean;
33
37
  };
38
+ lastNodeRender: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
34
42
  }>> & {
35
43
  [x: `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
36
44
  }>>;
37
45
  nodeRowCount: import("vue").ComputedRef<number>;
46
+ lastNodeRenderShow: import("vue").ComputedRef<boolean>;
38
47
  stepInfoList: import("vue").Ref<any[]>;
39
48
  handleNode: (nodeList: any[], cols: number) => void;
40
49
  lineCircleLeft: (stepItem: any) => boolean;
@@ -539,9 +548,14 @@ declare const _default: import("vue").DefineComponent<{
539
548
  type: BooleanConstructor;
540
549
  default: boolean;
541
550
  };
551
+ lastNodeRender: {
552
+ type: BooleanConstructor;
553
+ default: boolean;
554
+ };
542
555
  }>>, {
543
556
  stepInfo: Record<string, any>;
544
557
  currentStep: number;
545
558
  toolTipShow: boolean;
559
+ lastNodeRender: boolean;
546
560
  }>;
547
561
  export default _default;
@@ -48,6 +48,10 @@ var script = /* @__PURE__ */ defineComponent({
48
48
  toolTipShow: {
49
49
  type: Boolean,
50
50
  default: true
51
+ },
52
+ lastNodeRender: {
53
+ type: Boolean,
54
+ default: false
51
55
  }
52
56
  },
53
57
  setup(__props) {
@@ -55,6 +59,9 @@ var script = /* @__PURE__ */ defineComponent({
55
59
  const nodeRowCount = computed(() => {
56
60
  return Math.ceil(stepInfoList.value.length / props.stepInfo.cols);
57
61
  });
62
+ const lastNodeRenderShow = computed(() => {
63
+ return props.lastNodeRender;
64
+ });
58
65
  const stepInfoList = ref([]);
59
66
  const handleNode = (nodeList, cols) => {
60
67
  let length = nodeList.length + 1;
@@ -134,9 +141,9 @@ var script = /* @__PURE__ */ defineComponent({
134
141
  let arr = format2DArray(stepInfoList.value, cols);
135
142
  let lastRow = arr[arr.length - 1].filter((v) => v);
136
143
  if (nodeRowCount.value % 2 == 0) {
137
- return index == lastRow[lastRow.length - 1].nodeIndex - (props.stepInfo.cols - 2 * lastRow[lastRow.length - 1].sort);
144
+ return lastNodeRenderShow.value && index == lastRow[lastRow.length - 1].nodeIndex - (props.stepInfo.cols - 2 * lastRow[lastRow.length - 1].sort);
138
145
  } else {
139
- return index == lastRow[lastRow.length - 1].nodeIndex - 1;
146
+ return lastNodeRenderShow.value && index == lastRow[lastRow.length - 1].nodeIndex - 1;
140
147
  }
141
148
  };
142
149
  const handleFinishLastNodeLine = (index) => {
@@ -144,9 +151,9 @@ var script = /* @__PURE__ */ defineComponent({
144
151
  let arr = format2DArray(stepInfoList.value, cols);
145
152
  let lastRow = arr[arr.length - 1].filter((v) => v);
146
153
  if (nodeRowCount.value % 2 == 0) {
147
- return index == lastRow[lastRow.length - 1].nodeIndex - (props.stepInfo.cols - 2 * lastRow[lastRow.length - 1].sort) - 1;
154
+ return lastNodeRenderShow.value && index == lastRow[lastRow.length - 1].nodeIndex - (props.stepInfo.cols - 2 * lastRow[lastRow.length - 1].sort) - 1;
148
155
  } else {
149
- return index == lastRow[lastRow.length - 1].nodeIndex - 2;
156
+ return lastNodeRenderShow.value && index == lastRow[lastRow.length - 1].nodeIndex - 2;
150
157
  }
151
158
  };
152
159
  watch(() => props.stepInfo, (val) => {
@@ -160,8 +167,8 @@ var script = /* @__PURE__ */ defineComponent({
160
167
  createElementVNode("ul", _hoisted_2, [
161
168
  (openBlock(true), createElementBlock(Fragment, null, renderList(stepInfoList.value, (stepItem, index) => {
162
169
  return openBlock(), createElementBlock("li", {
163
- class: normalizeClass(["stepItem", { [`stepItem_${index + 1}`]: true }]),
164
- key: index
170
+ class: normalizeClass(["stepItem", { [`stepItem_${index + 1}`]: true, [`${stepItem == null ? void 0 : stepItem.stepId}`]: (stepItem == null ? void 0 : stepItem.stepId) ? true : false }]),
171
+ key: (stepItem == null ? void 0 : stepItem.stepId) || index
165
172
  }, [
166
173
  stepItem ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
167
174
  createCommentVNode(" \u6B65\u9AA4\u5934\u90E8\u4FE1\u606F "),
@@ -191,7 +198,9 @@ var script = /* @__PURE__ */ defineComponent({
191
198
  }, null, 2)
192
199
  ]),
193
200
  default: withCtx(() => [
194
- renderSlot(_ctx.$slots, "nodeTipBox", {}, () => [
201
+ renderSlot(_ctx.$slots, "nodeTipBox", {
202
+ stepId: stepItem.stepId
203
+ }, () => [
195
204
  _hoisted_4
196
205
  ])
197
206
  ]),
@@ -230,10 +239,12 @@ var script = /* @__PURE__ */ defineComponent({
230
239
  class: normalizeClass(["stepLabel", { labelFinsh: handleFinishLastNodeCss(index) }]),
231
240
  title: stepItem.label
232
241
  }, toDisplayString(stepItem.label), 11, _hoisted_6),
233
- createElementVNode("p", {
242
+ withDirectives(createElementVNode("p", {
234
243
  class: "stepExtra",
235
244
  title: stepItem.person
236
- }, toDisplayString(stepItem.person), 9, _hoisted_7),
245
+ }, toDisplayString(stepItem.person), 9, _hoisted_7), [
246
+ [vShow, stepItem.person]
247
+ ]),
237
248
  createCommentVNode(" \u6B65\u9AA4\u65F6\u95F4 "),
238
249
  createElementVNode("p", _hoisted_8, toDisplayString(stepItem.statusTime), 1)
239
250
  ])
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.13",
4
+ "version": "3.1.14-beta.0",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",