@pisell/materials 2.2.4 → 2.2.6

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.
@@ -15,6 +15,16 @@
15
15
  margin-top: 12px;
16
16
  }
17
17
  }
18
+
19
+ .pisell-lowcode-checkbox{
20
+ position: static;
21
+ width: auto!important;
22
+ height: auto!important;
23
+ }
24
+
25
+ .pisell-lowcode-checkbox-inner, .pisell-lowcode-radio-inner{
26
+ position: relative
27
+ }
18
28
  }
19
29
 
20
30
  .materials-grid-table-wrap {
@@ -1,6 +1,6 @@
1
- import type { FormInstance } from "antd/es/form";
2
- import React from "react";
3
- import "./index.less";
1
+ import type { FormInstance } from 'antd/es/form';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  export declare const EditableContext: React.Context<FormInstance<any> | null>;
5
5
  interface Item {
6
6
  key: string;
@@ -10,7 +10,7 @@ interface Item {
10
10
  }
11
11
  export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
12
  index: number;
13
- "data-row-key": string;
13
+ 'data-row-key': string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
16
  __is_drag_sort?: boolean;
@@ -15,12 +15,12 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
- import { Form, Tooltip } from "antd";
19
- import { useSortable } from "@dnd-kit/sortable";
20
- import { CSS } from "@dnd-kit/utilities";
21
- import { MenuOutlined } from "@ant-design/icons";
22
- import classNames from "classnames";
23
- import React, { useMemo } from "react";
18
+ import { Form, Tooltip } from 'antd';
19
+ import { useSortable } from '@dnd-kit/sortable';
20
+ import { CSS } from '@dnd-kit/utilities';
21
+ import { MenuOutlined } from '@ant-design/icons';
22
+ import classNames from 'classnames';
23
+ import React, { useMemo } from 'react';
24
24
  import CellProvider from "./CellProvider";
25
25
  import { getText } from "../../../../../locales";
26
26
  import "./index.less";
@@ -35,9 +35,9 @@ var EditableRow = function EditableRow(_ref) {
35
35
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
36
36
  form = _Form$useForm2[0];
37
37
  var parentForm = Form.useFormInstance();
38
- var order_by = Form.useWatch("order_by", parentForm);
38
+ var order_by = Form.useWatch('order_by', parentForm);
39
39
  var _useSortable = useSortable({
40
- id: props["data-row-key"]
40
+ id: props['data-row-key']
41
41
  }),
42
42
  attributes = _useSortable.attributes,
43
43
  listeners = _useSortable.listeners,
@@ -52,7 +52,7 @@ var EditableRow = function EditableRow(_ref) {
52
52
  })),
53
53
  transition: transition
54
54
  }, isDragging && __is_drag_sort ? {
55
- position: "relative",
55
+ position: 'relative',
56
56
  zIndex: 9999
57
57
  } : {});
