From d2dbd5bdc2d7dbc1a28b216ba5e3d3b66ae804f2 Mon Sep 17 00:00:00 2001 From: smallstonesk <575913857@qq.com> Date: Wed, 26 Aug 2020 09:19:59 +0800 Subject: [PATCH] feat: umi upgrade --- example/.env | 1 + example/package.json | 11 +++++++---- example/src/pages/index.tsx | 29 +---------------------------- 3 files changed, 9 insertions(+), 32 deletions(-) create mode 100644 example/.env diff --git a/example/.env b/example/.env new file mode 100644 index 0000000..39f3f77 --- /dev/null +++ b/example/.env @@ -0,0 +1 @@ +WATCH_IGNORED=node_modules/(?!(@imove/core)) umi dev \ No newline at end of file diff --git a/example/package.json b/example/package.json index 5e40f10..064e4fd 100644 --- a/example/package.json +++ b/example/package.json @@ -20,7 +20,8 @@ ] }, "dependencies": { - "@antv/x6": "^0.4.7", + "@ant-design/icons": "^4.2.2", + "@antv/x6": "^0.4.8", "@antv/x6-react-shape": "^0.2.2", "@emotion/core": "^10.0.28", "@emotion/styled": "^10.0.27", @@ -28,11 +29,13 @@ "@imove/json-schema-editor": "^0.3.2", "@umijs/preset-react": "1.x", "@umijs/test": "^3.2.2", - "antd": "^4.2.4", + "antd": "^4.4.3", + "babel-plugin-transform-runtime": "^6.23.0", + "babel-runtime": "^6.26.0", "lint-staged": "^10.0.7", "prettier": "^1.19.1", - "react": "^16.12.0", - "react-dom": "^16.12.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", "umi": "^3.2.2", "yorkie": "^2.0.0" } diff --git a/example/src/pages/index.tsx b/example/src/pages/index.tsx index ad8e3f9..a5842d4 100644 --- a/example/src/pages/index.tsx +++ b/example/src/pages/index.tsx @@ -1,33 +1,6 @@ import * as React from 'react'; import IMove from '@imove/core'; import styled from '@emotion/styled'; -import { DataItem } from '@imove/core/dist/types/data/cells'; - -const cells: DataItem[] = [ - { - label: '查询是否登录', - type: 'decision', - style: { - width: 48, - height: 30, - scale: 2, - }, - data: { - code: - 'import Base from "@ali/rax-base";\n\nconst queryLogin = (params) => {\n return new Promise((resolve, reject) => {\n Base.getUser((data) => {\n if (data && data.userNumberId) {\n resolve(true);\n } else {\n reject(false);\n }\n });\n });\n};\n\nexport default queryLogin;\n', - dependencies: [ - { - '@ali/rax-base': '^2.1.9', - }, - ], - }, - schema: { - type: 'object', - required: [], - properties: {}, - }, - }, -]; const onSave = (data: { nodes: any; edges: any }): void => { console.log(data); @@ -40,7 +13,7 @@ const Wrapper = styled.div` function Arrange(): JSX.Element { return ( - + ); }