cnhis-design-vue 3.1.14-beta.1 → 3.1.14-beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2952,15 +2952,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2952
2952
  }) => Promise<any>;
2953
2953
  getAsyncTableData: (params: any) => Promise<void>;
2954
2954
  setChecklist: (list: any) => any;
2955
- colspanMethod: ({ row, column, _rowIndex, _columnIndex }: {
2956
- row: any;
2957
- column: any;
2958
- _rowIndex: any;
2959
- _columnIndex: any;
2960
- }) => {
2961
- rowspan: number;
2962
- colspan: number;
2963
- } | undefined;
2955
+ colspanMethod: (payload: any) => any;
2964
2956
  footerRowspanMethod: (obj: any) => {
2965
2957
  rowspan: number;
2966
2958
  colspan: number;
@@ -1084,15 +1084,16 @@ declare const _default: import("vue").DefineComponent<{
1084
1084
  textColorDisabledSuccess: string;
1085
1085
  textColorTextSuccess: string;
1086
1086
  textColorTextHoverSuccess: string;
1087
- textColorTextPressedSuccess: string; /**
1088
- * 删除选中scan数据
1089
- */
1087
+ textColorTextPressedSuccess: string;
1090
1088
  textColorTextFocusSuccess: string;
1091
1089
  textColorTextDisabledSuccess: string;
1092
1090
  textColorGhostSuccess: string;
1093
1091
  textColorGhostHoverSuccess: string;
1094
1092
  textColorGhostPressedSuccess: string;
1095
1093
  textColorGhostFocusSuccess: string;
1094
+ /**
1095
+ * 删除选中scan数据
1096
+ */
1096
1097
  textColorGhostDisabledSuccess: string;
1097
1098
  borderSuccess: string;
1098
1099
  borderHoverSuccess: string;
@@ -1135,7 +1136,14 @@ declare const _default: import("vue").DefineComponent<{
1135
1136
  textColorHoverError: string;
1136
1137
  textColorPressedError: string;
1137
1138
  textColorFocusError: string;
1138
- textColorDisabledError: string;
1139
+ textColorDisabledError: string; /**
1140
+ * 初始化props
1141
+ * @param {*} unionItem
1142
+ * @param {*} row
1143
+ * @param {*} column
1144
+ * @param {*} $rowIndex
1145
+ * @returns
1146
+ */
1139
1147
  textColorTextError: string;
1140
1148
  textColorTextHoverError: string;
1141
1149
  textColorTextPressedError: string;
@@ -1670,7 +1678,22 @@ declare const _default: import("vue").DefineComponent<{
1670
1678
  onBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
1671
1679
  onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
1672
1680
  onChange: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
1673
- onClear: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
1681
+ onClear: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>; /**
1682
+ * 针对 bigTable 的设置列
1683
+ * type: 列的类型
1684
+ * field: 列字段名(注:属性层级越深,渲染性能将直线下降)
1685
+ * title: 列标题(支持开启国际化)
1686
+ * width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
1687
+ * minWidth: 最小列宽度;会自动将剩余空间按比例分配
1688
+ * resizable: 列是否允许拖动列宽调整大小
1689
+ * visible: 列是否显示
1690
+ * fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
1691
+ * align: 列对齐方式
1692
+ * headerAlign: 表头列的对齐方式
1693
+ * footerAlign: 表尾列的对齐方式
1694
+ * formatter: 格式化显示内容 Function({cellValue, row, column})
1695
+ * sortable: 是否允许列排序
1696
+ */
1674
1697
  status: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
1675
1698
  'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
1676
1699
  onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
@@ -2952,15 +2975,7 @@ declare const _default: import("vue").DefineComponent<{
2952
2975
  }) => Promise<any>;
2953
2976
  getAsyncTableData: (params: any) => Promise<void>;
2954
2977
  setChecklist: (list: any) => any;
2955
- colspanMethod: ({ row, column, _rowIndex, _columnIndex }: {
2956
- row: any;
2957
- column: any;
2958
- _rowIndex: any;
2959
- _columnIndex: any;
2960
- }) => {
2961
- rowspan: number;
2962
- colspan: number;
2963
- } | undefined;
2978
+ colspanMethod: (payload: any) => any;
2964
2979
  footerRowspanMethod: (obj: any) => {
2965
2980
  rowspan: number;
2966
2981
  colspan: number;
@@ -4042,9 +4057,6 @@ declare const _default: import("vue").DefineComponent<{
4042
4057
  readonly color: StringConstructor;
4043
4058
  readonly component: import("vue").PropType<import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
4044
4059
  readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Icon", {
4045
- /**
4046
- * computed
4047
- */
4048
4060
  color: string;
4049
4061
  opacity1Depth: string;
4050
4062
  opacity2Depth: string;
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, mergeProps, withCtx, renderSlot, createBlock, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
2
+ import { isFunction } from 'lodash-es';
2
3
  import { useSeparateRow } from '../../../packages/big-table/src/hooks/useSeparateRow';
3
4
  import bigTableState from './bigTableState.js';
4
5
  import bigTableProps from './bigTableProps.js';
@@ -517,6 +518,7 @@ var script = /* @__PURE__ */ defineComponent({
517
518
  return columns;
518
519
  };
519
520
  const formatterEdit = (params, col) => {
521
+ console.log(params, col);
520
522
  let {
521
523
  row,
522
524
  column,
@@ -1121,13 +1123,18 @@ var script = /* @__PURE__ */ defineComponent({
1121
1123
  };
1122
1124
  });
1123
1125
  };
1124
- const colspanMethod = ({
1125
- row,
1126
- column,
1127
- _rowIndex,
1128
- _columnIndex
1129
- }) => {
1126
+ const colspanMethod = (payload) => {
1130
1127
  var _a;
1128
+ const {
1129
+ row,
1130
+ column,
1131
+ _rowIndex,
1132
+ _columnIndex
1133
+ } = payload;
1134
+ if (isFunction(attr.spanMethod))
1135
+ return attr.spanMethod(payload);
1136
+ if (isFunction(attr["span-method"]))
1137
+ return attr["span-method"](payload);
1131
1138
  if (state.isTree != 3) {
1132
1139
  return {
1133
1140
  rowspan: 1,
@@ -139,6 +139,9 @@ body > .vxe-table--tooltip-wrapper {
139
139
  /* 行内表单样式 */
140
140
  /* 行内表单样式 */
141
141
  }
142
+ .custom-big-table .n-input {
143
+ width: fit-content;
144
+ }
142
145
  .custom-big-table .img-wrap {
143
146
  padding: 2px 0;
144
147
  line-height: 1;
@@ -139,6 +139,9 @@ body > .vxe-table--tooltip-wrapper {
139
139
  /* 行内表单样式 */
140
140
  /* 行内表单样式 */
141
141
  }
142
+ .custom-big-table .n-input {
143
+ width: fit-content;
144
+ }
142
145
  .custom-big-table .img-wrap {
143
146
  padding: 2px 0;
144
147
  line-height: 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.14-beta.1",
4
+ "version": "3.1.14-beta.4",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",