26 | {content} 27 |
28 | ); 29 | }; 30 | 31 | Text.displayName = 'Text'; 32 | export default Text; 33 | 34 | 35 | -------------------------------------------------------------------------------- /packages/my_materials/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint-config-ali", "tslint-config-prettier"], 3 | "rules": { 4 | "no-implicit-dependencies": [true, "dev"], 5 | "quotemark": [true, "single", "jsx-double"], 6 | "no-empty": [true, "allow-empty-catch", "allow-empty-functions"], 7 | "no-console": [true, "log"], 8 | "variable-name": [ 9 | false, 10 | "check-format", 11 | "allow-leading-underscore", 12 | "allow-trailing-underscore", 13 | "allow-pascal-case" 14 | ], 15 | "only-arrow-functions": false, 16 | "object-literal-sort-keys": false, 17 | "ordered-imports": false, 18 | "interface-name": false, 19 | "no-boolean-literal-compare": false 20 | }, 21 | "linterOptions": { 22 | "exclude": ["node_modules/**"] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/my_editor/src/plugins/plugin-custom-setter-sample/index.tsx: -------------------------------------------------------------------------------- 1 | import { IPublicModelPluginContext } from '@alilc/lowcode-types'; 2 | import TitleSetter from '@alilc/lowcode-setter-title'; 3 | import BehaviorSetter from './setters/behavior-setter'; 4 | import CustomSetter from './setters/custom-setter'; 5 | 6 | // 保存功能示例 7 | const CustomSetterSamplePlugin = (ctx: IPublicModelPluginContext) => { 8 | return { 9 | async init() { 10 | const { setters } = ctx; 11 | 12 | setters.registerSetter('TitleSetter', TitleSetter); 13 | setters.registerSetter('BehaviorSetter', BehaviorSetter); 14 | setters.registerSetter('CustomSetter', CustomSetter); 15 | }, 16 | }; 17 | } 18 | CustomSetterSamplePlugin.pluginName = 'CustomSetterSamplePlugin'; 19 | export default CustomSetterSamplePlugin; -------------------------------------------------------------------------------- /packages/my_editor/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "entry": { 3 | "index": "./src/index.ts" 4 | }, 5 | "vendor": false, 6 | "devServer": { 7 | "hot": false 8 | }, 9 | "publicPath": "/", 10 | "externals": { 11 | "react": "var window.React", 12 | "react-dom": "var window.ReactDOM", 13 | "prop-types": "var window.PropTypes", 14 | "@alifd/next": "var window.Next", 15 | "@alilc/lowcode-engine": "var window.AliLowCodeEngine", 16 | "@alilc/lowcode-engine-ext": "var window.AliLowCodeEngineExt", 17 | "moment": "var window.moment", 18 | "lodash": "var window._" 19 | }, 20 | "plugins": [ 21 | [ 22 | "build-plugin-react-app" 23 | ], 24 | [ 25 | "build-plugin-moment-locales", 26 | { 27 | "locales": [ 28 | "zh-cn" 29 | ] 30 | } 31 | ], 32 | "./build.plugin.js" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /packages/my_app/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $
29 |
30 | **启动低代码物料**
31 | ```sh
32 | cd packages/my_materials
33 | yarn start
34 | ```
35 |
36 | 会自动将上一步打开的链接跳转到 `http://localhost:5556/?debug`,并注入物料组件
37 |
38 |
39 | 如果没看红框效果,请刷新一下,可能有延迟。
40 |
41 |
42 | **启动 Flutter App**
43 | ```sh
44 | cd packages/my_app
45 | flutter run
46 | ```
47 |
48 | 如果已经 `open -a simulator`,会在 simulator 中启动 flutter app,效果如下
49 |
50 |
51 |
52 | ## Step 3:调试看效果
53 |
54 |
55 | 
56 |
--------------------------------------------------------------------------------
/packages/my_app/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include