@zhenliang/sheet 0.0.4 → 0.0.5

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.
@@ -13,5 +13,6 @@
13
13
  .ant-input-number-group-addon{
14
14
  background: transparent;
15
15
  border: none;
16
+ padding:0
16
17
  }
17
18
  }
@@ -57,7 +57,7 @@ export var mouseReducer = {
57
57
  row = _ref2.row,
58
58
  col = _ref2.col;
59
59
  var data = state.data;
60
- if (state.mouseDown === false || data !== null && data !== void 0 && data[row][col].readonly) return state;
60
+ if (state.mouseDown === false || data !== null && data !== void 0 && data[row][col].fixed) return state;
61
61
  return _objectSpread(_objectSpread({}, state), {}, {
62
62
  end: {
63
63
  row: row,
@@ -106,6 +106,10 @@ span.harvest-sheet-container, span.harvest-sheet-container:focus {
106
106
 
107
107
 
108
108
  }
109
+
110
+ &.fixed-unset{
111
+ position: unset;
112
+ }
109
113
  }
110
114
 
111
115
 
@@ -12,7 +12,7 @@ export var SwitchViewer = function SwitchViewer(props) {
12
12
  eventBus.emit('cell-switch', {
13
13
  row: row,
14
14
  record: record,
15
- value: value
15
+ value: !value
16
16
  });
17
17
  }, [eventBus, row, record, value]);
18
18
  return /*#__PURE__*/_jsx(Switch, {
@@ -5,7 +5,8 @@ import { SheetTableType } from '.';
5
5
  export declare enum CellAlign {
6
6
  left = "left",
7
7
  center = "center",
8
- right = "right"
8
+ right = "right",
9
+ unset = "unset"
9
10
  }
10
11
  export declare type Cell = {
11
12
  id: string;
@@ -2,6 +2,7 @@ export var CellAlign = /*#__PURE__*/function (CellAlign) {
2
2
  CellAlign["left"] = "left";
3
3
  CellAlign["center"] = "center";
4
4
  CellAlign["right"] = "right";
5
+ CellAlign["unset"] = "unset";
5
6
  return CellAlign;
6
7
  }({});
7
8
 
@@ -4,11 +4,10 @@ export declare type refAssertion = {
4
4
  contains?: (target: EventTarget | null) => boolean;
5
5
  focus?: () => boolean;
6
6
  } & HTMLTableSectionElement;
7
- export declare type CellAlign = 'left' | 'right' | 'center';
8
7
  export declare type CellFixed = 'left' | 'right';
9
8
  export declare type ColumnProps = {
10
- align?: CellAlign;
11
- fixed?: CellFixed;
9
+ align?: SheetType.CellAlign;
10
+ fixed?: Omit<CellFixed, 'center'>;
12
11
  width?: string | number;
13
12
  dataIndex?: string;
14
13
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",