@teamias/rex-pro 0.1.2 → 0.1.3

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.
@@ -72,9 +72,11 @@ export default (function () {
72
72
  id: 1075,
73
73
  detail_id: 1102,
74
74
  status_name: [{
75
- type: 'text',
75
+ type: 'link',
76
76
  props: {
77
- value: 1075
77
+ value: 1075,
78
+ label: '1075',
79
+ action: 'custom'
78
80
  },
79
81
  extra: {
80
82
  rowSpan: 2
@@ -1166,6 +1168,12 @@ export default (function () {
1166
1168
  x: 1000,
1167
1169
  y: h
1168
1170
  };
1171
+ },
1172
+ // onDataCellClick: (...data) => {
1173
+ // console.log('onDataCellClick', data);
1174
+ // },
1175
+ onDataCellClickV2: function onDataCellClickV2(data) {
1176
+ console.log('onDataCellClickV2', data);
1169
1177
  }
1170
1178
  }
1171
1179
  // listTableProps={{
@@ -424,8 +424,8 @@ export var RexProTable = function RexProTable(props) {
424
424
  });
425
425
  }
426
426
  return /*#__PURE__*/_jsx(InlineRexProTable, _objectSpread(_objectSpread({}, props), {}, {
427
- tableProps: _objectSpread(_objectSpread({}, props.tableProps), {}, {
428
- onDataCellClickV2: function onDataCellClickV2(topConfig) {
427
+ tableProps: _objectSpread(_objectSpread({}, props.tableProps), function (_props$tableProps2, _props$tableProps3, _props$tableProps4) {
428
+ var onDataCellClickV2 = function onDataCellClickV2(topConfig) {
429
429
  var _props$tableProps, _props$tableProps$onD;
430
430
  // 主要兼容 来自低代码的数据源
431
431
  var item = topConfig.item,
@@ -459,8 +459,21 @@ export var RexProTable = function RexProTable(props) {
459
459
  }
460
460
  }
461
461
  (_props$tableProps = props.tableProps) === null || _props$tableProps === void 0 || (_props$tableProps$onD = _props$tableProps.onDataCellClickV2) === null || _props$tableProps$onD === void 0 || _props$tableProps$onD.call(_props$tableProps, topConfig);
462
+ };
463
+
464
+ // 优先级处理,如果没有任何点击事件才使用新的 onDataCellClickV2, 作为兼容处理低代码的情况
465
+ if (!((_props$tableProps2 = props.tableProps) !== null && _props$tableProps2 !== void 0 && _props$tableProps2.onDataCellClickV2) && !((_props$tableProps3 = props.tableProps) !== null && _props$tableProps3 !== void 0 && _props$tableProps3.onDataCellClick)) {
466
+ return {
467
+ onDataCellClickV2: onDataCellClickV2
468
+ };
462
469
  }
463
- }),
470
+ if ((_props$tableProps4 = props.tableProps) !== null && _props$tableProps4 !== void 0 && _props$tableProps4.onDataCellClickV2) {
471
+ return {
472
+ onDataCellClickV2: onDataCellClickV2
473
+ };
474
+ }
475
+ return {};
476
+ }()),
464
477
  reload: reload
465
478
  }));
466
479
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/rex-pro",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -15,7 +15,9 @@
15
15
  "deploy": "changeset && changeset version && npm publish && npm run docs:deploy",
16
16
  "dev": "dumi dev",
17
17
  "docs:build": "dumi build",
18
- "docs:deploy": "vercel --prod",
18
+ "docs:deploy": "npm run docs:deploy:wrangler && npm run docs:deploy:vercel",
19
+ "docs:deploy:vercel": "vercel --prod",
20
+ "docs:deploy:wrangler": "cross-env DOCS_DEPLOY=wrangler CLOUDFLARE_ACCOUNT_ID=0ea1eadbf2a2483b37c6044cc0dcb010 dumi build && wrangler pages deploy docs-dist --project-name=rex-pro",
19
21
  "docs:preview": "dumi preview",
20
22
  "doctor": "father doctor",
21
23
  "lint": "npm run lint:es",
@@ -73,6 +75,7 @@
73
75
  "@types/react": "^18.3.27",
74
76
  "@types/react-dom": "^18.3.7",
75
77
  "@umijs/lint": "^4.0.0",
78
+ "cross-env": "^10.1.0",
76
79
  "dumi": "^2.4.13",
77
80
  "eslint": "^8.57.1",
78
81
  "father": "^4.1.0",
@@ -81,7 +84,8 @@
81
84
  "prettier": "^3.7.4",
82
85
  "prettier-plugin-organize-imports": "^4.3.0",
83
86
  "prettier-plugin-packagejson": "^2.5.20",
84
- "stylelint": "^14.9.1"
87
+ "stylelint": "^14.9.1",
88
+ "wrangler": "^4.58.0"
85
89
  },
86
90
  "peerDependencies": {
87
91
  "@ant-design/icons": ">=5.0.0",