58
58
  var cells = useMemo(function () {
@@ -60,20 +60,14 @@ var EditableRow = function EditableRow(_ref) {
60
60
  return children;
61
61
  }
62
62
  return React.Children.map(children, function (child) {
63
- if (child.key === "__sort") {
63
+ if (child.key === '__sort') {
64
64
  var handleIcon = order_by ? /*#__PURE__*/React.createElement(Tooltip, {
65
- title: getText("table-column-drag-sort-disabled-tip")
65
+ title: getText('table-column-drag-sort-disabled-tip')
66
66
  }, /*#__PURE__*/React.createElement(MenuOutlined, {
67
- style: {
68
- touchAction: "none",
69
- cursor: "move"
70
- }
67
+ className: "pisell-lowcode-menu-out-lined-icon"
71
68
  })) : /*#__PURE__*/React.createElement(MenuOutlined, _extends({
72
69
  ref: setActivatorNodeRef,
73
- style: {
74
- touchAction: "none",
75
- cursor: "move"
76
- }
70
+ className: "pisell-lowcode-menu-out-lined-icon"
77
71
  }, listeners));
78
72
  return /*#__PURE__*/React.cloneElement(child, {
79
73
  children: handleIcon
@@ -108,7 +102,7 @@ var EditableCell = function EditableCell(props) {
108
102
  render = props.render,
109
103
  restProps = _objectWithoutProperties(props, _excluded2);
110
104
  return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
111
- className: classNames(restProps.className, "ant-table-cell", "materials-grid-table-cell")
105
+ className: classNames(restProps.className, 'ant-table-cell', 'materials-grid-table-cell')
112
106
  }), /*#__PURE__*/React.createElement(CellProvider, props));
113
107
  };
114
108
  export default {
@@ -3,6 +3,19 @@
3
3
  height: 100%;
4
4
  }
5
5
 
6
+ .pisell-lowcode-menu-out-lined-icon{
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ cursor: move;
16
+ touch-action: none;
17
+ }
18
+
6
19
  .materials-grid-table-cell {
7
20
  padding: 12px;
8
21
  }
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
4
  export default _default;
@@ -1,5 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport"];
2
+ var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport", "currentComponentId"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -14,9 +14,9 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
- import { useSize } from "ahooks";
18
- import { Form } from "antd";
19
- import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from "react";
17
+ import { useSize } from 'ahooks';
18
+ import { Form } from 'antd';
19
+ import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
20
20
  import { useSharedState } from "../../hooks";
21
21
  import useEngineContext from "../../hooks/useEngineContext";
22
22
  import Actions from "./Actions";
@@ -32,7 +32,7 @@ import useTriggerValuesChange from "./hooks/useTriggerValuesChange";
32
32
  import { Context, Provider, formatColumn } from "./model";
33
33
  import "./index.less";
34
34
  var defaultView = {
35
- defaultViewMode: "grid",
35
+ defaultViewMode: 'grid',
36
36
  multiple: false,
37
37
  modeList: []
38
38
  };
@@ -56,6 +56,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
56
56
  gallery = props.gallery,
57
57
  currentSettingKey = props.currentSettingKey,
58
58
  exportImport = props.exportImport,
59
+ currentComponentId = props.currentComponentId,
59
60
  other = _objectWithoutProperties(props, _excluded);
60
61
  var modal = useSharedState(Context);
61
62
  var _Form$useForm = Form.useForm(),
@@ -63,7 +64,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
63
64
  form = _Form$useForm2[0];
64
65
  var defaultViewMode = view.defaultViewMode,
65
66
  multiple = view.multiple;
66
- var viewMode = Form.useWatch("view_mode", {
67
+ var viewMode = Form.useWatch('view_mode', {
67
68
  form: form,
68
69
  preserve: true
69
70
  });
@@ -76,11 +77,12 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
76
77
  width = _ref.width;
77
78
  var utils = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
78
79
  var tableId = useMemo(function () {
79
- if (props.__designMode === "design") {
80
- return "designMode-mock-table-id";
80
+ console.log(props, 'wh');
81
+ if (props.__designMode === 'design') {
82
+ return 'designMode-mock-table-id';
81
83
  }
82
- return props.__id;
83
- }, [props.__id, props.__designMode]);
84
+ return (props === null || props === void 0 ? void 0 : props.currentComponentId) || props.__id;
85
+ }, [props.__id, props.__designMode, props === null || props === void 0 ? void 0 : props.currentComponentId]);
84
86
  var columns = useMemo(function () {
85
87
  return propsColumns.filter(function (item) {
86
88
  return !item.hidden;
@@ -120,7 +122,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
120
122
  return _columns;
121
123
  }, [columns]);
122
124
  var currentSettingHash = useMemo(function () {
123
- return currentSettingKey || getHash(removeTitleColumns) || "";
125
+ return currentSettingKey || getHash(removeTitleColumns) || '';
124
126
  }, [currentSettingKey, JSON.stringify(removeTitleColumns)]);
125
127
  useEffect(function () {
126
128
  var setting = getTableSettingFromLocalStorage(tableId);
@@ -131,7 +133,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
131
133
  useEffect(function () {
132
134
  if (width) {
133
135
  modal.dispatch({
134
- type: "setTableWidth",
136
+ type: 'setTableWidth',
135
137
  payload: width || {}
136
138
  });
137
139
  }
@@ -161,13 +163,13 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
161
163
  });
162
164
  useEffect(function () {
163
165
  modal.dispatch({
164
- type: "setUtils",
166
+ type: 'setUtils',
165
167
  payload: utils || {}
166
168
  });
167
169
  }, [utils]);
168
170
  useEffect(function () {
169
171
  modal.dispatch({
170
- type: "setDefaultColumns",
172
+ type: 'setDefaultColumns',
171
173
  payload: mergeColumnSetting({
172
174
  columns: columns,
173
175
  tableId: tableId,
@@ -175,36 +177,36 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
175
177
  })
176
178
  });
177
179
  modal.dispatch({
178
- type: "setOriginColumns",
180
+ type: 'setOriginColumns',
179
181
  payload: columns
180
182
  });
181
183
  }, [columns, tableId, currentViewMode]);
182
184
  useEffect(function () {
183
185
  modal.dispatch({
184
- type: "setDataSource",
186
+ type: 'setDataSource',
185
187
  payload: dataSource
186
188
  });
187
189
  modal.dispatch({
188
- type: "setOriginDataSource",
190
+ type: 'setOriginDataSource',
189
191
  payload: dataSource
190
192
  });
191
193
  }, [dataSource]);
192
194
  useEffect(function () {
193
195
  modal.dispatch({
194
- type: "setTableId",
196
+ type: 'setTableId',
195
197
  payload: tableId
196
198
  });
197
199
  }, [tableId]);
198
200
  useEffect(function () {
199
201
  var _other$pagination;
200
202
  modal.dispatch({
201
- type: "setLocalPagination",
203
+ type: 'setLocalPagination',
202
204
  payload: other === null || other === void 0 ? void 0 : (_other$pagination = other.pagination) === null || _other$pagination === void 0 ? void 0 : _other$pagination.localPagination
203
205
  });
204
206
  }, [other === null || other === void 0 ? void 0 : (_other$pagination2 = other.pagination) === null || _other$pagination2 === void 0 ? void 0 : _other$pagination2.localPagination]);
205
207
  useEffect(function () {
206
208
  setTimeout(function () {
207
- document.body.id = "body";
209
+ document.body.id = 'body';
208
210
  }, 200);
209
211
  }, []);
210
212
  var filterDefaultValues = useMemo(function () {
@@ -238,8 +240,8 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
238
240
  useEffect(function () {
239
241
  // 虚拟表columns由接口获取 columns变更时只重新设置tableSetting
240
242
  // 直接设置column_setting对象时useWatch监听数据有误,先设置{}后再设置useWatch可以监听到变更数据
241
- form.setFieldValue("column_setting", {});
242
- form.setFieldValue("column_setting", tableSettingRef.current.column_setting);
243
+ form.setFieldValue('column_setting', {});
244
+ form.setFieldValue('column_setting', tableSettingRef.current.column_setting);
243
245
  // JSON.stringify会丢失 render函数变更的监听 使用自定义stringify处理
244
246
  }, [stringify(removeTitleColumns)]);
245
247
  useEffect(function () {
@@ -254,7 +256,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
254
256
  var _values = _objectSpread(_objectSpread({}, form.getFieldsValue(true)), values.filters || {});
255
257
  var _cur = _objectSpread(_objectSpread({}, cur), cur.filters || {});
256
258
  var currentKey = Object.keys(cur)[0];
257
- if (currentKey !== "pagination") {
259
+ if (currentKey !== 'pagination') {
258
260
  _values.pagination = _objectSpread(_objectSpread({}, _values.pagination), {}, {
259
261
  page: 1
260
262
  });
@@ -277,11 +279,11 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
277
279
  if (!getIsTriggerValuesChange(cur, values)) {
278
280
  return;
279
281
  }
280
- _onValuesChange === null || _onValuesChange === void 0 ? void 0 : _onValuesChange(omit(_cur, ["filters"]), _values);
282
+ _onValuesChange === null || _onValuesChange === void 0 ? void 0 : _onValuesChange(omit(_cur, ['filters']), _values);
281
283
  },
282
284
  className: "materials-grid-form-wrap"
283
285
  }, /*#__PURE__*/React.createElement("div", {
284
- className: "materials-grid",
286
+ className: 'materials-grid',
285
287
  style: style,
286
288
  ref: wrapRef
287
289
  }, /*#__PURE__*/React.createElement(Header, {
@@ -212,7 +212,11 @@ export declare type GridViewProps = {
212
212
  /**
213
213
  * 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
214
214
  */
215
- currentSettingKey?: "";
215
+ currentSettingKey?: string;
216
+ /**
217
+ * 当前本地配置的唯一值, 不填默认使用currentSettingKey
218
+ */
219
+ currentComponentId?: string;
216
220
  /**
217
221
  * 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
218
222
  * @param currentDataSource
@@ -15,6 +15,16 @@
15
15
  margin-top: 12px;
16
16
  }
17
17
  }
18
+
19
+ .pisell-lowcode-checkbox{
20
+ position: static;
21
+ width: auto!important;
22
+ height: auto!important;
23
+ }
24
+
25
+ .pisell-lowcode-checkbox-inner, .pisell-lowcode-radio-inner{
26
+ position: relative
27
+ }
18
28
  }
19
29
 
20
30
  .materials-grid-table-wrap {
@@ -1,6 +1,6 @@
1
- import type { FormInstance } from "antd/es/form";
2
- import React from "react";
3
- import "./index.less";
1
+ import type { FormInstance } from 'antd/es/form';
2
+ import React from 'react';
3
+ import './index.less';
4
4
  export declare const EditableContext: React.Context<FormInstance<any> | null>;
5
5
  interface Item {
6
6
  key: string;
@@ -10,7 +10,7 @@ interface Item {
10
10
  }
11
11
  export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
12
  index: number;
13
- "data-row-key": string;
13
+ 'data-row-key': string;
14
14
  __is_group?: boolean;
15
15
  __table_group_field?: string;
16
16
  __is_drag_sort?: boolean;
@@ -80,11 +80,11 @@ var EditableRow = ({
80
80
  }
81
81
  return import_react.default.Children.map(children, (child) => {
82
82
  if (child.key === "__sort") {
83
- const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { style: { touchAction: "none", cursor: "move" } })) : /* @__PURE__ */ import_react.default.createElement(
83
+ const handleIcon = order_by ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-drag-sort-disabled-tip") }, /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, { className: "pisell-lowcode-menu-out-lined-icon" })) : /* @__PURE__ */ import_react.default.createElement(
84
84
  import_icons.MenuOutlined,
85
85
  {
86
86
  ref: setActivatorNodeRef,
87
- style: { touchAction: "none", cursor: "move" },
87
+ className: "pisell-lowcode-menu-out-lined-icon",
88
88
  ...listeners
89
89
  }
90
90
  );
@@ -3,6 +3,19 @@
3
3
  height: 100%;
4
4
  }
5
5
 
6
+ .pisell-lowcode-menu-out-lined-icon{
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ cursor: move;
16
+ touch-action: none;
17
+ }
18
+
6
19
  .materials-grid-table-cell {
7
20
  padding: 12px;
8
21
  }
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
4
  export default _default;
@@ -76,6 +76,7 @@ var GridView = (0, import_model.Provider)(
76
76
  currentSettingKey,
77
77
  // pagination,
78
78
  exportImport,
79
+ currentComponentId,
79
80
  ...other
80
81
  } = props;
81
82
  const modal = (0, import_hooks.useSharedState)(import_model.Context);
@@ -90,11 +91,12 @@ var GridView = (0, import_model.Provider)(
90
91
  const { width } = (0, import_ahooks.useSize)(wrapRef) || {};
91
92
  const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
92
93
  const tableId = (0, import_react.useMemo)(() => {
94
+ console.log(props, "wh");
93
95
  if (props.__designMode === "design") {
94
96
  return "designMode-mock-table-id";
95
97
  }
96
- return props.__id;
97
- }, [props.__id, props.__designMode]);
98
+ return (props == null ? void 0 : props.currentComponentId) || props.__id;
99
+ }, [props.__id, props.__designMode, props == null ? void 0 : props.currentComponentId]);
98
100
  const columns = (0, import_react.useMemo)(() => {
99
101
  return propsColumns.filter((item) => !item.hidden);
100
102
  }, [propsColumns]);
@@ -212,7 +212,11 @@ export declare type GridViewProps = {
212
212
  /**
213
213
  * 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
214
214
  */
215
- currentSettingKey?: "";
215
+ currentSettingKey?: string;
216
+ /**
217
+ * 当前本地配置的唯一值, 不填默认使用currentSettingKey
218
+ */
219
+ currentComponentId?: string;
216
220
  /**
217
221
  * 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
218
222
  * @param currentDataSource
@@ -81,6 +81,15 @@ export default {
81
81
  },
82
82
  propType: "string",
83
83
  setter: "StringSetter",
84
+ },
85
+ {
86
+ name: "currentComponentId",
87
+ title: {
88
+ label: "currentComponentId",
89
+ tip: "currentComponentId | 当前本地配置的唯一值 不填默认使用currentSettingKey",
90
+ },
91
+ propType: "string",
92
+ setter: "StringSetter",
84
93
  }
85
94
  ],
86
95
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",