@kep-platform/business-component 0.0.2 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export default function BOMTree(): React.JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { GlobalStyles, Tree } from '@kep-platform/basic-component';
2
+ import React from 'react';
3
+ export default function BOMTree() {
4
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GlobalStyles, {
5
+ $css: []
6
+ }), /*#__PURE__*/React.createElement(Tree, {
7
+ treeData: [{
8
+ type: 'part',
9
+ key: 'part1',
10
+ title: '零件1'
11
+ }, {
12
+ type: 'document',
13
+ key: 'document1',
14
+ title: '文档1'
15
+ }],
16
+ titleRender: function titleRender(node) {
17
+ return node.title;
18
+ },
19
+ contextMenuRender: function contextMenuRender(node) {
20
+ if (node.type === 'part') return [{
21
+ key: 'addPart',
22
+ label: '新增零件'
23
+ }];else return [{
24
+ key: 'addDocument',
25
+ label: '新增文档'
26
+ }];
27
+ }
28
+ }));
29
+ }
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default as Foo } from './Foo';
1
+ export { default as BOMTree } from './BOMTree';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { default as Foo } from "./Foo";
1
+ export { default as BOMTree } from "./BOMTree";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kep-platform/business-component",
3
- "version": "0.0.2",
3
+ "version": "0.0.6",
4
4
  "description": "A react library developed with dumi",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -70,5 +70,8 @@
70
70
  "react-dom": "^18.0.0",
71
71
  "stylelint": "^14.9.1"
72
72
  },
73
- "gitHead": "657133d3e2b83d88f06f4b9c6b56cb9209a693ed"
73
+ "gitHead": "7fdc480be2d212aeacbb4d7a623d5ccb716762a4",
74
+ "dependencies": {
75
+ "@kep-platform/basic-component": "^0.0.6"
76
+ }
74
77
  }
@@ -1,5 +0,0 @@
1
- import { type FC } from 'react';
2
- declare const Foo: FC<{
3
- title: string;
4
- }>;
5
- export default Foo;
package/dist/Foo/index.js DELETED
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- var Foo = function Foo(props) {
3
- return /*#__PURE__*/React.createElement("h4", null, props.title);
4
- };
5
- export default Foo;