@zhenliang/sheet 0.1.85 → 0.1.86-beta

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.
@@ -3,28 +3,23 @@
3
3
  .hideColBar {
4
4
  &::-webkit-scrollbar {
5
5
  width: 0;
6
- }
7
- }
6
+ height: 10px;
8
7
 
9
- .tableWarpScroll {
10
- &::-webkit-scrollbar {
11
- display: none;
12
8
  }
13
9
 
14
- &:hover {
15
- &::-webkit-scrollbar {
16
- display: block;
17
- height: 30px;
10
+ &::-webkit-scrollbar-thumb {
11
+ background-color: white;
18
12
  }
19
-
13
+ &:hover {
20
14
  &::-webkit-scrollbar-thumb {
21
- border-top: 10px solid #fff;
22
15
  height: 10px;
23
- border-bottom: 10px solid #fff;
16
+ background-color: #d8dfeb;
24
17
  }
25
18
  }
26
19
  }
27
20
 
21
+
22
+
28
23
  .harvest-sheet-container {
29
24
  display: block;
30
25
  position: relative;
@@ -146,6 +146,8 @@ var Table = function Table(_ref) {
146
146
  return {
147
147
  col: item.col,
148
148
  row: item.row,
149
+ tableCol: item.col - offset,
150
+ tableRow: item.row,
149
151
  id: item.id,
150
152
  key: item.key || columns[item.col - offset].dataIndex,
151
153
  value: item.value
@@ -154,6 +156,8 @@ var Table = function Table(_ref) {
154
156
  return {
155
157
  col: item.col,
156
158
  row: item.row,
159
+ tableCol: item.col - offset,
160
+ tableRow: item.row,
157
161
  id: item.id,
158
162
  key: item.key || columns[item.col - offset].dataIndex,
159
163
  value: item.value
@@ -97,7 +97,6 @@ var App = function App() {
97
97
  state = _useState2[0],
98
98
  setState = _useState2[1];
99
99
  var handleChange = useCallback(function (changes) {
100
- // console.log(extChange);
101
100
  var newState = cloneDeep(state);
102
101
  var flatNewState = newState.reduce(function (left, right) {
103
102
  return [].concat(_toConsumableArray(left), [right], _toConsumableArray(right.children || []));
@@ -116,7 +115,6 @@ var App = function App() {
116
115
  return item.id === id;
117
116
  });
118
117
  newState[parentIndex].children[childIndex][key] = value;
119
- // newState[row][key] = value;
120
118
  });
121
119
  setState(newState);
122
120
  }, [state]);
@@ -131,15 +129,9 @@ var App = function App() {
131
129
  marginLeft: '10px',
132
130
  bottom: '5px',
133
131
  right: '5px'
134
- }
135
- // expandable={{
136
- // expandedRowRender: (record) => (
137
- // <p style={{ margin: 0 }}>{record.description}</p>
138
- // ),
139
- // rowExpandable: (record) => record.name !== 'Not Expandable',
140
- // }}
141
- ,
132
+ },
142
133
  dataSource: state,
134
+ handleAdd: function handleAdd() {},
143
135
  onChange: handleChange
144
136
  });
145
137
  };
@@ -44,6 +44,8 @@ export type ColumnProps = {
44
44
  export type TableChange = {
45
45
  col?: number;
46
46
  row: number;
47
+ tableCol?: number;
48
+ tableRow?: number;
47
49
  id: string;
48
50
  key: string;
49
51
  value: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.85",
3
+ "version": "0.1.86-beta",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",