cnhis-design-vue 3.1.17-beta.6 → 3.1.17-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 (41) hide show
  1. package/es/packages/big-table/index.d.ts +6 -8
  2. package/es/packages/big-table/src/BigTable.vue.d.ts +11 -15
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +8 -6
  4. package/es/packages/big-table/src/components/edit-form/edit-date.js +10 -1
  5. package/es/packages/big-table/src/components/edit-form/edit-input.js +10 -2
  6. package/es/packages/big-table/src/components/edit-form/edit-select.d.ts +1 -1
  7. package/es/packages/big-table/src/components/edit-form/edit-select.js +11 -2
  8. package/es/packages/big-table/src/components/edit-form/edit-separate.js +12 -11
  9. package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +13 -1
  10. package/es/packages/big-table/src/components/edit-form/edit-time.js +10 -1
  11. package/es/packages/big-table/src/components/edit-form/useCommon.d.ts +4 -0
  12. package/es/packages/big-table/src/components/edit-form/useCommon.js +19 -0
  13. package/es/packages/big-table/src/hooks/useEdit.d.ts +14 -8
  14. package/es/packages/big-table/src/hooks/useEdit.js +0 -20
  15. package/es/packages/big-table/style/index.css +6 -0
  16. package/es/packages/button-print/index.d.ts +9 -0
  17. package/es/packages/button-print/src/ButtonPrint.vue.d.ts +9 -0
  18. package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +19 -11
  19. package/es/packages/fabric-chart/src/hooks/useLeft.js +4 -3
  20. package/es/packages/field-set/index.d.ts +24 -26
  21. package/es/packages/field-set/src/FieldSet.js +132 -54
  22. package/es/packages/field-set/src/FieldSet.vue.d.ts +20 -26
  23. package/es/packages/field-set/style/index.css +5 -5
  24. package/es/packages/form-config/style/index.css +13 -2
  25. package/es/packages/form-render/src/components/renderer/formItem.js +2 -2
  26. package/es/packages/form-render/src/components/renderer/inputNumber.d.ts +16 -2
  27. package/es/packages/form-render/src/components/renderer/inputNumber.js +31 -4
  28. package/es/packages/form-render/src/hooks/useCommonInjection.js +4 -1
  29. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -4
  30. package/es/packages/form-render/src/hooks/useFormValidator.js +20 -5
  31. package/es/packages/form-render/src/utils/dom.js +2 -2
  32. package/es/packages/form-render/src/utils/index.js +1 -1
  33. package/es/packages/form-render/src/utils/schema.d.ts +1 -1
  34. package/es/packages/form-render/src/utils/schema.js +4 -4
  35. package/es/packages/index.css +24 -7
  36. package/es/packages/scale-view/src/hooks/use-component.d.ts +1 -1
  37. package/es/packages/select-label/index.d.ts +2 -2
  38. package/es/packages/select-label/src/LabelFormContent.vue.d.ts +1 -1
  39. package/es/packages/select-label/src/SelectLabel.vue.d.ts +1 -1
  40. package/global.d.ts +8 -8
  41. package/package.json +3 -1
@@ -2845,15 +2845,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2845
2845
  row: any;
2846
2846
  rowIndex: any;
2847
2847
  };
2848
- initEditTable: () => Promise<void>;
2849
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
2850
- row: any;
2851
- rowIndex: number;
2852
- column: any;
2853
- columnIndex: number;
2854
- }) => boolean;
2855
2848
  deleteRow: (row: any, col: any, index: number) => void;
2856
- onClickSelectTable: (row: any) => Promise<void>;
2857
2849
  onFormChange: ({ value, row, column, index }: {
2858
2850
  value: string | number | null;
2859
2851
  row: any;
@@ -2941,6 +2933,12 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2941
2933
  } | null;
2942
2934
  showOverflow: boolean;
2943
2935
  })[];
