From 88519982e931f4ae9a02f0bd0d23b6fd868ccd2c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 09:35:53 +0000 Subject: [PATCH] feat: sync upstream changes updated to NetEase/tango@6c65362a5d5b2297b22f30c093c7d21a979630a1 --- .umirc.ts | 16 ++++++------ src/helpers/mock-files.ts | 53 ++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index 16f7890..6d28b59 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -32,14 +32,14 @@ export default defineConfig({ antd: 'antd', }, headScripts: [ - 'https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js', - 'https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js', - 'https://cdn.jsdelivr.net/npm/react-is@18.2.0/umd/react-is.production.min.js', - 'https://cdn.jsdelivr.net/npm/moment/min/moment-with-locales.js', - 'https://cdn.jsdelivr.net/npm/styled-components@5.3.11/dist/styled-components.js', - 'https://cdn.jsdelivr.net/npm/antd@4.24.13/dist/antd-with-locales.min.js', - 'https://cdn.jsdelivr.net/npm/prettier@2.6.0/standalone.js', - 'https://cdn.jsdelivr.net/npm/prettier@2.6.0/parser-babel.js', + 'https://unpkg.com/react@18.2.0/umd/react.development.js', + 'https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js', + 'https://unpkg.com/react-is@18.2.0/umd/react-is.production.min.js', + 'https://unpkg.com/moment/min/moment-with-locales.js', + 'https://unpkg.com/styled-components@5.3.11/dist/styled-components.js', + 'https://unpkg.com/antd@4.24.13/dist/antd-with-locales.min.js', + 'https://unpkg.com/prettier@2.6.0/standalone.js', + 'https://unpkg.com/prettier@2.6.0/parser-babel.js', ], https: { key: path.resolve(__dirname, 'local.netease.com-key.pem'), diff --git a/src/helpers/mock-files.ts b/src/helpers/mock-files.ts index 22080f5..1c98812 100644 --- a/src/helpers/mock-files.ts +++ b/src/helpers/mock-files.ts @@ -2,8 +2,8 @@ const packageJson = { name: 'demo', private: true, dependencies: { - '@music163/antd': '0.1.6', - '@music163/tango-boot': '0.1.3', + '@music163/antd': '0.2.1', + '@music163/tango-boot': '0.2.5', react: '17.0.2', 'react-dom': '17.0.2', 'prop-types': '15.7.2', @@ -12,64 +12,60 @@ const packageJson = { }; const tangoConfigJson = { + designerConfig: { + autoGenerateComponentId: true, + }, packages: { react: { version: '17.0.2', library: 'React', type: 'dependency', - resources: ['https://cdn.jsdelivr.net/npm/react@{{version}}/umd/react.development.js'], + resources: ['https://unpkg.com/react@{{version}}/umd/react.development.js'], }, 'react-dom': { version: '17.0.2', library: 'ReactDOM', type: 'dependency', - resources: [ - 'https://cdn.jsdelivr.net/npm/react-dom@{{version}}/umd/react-dom.development.js', - ], + resources: ['https://unpkg.com/react-dom@{{version}}/umd/react-dom.development.js'], }, 'react-is': { version: '16.13.1', library: 'ReactIs', type: 'dependency', - resources: [ - 'https://cdn.jsdelivr.net/npm/react-is@{{version}}/umd/react-is.production.min.js', - ], + resources: ['https://unpkg.com/react-is@{{version}}/umd/react-is.production.min.js'], }, 'styled-components': { version: '5.3.5', library: 'styled', type: 'dependency', - resources: [ - 'https://cdn.jsdelivr.net/npm/styled-components@{{version}}/dist/styled-components.min.js', - ], + resources: ['https://unpkg.com/styled-components@{{version}}/dist/styled-components.min.js'], }, moment: { version: '2.29.4', library: 'moment', type: 'dependency', - resources: ['https://cdn.jsdelivr.net/npm/moment@{{version}}/moment.js'], + resources: ['https://unpkg.com/moment@{{version}}/moment.js'], }, '@music163/tango-boot': { - version: '0.2.1', + description: '云音乐低代码运行时框架', + version: '0.2.5', library: 'TangoBoot', type: 'baseDependency', - resources: ['https://cdn.jsdelivr.net/npm/@music163/tango-boot@{{version}}/dist/boot.js'], + resources: ['https://unpkg.com/@music163/tango-boot@{{version}}/dist/boot.js'], // resources: ['http://localhost:9001/boot.js'], - description: '云音乐低代码运行时框架', }, '@music163/antd': { - version: '0.1.7', + description: '云音乐低代码中后台应用基础物料', + version: '0.2.1', library: 'TangoAntd', type: 'baseDependency', resources: [ - 'https://cdn.jsdelivr.net/npm/@music163/antd@{{version}}/dist/index.js', - 'https://cdn.jsdelivr.net/npm/antd@4.24.13/dist/antd.css', + 'https://unpkg.com/@music163/antd@{{version}}/dist/index.js', + 'https://unpkg.com/antd@4.24.13/dist/antd.css', ], - description: '云音乐低代码中后台应用基础物料', designerResources: [ - 'https://cdn.jsdelivr.net/npm/@music163/antd@{{version}}/dist/designer.js', - // 'http://localhost:9002/designer.js', - 'https://cdn.jsdelivr.net/npm/antd@4.24.13/dist/antd.css', + 'https://unpkg.com/@music163/antd@{{version}}/dist/designer.js', + 'https://unpkg.com/antd@4.24.13/dist/antd.css', ], }, }, @@ -161,13 +157,14 @@ class App extends React.Component { render() { return ( -
+
+ your input: + copy input:
-
- +
+ - - +