2936
+ getRowData: (row: import("../../../es/src/types").AnyObject) => {
2937
+ separateData: Record<string, string>;
2938
+ index: number;
2939
+ rawRow: import("../../../es/src/types").AnyObject;
2940
+ row: import("../../../es/src/types").AnyObject;
2941
+ } | undefined;
2944
2942
  formatterEdit: (params: any, col: any) => any;
2945
2943
  getEditBtn: (row: any, col: any, index: any) => any;
2946
2944
  formatter: (params: any, col: any, _isEdit: any) => any;
@@ -1126,12 +1126,7 @@ declare const _default: import("vue").DefineComponent<{
1126
1126
  textColorGhostHoverWarning: string;
1127
1127
  textColorGhostPressedWarning: string;
1128
1128
  textColorGhostFocusWarning: string;
1129
- textColorGhostDisabledWarning: string; /**
1130
- * 判断是否渲染EditForm
1131
- * @param {*} row
1132
- * @param {*} column
1133
- * @returns
1134
- */
1129
+ textColorGhostDisabledWarning: string;
1135
1130
  borderWarning: string;
1136
1131
  borderHoverWarning: string;
1137
1132
  borderPressedWarning: string;
@@ -1252,7 +1247,9 @@ declare const _default: import("vue").DefineComponent<{
1252
1247
  textColorTextHoverPrimary: string;
1253
1248
  textColorTextPressedPrimary: string;
1254
1249
  textColorTextFocusPrimary: string;
1255
- textColorTextDisabledPrimary: string;
1250
+ textColorTextDisabledPrimary: string; /**
1251
+ * tsx渲染表格
1252
+ */
1256
1253
  textColorGhostPrimary: string;
1257
1254
  textColorGhostHoverPrimary: string;
1258
1255
  textColorGhostPressedPrimary: string;
@@ -1331,6 +1328,7 @@ declare const _default: import("vue").DefineComponent<{
1331
1328
  textColorTextPressedWarning: string;
1332
1329
  textColorTextFocusWarning: string;
1333
1330
  textColorTextDisabledWarning: string;
1331
+ /** string */
1334
1332
  textColorGhostWarning: string;
1335
1333
  textColorGhostHoverWarning: string;
1336
1334
  textColorGhostPressedWarning: string;
@@ -2849,15 +2847,7 @@ declare const _default: import("vue").DefineComponent<{
2849
2847
  row: any;
2850
2848
  rowIndex: any;
2851
2849
  };
2852
- initEditTable: () => Promise<void>;
2853
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
2854
- row: any;
2855
- rowIndex: number;
2856
- column: any;
2857
- columnIndex: number;
2858
- }) => boolean;
2859
2850
  deleteRow: (row: any, col: any, index: number) => void;
2860
- onClickSelectTable: (row: any) => Promise<void>;
2861
2851
  onFormChange: ({ value, row, column, index }: {
2862
2852
  value: string | number | null;
2863
2853
  row: any;
@@ -2945,6 +2935,12 @@ declare const _default: import("vue").DefineComponent<{
2945
2935
  } | null;
2946
2936
  showOverflow: boolean;
2947
2937
  })[];
2938
+ getRowData: (row: import("../../../src/types").AnyObject) => {
2939
+ separateData: Record<string, string>;
2940
+ index: number;
2941
+ rawRow: import("../../../src/types").AnyObject;
2942
+ row: import("../../../src/types").AnyObject;
2943
+ } | undefined;
2948
2944
  formatterEdit: (params: any, col: any) => any;
2949
2945
  getEditBtn: (row: any, col: any, index: any) => any;
2950
2946
  formatter: (params: any, col: any, _isEdit: any) => any;
@@ -19,7 +19,7 @@ import { useBatchEditing } from './hooks/useBatchEditing.js';
19
19
  import { useNestTable } from './hooks/useNestTable.js';
20
20
  import { useAnchor } from './hooks/useAnchor.js';
21
21
  import { useEvent } from './hooks/useEvent.js';
22
- import { useSeparateRow } from './hooks/useSeparateRow.js';
22
+ import { useSeparateRow, useSeparateMap } from './hooks/useSeparateRow.js';
23
23
  import { useFormat } from './hooks/useFormat.js';
24
24
  import { useTableParse } from './hooks/useTableParse.js';
25
25
  import { useEdit, comps } from './hooks/useEdit.js';
@@ -82,10 +82,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
82
82
  getInlineOpreateRow
83
83
  } = useBatchEditing(props, state, emit, xGrid);
84
84
  const {
85
- initEditTable,
86
- activeMethod,
87
85
  deleteRow,
88
- onClickSelectTable,
89
86
  onFormChange,
90
87
  getDefaultValue
91
88
  } = useEdit(props, state, emit, xGrid);
@@ -506,7 +503,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
506
503
  state.columnLen = currentColumns.filter((item) => item.visible).length;
507
504
  return columns;
508
505
  };
506
+ const {
507
+ getRowData
508
+ } = useSeparateMap();
509
509
  const formatterEdit = (params, col) => {
510
+ var _a, _b;
510
511
  let {
511
512
  row,
512
513
  column,
@@ -526,7 +527,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
526
527
  const propsData = {
527
528
  col,
528
529
  row,
529
- index: $rowIndex,
530
+ index: (_b = (_a = getRowData(row)) == null ? void 0 : _a.index) != null ? _b : $rowIndex,
530
531
  type: formType,
531
532
  ...col.componentProps || {},
532
533
  onFormChange,
@@ -537,7 +538,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
537
538
  column: col,
538
539
  index: $rowIndex
539
540
  });
540
- }
541
+ },
542
+ editTrigger: state.editConfig.trigger
541
543
  };
542
544
  if (formType === "date" || formType === "time") {
543
545
  propsData.formattedValue = row[col.columnName];
@@ -2,6 +2,7 @@ import { defineComponent, computed, createVNode, mergeProps } from 'vue';
2
2
  import { generateTimeFormat } from '../../../../../src/utils';
3
3
  import { isFunction } from 'lodash-es';
4
4
  import { NDatePicker } from 'naive-ui';
5
+ import { useCommon } from './useCommon.js';
5
6
 
6
7
  var EditDate = defineComponent({
7
8
  name: "EditDate",
@@ -28,6 +29,10 @@ var EditDate = defineComponent({
28
29
  attrs,
29
30
  emit
30
31
  }) {
32
+ const {
33
+ formRef,
34
+ isShow
35
+ } = useCommon(props, attrs);
31
36
  const onConfirm = (value) => {
32
37
  emit("formChange", {
33
38
  value,
@@ -124,7 +129,11 @@ var EditDate = defineComponent({
124
129
  if (config.type.includes("time")) {
125
130
  config.isTimeDisabled = customDateDisabledDecorator(props.col.isTimeDisabled) || isTimeDisabled;
126
131
  }
127
- return () => createVNode(NDatePicker, mergeProps(attrs, config, {
132
+ return () => createVNode(NDatePicker, mergeProps({
133
+ "ref": formRef,
134
+ "show": isShow.value,
135
+ "onUpdate:show": ($event) => isShow.value = $event
136
+ }, attrs, config, {
128
137
  "onUpdateFormattedValue": onConfirm
129
138
  }), null);
130
139
  }
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, ref, createVNode, mergeProps } from 'vue';
2
2
  import { NInput, NInputNumber } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var EditInput = defineComponent({
5
6
  name: "EditInput",
@@ -31,6 +32,9 @@ var EditInput = defineComponent({
31
32
  attrs,
32
33
  emit
33
34
  }) {
35
+ const {
36
+ formRef
37
+ } = useCommon(props, attrs);
34
38
  const __value = ref(attrs.value);
35
39
  const onUpdateValue = (value) => {
36
40
  emit("formChange", {
@@ -52,11 +56,15 @@ var EditInput = defineComponent({
52
56
  placeholder: props.col.placeholder || "\u8BF7\u8F93\u5165",
53
57
  ...props.col.componentProps || {}
54
58
  };
55
- return () => props.type === "input" ? createVNode(NInput, mergeProps(attrs, config, {
59
+ return () => props.type === "input" ? createVNode(NInput, mergeProps({
60
+ "ref": formRef
61
+ }, attrs, config, {
56
62
  "value": __value.value,
57
63
  "onUpdate:value": ($event) => __value.value = $event,
58
64
  "onBlur": onBlur
59
- }), null) : createVNode(NInputNumber, mergeProps(attrs, config, {
65
+ }), null) : createVNode(NInputNumber, mergeProps({
66
+ "ref": formRef
67
+ }, attrs, config, {
60
68
  "onUpdateValue": onUpdateValue
61
69
  }), null);
62
70
  }
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
11
11
  type: (NumberConstructor | ObjectConstructor)[];
12
12
  default: number;
13
13
  };
14
- }, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  col: {
16
16
  type: ObjectConstructor;
17
17
  default: () => {};
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, reactive, createVNode, mergeProps } from 'vue';
2
2
  import { NSelect } from 'naive-ui';
3
3
  import vexutils from '../../../../../src/utils/vexutils';
4
+ import { useCommon } from './useCommon.js';
4
5
 
5
6
  var EditSelect = defineComponent({
6
7
  name: "EditSelect",
@@ -28,6 +29,10 @@ var EditSelect = defineComponent({
28
29
  slots,
29
30
  emit
30
31
  }) {
32
+ const {
33
+ formRef,
34
+ isShow
35
+ } = useCommon(props, attrs);
31
36
  const state = reactive({
32
37
  options: [],
33
38
  loading: false,
@@ -77,7 +82,11 @@ var EditSelect = defineComponent({
77
82
  }
78
83
  };
79
84
  init();
80
- return () => [createVNode(NSelect, mergeProps(attrs, state.config, {
85
+ return () => createVNode(NSelect, mergeProps({
86
+ "ref": formRef,
87
+ "show": isShow.value,
88
+ "onUpdate:show": ($event) => isShow.value = $event
89
+ }, attrs, state.config, {
81
90
  "options": state.options,
82
91
  "consistentMenuWidth": false,
83
92
  "clearable": true,
@@ -85,7 +94,7 @@ var EditSelect = defineComponent({
85
94
  "placeholder": props.col.placeholder || "\u8BF7\u9009\u62E9",
86
95
  "loading": state.loading,
87
96
  "onUpdateValue": onUpdateValue
88
- }), null)];
97
+ }), null);
89
98
  }
90
99
  });
91
100
 
@@ -24,32 +24,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  watch(show, updateShow);
25
25
  const editContent = ref();
26
26
  const { getRowData } = useSeparateMap();
27
- async function updateShow(show2) {
27
+ async function onShow(target) {
28
28
  var _a;
29
- const target = getRowData(props.row);
30
29
  if (!target)
31
30
  return;
32
- if (show2) {
33
- editContent.value = cloneDeep(target.row[props.col.field]);
34
- await new Promise((resolve) => setTimeout(resolve));
35
- (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
36
- return;
37
- }
38
- const old = target.row[props.col.field];
31
+ editContent.value = cloneDeep(target.row[props.col.field]);
32
+ await new Promise((resolve) => setTimeout(resolve));
33
+ (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
34
+ return;
35
+ }
36
+ async function onClose(target) {
39
37
  if (!target)
40
38
  return;
39
+ const old = target.row[props.col.field];
41
40
  if (!isObject(editContent.value) && !isArray(editContent.value)) {
42
41
  if (old === editContent.value)
43
42
  return;
44
43
  }
45
- target.rawRow[props.col.field] = editContent.value;
46
44
  emit("formChange", {
47
45
  value: editContent.value,
48
- row: target.row,
46
+ row: props.row,
49
47
  column: props.col,
50
48
  index: target.index
51
49
  });
52
50
  }
51
+ function updateShow(show2) {
52
+ show2 ? onShow(getRowData(props.row)) : onClose(getRowData(props.row));
53
+ }
53
54
  const style = {
54
55
  border: "1px solid #f5f5f5",
55
56
  padding: "4px 0 4px 4px",
@@ -41,7 +41,19 @@ declare const _default: import("vue").DefineComponent<{
41
41
  rawRow: AnyObject;
42
42
  row: AnyObject;
43
43
  } | undefined;
44
- updateShow: (show: boolean) => Promise<void>;
44
+ onShow: (target: {
45
+ separateData: Record<string, string>;
46
+ index: number;
47
+ rawRow: AnyObject;
48
+ row: AnyObject;
49
+ } | undefined) => Promise<void>;
50
+ onClose: (target: {
51
+ separateData: Record<string, string>;
52
+ index: number;
53
+ rawRow: AnyObject;
54
+ row: AnyObject;
55
+ } | undefined) => Promise<void>;
56
+ updateShow: (show: boolean) => void;
45
57
  style: CSSProperties;
46
58
  SlotRender: import("vue").DefineComponent<{
47
59
  renderer: {
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, createVNode, mergeProps } from 'vue';
2
2
  import { NTimePicker } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var editTime = defineComponent({
5
6
  name: "EditTime",
@@ -30,6 +31,10 @@ var editTime = defineComponent({
30
31
  attrs,
31
32
  emit
32
33
  }) {
34
+ const {
35
+ formRef,
36
+ isShow
37
+ } = useCommon(props, attrs);
33
38
  const onUpdateValue = (value) => {
34
39
  emit("formChange", {
35
40
  value,
@@ -44,7 +49,11 @@ var editTime = defineComponent({
44
49
  format: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
45
50
  ...props.col.componentProps || {}
46
51
  };
47
- return () => createVNode(NTimePicker, mergeProps(attrs, config, {
52
+ return () => createVNode(NTimePicker, mergeProps({
53
+ "ref": formRef,
54
+ "show": isShow.value,
55
+ "onUpdate:show": ($event) => isShow.value = $event
56
+ }, attrs, config, {
48
57
  "onUpdateFormattedValue": onUpdateValue
49
58
  }), null);
50
59
  }
@@ -0,0 +1,4 @@
1
+ export declare const useCommon: (props: any, attrs: any) => {
2
+ formRef: import("vue").Ref<HTMLElement | null>;
3
+ isShow: import("vue").Ref<boolean>;
4
+ };
@@ -0,0 +1,19 @@
1
+ import { ref, onMounted } from 'vue';
2
+
3
+ const useCommon = (props, attrs) => {
4
+ const formRef = ref(null);
5
+ const isShow = ref(false);
6
+ onMounted(() => {
7
+ var _a;
8
+ if (attrs.editTrigger !== "manual") {
9
+ (_a = formRef.value) == null ? void 0 : _a.focus();
10
+ isShow.value = true;
11
+ }
12
+ });
13
+ return {
14
+ formRef,
15
+ isShow
16
+ };
17
+ };
18
+
19
+ export { useCommon };
@@ -96,7 +96,7 @@ export declare const comps: {
96
96
  type: (NumberConstructor | ObjectConstructor)[];
97
97
  default: number;
98
98
  };
99
- }, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
99
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
100
100
  col: {
101
101
  type: ObjectConstructor;
102
102
  default: () => {};
@@ -233,7 +233,19 @@ export declare const comps: {
233
233
  rawRow: import("../../../../src/types").AnyObject;
234
234
  row: import("../../../../src/types").AnyObject;
235
235
  } | undefined;
236
- updateShow: (show: boolean) => Promise<void>;
236
+ onShow: (target: {
237
+ separateData: Record<string, string>;
238
+ index: number;
239
+ rawRow: import("../../../../src/types").AnyObject;
240
+ row: import("../../../../src/types").AnyObject;
241
+ } | undefined) => Promise<void>;
242
+ onClose: (target: {
243
+ separateData: Record<string, string>;
244
+ index: number;
245
+ rawRow: import("../../../../src/types").AnyObject;
246
+ row: import("../../../../src/types").AnyObject;
247
+ } | undefined) => Promise<void>;
248
+ updateShow: (show: boolean) => void;
237
249
  style: import("vue").CSSProperties;
238
250
  SlotRender: import("vue").DefineComponent<{
239
251
  renderer: {
@@ -1458,12 +1470,6 @@ export declare const comps: {
1458
1470
  };
1459
1471
  export declare const useEdit: (props: any, state: any, emit: any, xGrid: any) => {
1460
1472
  initEditTable: () => Promise<void>;
1461
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
1462
- row: any;
1463
- rowIndex: number;
1464
- column: any;
1465
- columnIndex: number;
1466
- }) => boolean;
1467
1473
  deleteRow: (row: any, col: any, index: number) => void;
1468
1474
  onClickSelectTable: (row: any) => Promise<void>;
1469
1475
  onFormChange: ({ value, row, column, index }: {
@@ -34,25 +34,6 @@ const useEdit = (props, state, emit, xGrid) => {
34
34
  xGrid.value.remove(row);
35
35
  emit("clickBtn", { row, column: col, index });
36
36
  };
37
- const activeMethod = ({
38
- row,
39
- rowIndex,
40
- column,
41
- columnIndex
42
- }) => {
43
- var _a;
44
- const { isEdit, fieldList } = props.columnConfig;
45
- if (isEdit) {
46
- const isEditCol = ((_a = fieldList.find((v) => v.columnName === column.field)) == null ? void 0 : _a.isEdit) || false;
47
- if (isEditCol) {
48
- return true;
49
- } else {
50
- return false;
51
- }
52
- } else {
53
- return false;
54
- }
55
- };
56
37
  const onClickSelectTable = async (row) => {
57
38
  emit("clickSelectTable", { row });
58
39
  const record = {
@@ -131,7 +112,6 @@ const useEdit = (props, state, emit, xGrid) => {
131
112
  };
132
113
  return {
133
114
  initEditTable,
134
- activeMethod,
135
115
  deleteRow,
136
116
  onClickSelectTable,
137
117
  onFormChange,
@@ -538,6 +538,12 @@ body > .vxe-table--tooltip-wrapper {
538
538
  margin-right: 6px;
539
539
  box-shadow: 0px 2px 4px 0px rgba(99, 129, 249, 0.5);
540
540
  }
541
+ .custom-big-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle {
542
+ box-shadow: 4px 0 4px 0 rgba(0, 0, 0, 0.12);
543
+ }
544
+ .custom-big-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle {
545
+ box-shadow: -4px 0 4px 0 rgba(0, 0, 0, 0.12);
546
+ }
541
547
  .annotation-edit {
542
548
  cursor: pointer;
543
549
  color: #0067ee;
@@ -52,6 +52,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
52
52
  default: string;
53
53
  type: StringConstructor;
54
54
  };
55
+ token: {
56
+ type: StringConstructor;
57
+ };
55
58
  }, {
56
59
  $message: import("naive-ui").MessageApi;
57
60
  printInstance: any;
@@ -107,6 +110,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
107
110
  default: string;
108
111
  type: StringConstructor;
109
112
  };
113
+ token: {
114
+ type: StringConstructor;
115
+ };
110
116
  }>> & {
111
117
  onError?: ((...args: any[]) => any) | undefined;
112
118
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7356,6 +7362,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
7356
7362
  default: string;
7357
7363
  type: StringConstructor;
7358
7364
  };
7365
+ token: {
7366
+ type: StringConstructor;
7367
+ };
7359
7368
  }>> & {
7360
7369
  onError?: ((...args: any[]) => any) | undefined;
7361
7370
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -53,6 +53,9 @@ declare const _default: import("vue").DefineComponent<{
53
53
  default: string;
54
54
  type: StringConstructor;
55
55
  };
56
+ token: {
57
+ type: StringConstructor;
58
+ };
56
59
  }, {
57
60
  $message: import("naive-ui").MessageApi;
58
61
  printInstance: any;
@@ -111,6 +114,9 @@ declare const _default: import("vue").DefineComponent<{
111
114
  default: string;
112
115
  type: StringConstructor;
113
116
  };
117
+ token: {
118
+ type: StringConstructor;
119
+ };
114
120
  }>> & {
115
121
  onError?: ((...args: any[]) => any) | undefined;
116
122
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7363,6 +7369,9 @@ declare const _default: import("vue").DefineComponent<{
7363
7369
  default: string;
7364
7370
  type: StringConstructor;
7365
7371
  };
7372
+ token: {
7373
+ type: StringConstructor;
7374
+ };
7366
7375
  }>> & {
7367
7376
  onError?: ((...args: any[]) => any) | undefined;
7368
7377
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -59,6 +59,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  noDataMsg: {
60
60
  default: "\u8BF7\u9009\u4E2D\u9700\u8981\u6253\u5370\u7684\u6570\u636E",
61
61
  type: String
62
+ },
63
+ token: {
64
+ type: String
62
65
  }
63
66
  },
64
67
  emits: ["success", "error", "clickoutside"],
@@ -136,7 +139,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
136
139
  const getPrintParams = (index = 0) => {
137
140
  var _a;
138
141
  const params = ((_a = props.printParams) == null ? void 0 : _a.length) ? props.printParams[index] : state.printParams[index];
139
- return JSON.stringify(params);
142
+ return JSON.stringify({
143
+ ...params || {},
144
+ ...props.token ? {
145
+ token: props.token
146
+ } : {}
147
+ });
140
148
  };
141
149
  const getOnceParams = () => {
142
150
  var _a, _b;
@@ -176,22 +184,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
176
184
  prevFnError();
177
185
  return Promise.reject();
178
186
  }).then(() => {
187
+ const queryParams = {
188
+ formatId: state.currentFormatId,
189
+ templateId: getTemplateIdByFormatId.value
190
+ };
179
191
  if (props.strategy === "MULTI") {
180
192
  for (let i = 0; i < state.printParams.length; i++) {
181
- const queryParams = {
182
- formatId: state.currentFormatId,
183
- templateId: getTemplateIdByFormatId.value,
193
+ printInstance.printDirect({
194
+ ...queryParams,
184
195
  params: getPrintParams(i)
185
- };
186
- printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
196
+ }, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
187
197
  }
188
198
  } else {
189
- const queryParams = {
190
- formatId: state.currentFormatId,
191
- templateId: getTemplateIdByFormatId.value,
199
+ printInstance.printDirect({
200
+ ...queryParams,
192
201
  params: getOnceParams()
193
- };
194
- printInstance.printDirect(queryParams, (res) => {
202
+ }, (res) => {
195
203
  callLocalServicesSuccessCb(res, "print");
196
204
  }, callLocalServicesErrorCb);
197
205
  }
@@ -22,9 +22,10 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
22
22
  const mainScaleWidth = 9;
23
23
  const subScaleWidth = 5;
24
24
  function drawScaleNumber(text, item, left2, top) {
25
+ const { position } = item;
25
26
  return new fabric.Text(String(text), {
26
27
  ...defaultTextStyle,
27
- originX: item.position || "center",
28
+ originX: position == "left" ? "right" : position == "right" ? "left" : "center",
28
29
  left: left2,
29
30
  top,
30
31
  ...item.style
@@ -35,13 +36,13 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
35
36
  let lineXMain = [scaleLeft - mainScaleWidth / 2, scaleLeft + mainScaleWidth / 2];
36
37
  let lineXSub = [scaleLeft - subScaleWidth / 2, scaleLeft + subScaleWidth / 2];
37
38
  let textLeft = scaleLeft;
38
- if (position === "left") {
39
+ if (position === "right") {
39
40
  scaleLeft = x;
40
41
  lineXMain = [scaleLeft, scaleLeft + mainScaleWidth];
41
42
  lineXSub = [scaleLeft, scaleLeft + subScaleWidth];
42
43
  textLeft = lineXMain[1];
43
44
  }
44
- if (position === "right") {
45
+ if (position === "left") {
45
46
  scaleLeft = x + width;
46
47
  lineXMain = [scaleLeft - mainScaleWidth, scaleLeft];
47
48
  lineXSub = [scaleLeft - subScaleWidth, scaleLeft];