forked from opentiny/tiny-engine
refactor: 支持 pnpm
Match-id-d6d5411f705f8d59f001f96ad3d043a8164839c0
This commit is contained in:
parent
552782671e
commit
88509ee8db
|
@ -3,6 +3,8 @@ node_modules
|
|||
dist/
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
pnpm-lock.yaml
|
||||
lerna-debug.log
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
# npm run lint
|
||||
npx lint-staged
|
||||
npx lint-staged -q
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ package-lock.json
|
|||
# 忽略可能存在的其它编辑器文件夹
|
||||
.idea
|
||||
|
||||
/src/app/public/mock/*
|
||||
!/src/app/public/mock/graph-bundle.json
|
||||
tmp
|
||||
temp
|
||||
/packages/design-core/public/mock/*
|
||||
**/**/tmp
|
||||
**/**/temp
|
|
@ -22,20 +22,13 @@ English | [简体中文](README.zh-CN.md)
|
|||
### Dependencies required for installation
|
||||
|
||||
```sh
|
||||
$ npm install
|
||||
$ pushd mockServer
|
||||
$ npm install
|
||||
$ popd
|
||||
$ pnpm install
|
||||
```
|
||||
|
||||
### Local development: Start the local mock server and use the mock data of the local mock server.
|
||||
|
||||
```sh
|
||||
$ npm run serve
|
||||
|
||||
# start another terminal
|
||||
$ cd mockServer
|
||||
$ npm run dev
|
||||
$ pnpm dev
|
||||
```
|
||||
|
||||
Open a browser: `http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4MjvqoVj8OVsc`
|
||||
|
@ -44,46 +37,19 @@ Open a browser: `http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4Mjvq
|
|||
- `type=app` Application type
|
||||
- `id=xxx` Application ID
|
||||
- `tenant=xxx` Organization ID
|
||||
- `pagdId=xxx` Page ID
|
||||
- `pageid=xxx` Page ID
|
||||
|
||||
## Build
|
||||
|
||||
```sh
|
||||
# Build all plug-ins first
|
||||
npm run build:plugin
|
||||
pnpm build:plugin
|
||||
|
||||
# Build Designer
|
||||
npm run build:alpha or build:prod
|
||||
|
||||
# Release all plug-ins.
|
||||
npm run publish:plugin
|
||||
|
||||
# Publish the designer.
|
||||
npm run publish:core
|
||||
pnpm build:alpha or build:prod
|
||||
|
||||
```
|
||||
|
||||
## Common Packet Sending Process
|
||||
|
||||
1. Release the plug-in.
|
||||
|
||||
```sh
|
||||
npm run build:plugin && npm run publish:plugin
|
||||
```
|
||||
|
||||
2. Publish Designer
|
||||
|
||||
a) Change the package name and version number.
|
||||
Package name: @opentiny/tinybuilder-design-core-test
|
||||
Version number: The last digit plus 1 each time. For example:
|
||||
|
||||
```
|
||||
"name": "@opentiny/tinybuilder-design-core-test",
|
||||
"version": "1.0.87",
|
||||
```
|
||||
|
||||
b) npm publish
|
||||
|
||||
## 🤝 Participation and Contribution
|
||||
|
||||
If you are interested in our open source project, please join us! 🎉
|
||||
|
@ -96,7 +62,3 @@ Please read the [Contribution Guide](CONTRIBUTING.md) before participating in th
|
|||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
|
44
README.md
44
README.md
|
@ -22,20 +22,13 @@ English | [简体中文](README.zh-CN.md)
|
|||
### Dependencies required for installation
|
||||
|
||||
```sh
|
||||
$ npm install
|
||||
$ pushd mockServer
|
||||
$ npm install
|
||||
$ popd
|
||||
$ pnpm install
|
||||
```
|
||||
|
||||
### Local development: Start the local mock server and use the mock data of the local mock server.
|
||||
|
||||
```sh
|
||||
$ npm run serve
|
||||
|
||||
# start another terminal
|
||||
$ cd mockServer
|
||||
$ npm run dev
|
||||
$ pnpm dev
|
||||
```
|
||||
|
||||
Open a browser: `http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4MjvqoVj8OVsc`
|
||||
|
@ -44,46 +37,19 @@ Open a browser: `http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4Mjvq
|
|||
- `type=app` Application type
|
||||
- `id=xxx` Application ID
|
||||
- `tenant=xxx` Organization ID
|
||||
- `pagdId=xxx` Page ID
|
||||
- `pageid=xxx` Page ID
|
||||
|
||||
## Build
|
||||
|
||||
```sh
|
||||
# Build all plug-ins first
|
||||
npm run build:plugin
|
||||
pnpm build:plugin
|
||||
|
||||
# Build Designer
|
||||
npm run build:alpha or build:prod
|
||||
|
||||
# Release all plug-ins.
|
||||
npm run publish:plugin
|
||||
|
||||
# Publish the designer.
|
||||
npm run publish:core
|
||||
pnpm build:alpha or build:prod
|
||||
|
||||
```
|
||||
|
||||
## Common Packet Sending Process
|
||||
|
||||
1. Release the plug-in.
|
||||
|
||||
```sh
|
||||
npm run build:plugin && npm run publish:plugin
|
||||
```
|
||||
|
||||
2. Publish Designer
|
||||
|
||||
a) Change the package name and version number.
|
||||
Package name: @opentiny/tinybuilder-design-core-test
|
||||
Version number: The last digit plus 1 each time. For example:
|
||||
|
||||
```
|
||||
"name": "@opentiny/tinybuilder-design-core-test",
|
||||
"version": "1.0.87",
|
||||
```
|
||||
|
||||
b) npm publish
|
||||
|
||||
## 🤝 Participation and Contribution
|
||||
|
||||
If you are interested in our open source project, please join us! 🎉
|
||||
|
|
|
@ -22,21 +22,13 @@
|
|||
### 安装所需的依赖
|
||||
|
||||
```sh
|
||||
$ npm install
|
||||
$ pushd mockServer
|
||||
$ npm install
|
||||
$ popd
|
||||
$ pnpm install
|
||||
```
|
||||
|
||||
### 本地开发,启动本地 mock 服务器,使用本地 mock 服务器的 mock 数据
|
||||
|
||||
```sh
|
||||
$ npm run serve
|
||||
|
||||
# 另起一个终端
|
||||
$ cd mockServer
|
||||
$ npm run dev
|
||||
|
||||
$ pnpm dev
|
||||
```
|
||||
|
||||
浏览器打开:`http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4MjvqoVj8OVsc`
|
||||
|
@ -45,43 +37,19 @@ $ npm run dev
|
|||
- `type=app` 应用类型
|
||||
- `id=xxx` 应用 ID
|
||||
- `tenant=xxx` 组织 ID
|
||||
- `pagdId=xxx` 页面 ID
|
||||
- `pageid=xxx` 页面 ID
|
||||
|
||||
## 构建
|
||||
|
||||
```sh
|
||||
# 先构建所有插件
|
||||
npm run build:plugin
|
||||
pnpm run build:plugin
|
||||
|
||||
# 构建设计器
|
||||
npm run build:alpha 或 build:prod
|
||||
|
||||
# 发布所有插件
|
||||
npm run publish:plugin
|
||||
|
||||
# 发布设计器
|
||||
npm run publish:core
|
||||
pnpm run build:alpha 或 build:prod
|
||||
|
||||
```
|
||||
|
||||
## 常规发包流程
|
||||
|
||||
1. 发布插件
|
||||
npm run build:plugin && npm run publish:plugin
|
||||
|
||||
2. 发布设计器
|
||||
|
||||
a) 修改包名和版本号:
|
||||
包名:@opentiny/tinybuilder-design-core-test
|
||||
版本号:末位每次+1, 例如:
|
||||
|
||||
```
|
||||
"name": "@opentiny/tinybuilder-design-core-test",
|
||||
"version": "1.0.87",
|
||||
```
|
||||
|
||||
b) npm publish
|
||||
|
||||
## 🤝 参与贡献
|
||||
|
||||
如果你对我们的开源项目感兴趣,欢迎加入我们!🎉
|
||||
|
|
128
jsconfig.json
128
jsconfig.json
|
@ -3,71 +3,71 @@
|
|||
"baseUrl": "./",
|
||||
"jsx": "react",
|
||||
"paths": {
|
||||
"@/*": ["src/*"],
|
||||
"@opentiny/tiny-engine-canvas": ["src/canvas/src/index.js"],
|
||||
"@opentiny/tiny-engine-controller": ["src/controller/src/index"],
|
||||
"@opentiny/tiny-engine-plugin-materials": ["src/plugins/packages/materials/index"],
|
||||
"@opentiny/tiny-engine-plugin-data": ["src/plugins/packages/data/index"],
|
||||
"@opentiny/tiny-engine-plugin-script": ["src/plugins/packages/script/index"],
|
||||
"@opentiny/tiny-engine-plugin-tree": ["src/plugins/packages/tree/index"],
|
||||
"@opentiny/tiny-engine-plugin-help": ["src/plugins/packages/help/index"],
|
||||
"@opentiny/tiny-engine-plugin-schema": ["src/plugins/packages/schema/index"],
|
||||
"@opentiny/tiny-engine-plugin-page": ["src/plugins/packages/page/index"],
|
||||
"@opentiny/tiny-engine-plugin-i18n": ["src/plugins/packages/i18n/index"],
|
||||
"@opentiny/tiny-engine-plugin-bridge": ["src/plugins/packages/bridge/index"],
|
||||
"@opentiny/tiny-engine-setting-events": ["src/settings/packages/events/index"],
|
||||
"@opentiny/tiny-engine-setting-props": ["src/settings/packages/props/index"],
|
||||
"@opentiny/tiny-engine-common": ["src/common/index"],
|
||||
"@opentiny/tiny-engine-setting-styles": ["src/settings/packages/styles/index"],
|
||||
"@opentiny/tiny-engine-toolbar-breadcrumb": ["src/toolbars/packages/breadcrumb/index"],
|
||||
"@opentiny/tiny-engine-toolbar-fullscreen": ["src/toolbars/packages/fullscreen/index"],
|
||||
"@opentiny/tiny-engine-toolbar-lang": ["src/toolbars/packages/lang/index"],
|
||||
"@opentiny/tiny-engine-toolbar-layout": ["src/toolbars/packages/layout/index"],
|
||||
"@opentiny/tiny-engine-toolbar-checkinout": ["src/toolbars/packages/lock/index"],
|
||||
"@opentiny/tiny-engine-toolbar-logo": ["src/toolbars/packages/logo/index"],
|
||||
"@opentiny/tiny-engine-toolbar-media": ["src/toolbars/packages/media/index"],
|
||||
"@opentiny/tiny-engine-toolbar-preview": ["src/toolbars/packages/preview/index"],
|
||||
"@opentiny/tiny-engine-toolbar-generate-vue": ["src/toolbars/packages/generate-vue/index"],
|
||||
"@opentiny/tiny-engine-toolbar-clean": ["src/toolbars/packages/clean/index"],
|
||||
"@opentiny/tiny-engine-toolbar-save": ["src/toolbars/packages/save/index"],
|
||||
"tiny-engine-canvas": ["src/canvas/index"],
|
||||
"@opentiny/tiny-engine-theme-dark": ["src/theme/packages/dark/index.less"],
|
||||
"@opentiny/tiny-engine-theme-light": ["src/theme/packages/light/index.less"],
|
||||
"@opentiny/tiny-engine-svgs": ["src/svgs/index"],
|
||||
"@opentiny/tiny-engine-http": ["src/http/index"],
|
||||
"@opentiny/tiny-engine-controller/*": ["src/controller/src/*"],
|
||||
"@opentiny/tiny-engine-plugin-materials/*": ["src/plugins/packages/materials/*"],
|
||||
"@opentiny/tiny-engine-plugin-data/*": ["src/plugins/packages/data/*"],
|
||||
"@opentiny/tiny-engine-plugin-script/*": ["src/plugins/packages/script/*"],
|
||||
"@opentiny/tiny-engine-plugin-tree/*": ["src/plugins/packages/tree/*"],
|
||||
"@opentiny/tiny-engine-plugin-help/*": ["src/plugins/packages/help/*"],
|
||||
"@opentiny/tiny-engine-plugin-schema/*": ["src/plugins/packages/schema/*"],
|
||||
"@opentiny/tiny-engine-plugin-page/*": ["src/plugins/packages/page/*"],
|
||||
"@opentiny/tiny-engine-plugin-i18n/*": ["src/plugins/packages/i18n/*"],
|
||||
"@opentiny/tiny-engine-plugin-bridge/*": ["src/plugins/packages/bridge/*"],
|
||||
"@opentiny/tiny-engine-setting-events/*": ["src/settings/packages/events/*"],
|
||||
"@opentiny/tiny-engine-setting-props/*": ["src/settings/packages/props/*"],
|
||||
"@opentiny/tiny-engine-common/*": ["src/common/*"],
|
||||
"@opentiny/tiny-engine-setting-styles/*": ["src/settings/packages/styles/*"],
|
||||
"@opentiny/tiny-engine-toolbar-breadcrumb/*": ["src/toolbars/packages/breadcrumb/*"],
|
||||
"@opentiny/tiny-engine-toolbar-fullscreen/*": ["src/toolbars/packages/fullscreen/*"],
|
||||
"@opentiny/tiny-engine-toolbar-lang/*": ["src/toolbars/packages/lang/*"],
|
||||
"@opentiny/tiny-engine-toolbar-layout/*": ["src/toolbars/packages/layout/*"],
|
||||
"@opentiny/tiny-engine-toolbar-checkinout/*": ["src/toolbars/packages/lock/*"],
|
||||
"@opentiny/tiny-engine-toolbar-logo/*": ["src/toolbars/packages/logo/*"],
|
||||
"@opentiny/tiny-engine-toolbar-media/*": ["src/toolbars/packages/media/*"],
|
||||
"@opentiny/tiny-engine-toolbar-preview/*": ["src/toolbars/packages/preview/*"],
|
||||
"@opentiny/tiny-engine-toolbar-clean/*": ["src/toolbars/packages/clean/*"],
|
||||
"@opentiny/tiny-engine-toolbar-save/*": ["src/toolbars/packages/save/*"],
|
||||
"@opentiny/tiny-engine-theme-dark/*": ["src/theme/packages/dark/*"],
|
||||
"@opentiny/tiny-engine-theme-light/*": ["src/theme/packages/light/*"],
|
||||
"@opentiny/tiny-engine-svgs/*": ["src/svgs/*"],
|
||||
"@opentiny/tiny-engine-http/*": ["src/http/*"],
|
||||
"@opentiny/tiny-engine-utils": ["src/utils/src/index.js"],
|
||||
"@opentiny/tiny-engine-webcomponent-core": ["src/webcomponent/src/lib"],
|
||||
"@opentiny/tiny-engine-i18n-host": ["src/i18n/src/lib"]
|
||||
"@/*": ["packages/*"],
|
||||
"@opentiny/tiny-engine-canvas": ["packages/canvas/src/index.js"],
|
||||
"@opentiny/tiny-engine-controller": ["packages/controller/src/index"],
|
||||
"@opentiny/tiny-engine-plugin-materials": ["packages/plugins/materials/index"],
|
||||
"@opentiny/tiny-engine-plugin-data": ["packages/plugins/data/index"],
|
||||
"@opentiny/tiny-engine-plugin-script": ["packages/plugins/script/index"],
|
||||
"@opentiny/tiny-engine-plugin-tree": ["packages/plugins/tree/index"],
|
||||
"@opentiny/tiny-engine-plugin-help": ["packages/plugins/help/index"],
|
||||
"@opentiny/tiny-engine-plugin-schema": ["packages/plugins/schema/index"],
|
||||
"@opentiny/tiny-engine-plugin-page": ["packages/plugins/page/index"],
|
||||
"@opentiny/tiny-engine-plugin-i18n": ["packages/plugins/i18n/index"],
|
||||
"@opentiny/tiny-engine-plugin-bridge": ["packages/plugins/bridge/index"],
|
||||
"@opentiny/tiny-engine-setting-events": ["packages/settings/events/index"],
|
||||
"@opentiny/tiny-engine-setting-props": ["packages/settings/props/index"],
|
||||
"@opentiny/tiny-engine-common": ["packages/common/index"],
|
||||
"@opentiny/tiny-engine-setting-styles": ["packages/settings/styles/index"],
|
||||
"@opentiny/tiny-engine-toolbar-breadcrumb": ["packages/toolbars/breadcrumb/index"],
|
||||
"@opentiny/tiny-engine-toolbar-fullscreen": ["packages/toolbars/fullscreen/index"],
|
||||
"@opentiny/tiny-engine-toolbar-lang": ["packages/toolbars/lang/index"],
|
||||
"@opentiny/tiny-engine-toolbar-layout": ["packages/toolbars/layout/index"],
|
||||
"@opentiny/tiny-engine-toolbar-checkinout": ["packages/toolbars/lock/index"],
|
||||
"@opentiny/tiny-engine-toolbar-logo": ["packages/toolbars/logo/index"],
|
||||
"@opentiny/tiny-engine-toolbar-media": ["packages/toolbars/media/index"],
|
||||
"@opentiny/tiny-engine-toolbar-preview": ["packages/toolbars/preview/index"],
|
||||
"@opentiny/tiny-engine-toolbar-generate-vue": ["packages/toolbars/generate-vue/index"],
|
||||
"@opentiny/tiny-engine-toolbar-clean": ["packages/toolbars/clean/index"],
|
||||
"@opentiny/tiny-engine-toolbar-save": ["packages/toolbars/save/index"],
|
||||
"tiny-engine-canvas": ["packages/canvas/index"],
|
||||
"@opentiny/tiny-engine-theme-dark": ["packages/theme/dark/index.less"],
|
||||
"@opentiny/tiny-engine-theme-light": ["packages/theme/light/index.less"],
|
||||
"@opentiny/tiny-engine-svgs": ["packages/svgs/index"],
|
||||
"@opentiny/tiny-engine-http": ["packages/http/index"],
|
||||
"@opentiny/tiny-engine-controller/*": ["packages/controller/src/*"],
|
||||
"@opentiny/tiny-engine-plugin-materials/*": ["packages/plugins/materials/*"],
|
||||
"@opentiny/tiny-engine-plugin-data/*": ["packages/plugins/data/*"],
|
||||
"@opentiny/tiny-engine-plugin-script/*": ["packages/plugins/script/*"],
|
||||
"@opentiny/tiny-engine-plugin-tree/*": ["packages/plugins/tree/*"],
|
||||
"@opentiny/tiny-engine-plugin-help/*": ["packages/plugins/help/*"],
|
||||
"@opentiny/tiny-engine-plugin-schema/*": ["packages/plugins/schema/*"],
|
||||
"@opentiny/tiny-engine-plugin-page/*": ["packages/plugins/page/*"],
|
||||
"@opentiny/tiny-engine-plugin-i18n/*": ["packages/plugins/i18n/*"],
|
||||
"@opentiny/tiny-engine-plugin-bridge/*": ["packages/plugins/bridge/*"],
|
||||
"@opentiny/tiny-engine-setting-events/*": ["packages/settings/events/*"],
|
||||
"@opentiny/tiny-engine-setting-props/*": ["packages/settings/props/*"],
|
||||
"@opentiny/tiny-engine-common/*": ["packages/common/*"],
|
||||
"@opentiny/tiny-engine-setting-styles/*": ["packages/settings/styles/*"],
|
||||
"@opentiny/tiny-engine-toolbar-breadcrumb/*": ["packages/toolbars/breadcrumb/*"],
|
||||
"@opentiny/tiny-engine-toolbar-fullscreen/*": ["packages/toolbars/fullscreen/*"],
|
||||
"@opentiny/tiny-engine-toolbar-lang/*": ["packages/toolbars/lang/*"],
|
||||
"@opentiny/tiny-engine-toolbar-layout/*": ["packages/toolbars/layout/*"],
|
||||
"@opentiny/tiny-engine-toolbar-checkinout/*": ["packages/toolbars/lock/*"],
|
||||
"@opentiny/tiny-engine-toolbar-logo/*": ["packages/toolbars/logo/*"],
|
||||
"@opentiny/tiny-engine-toolbar-media/*": ["packages/toolbars/media/*"],
|
||||
"@opentiny/tiny-engine-toolbar-preview/*": ["packages/toolbars/preview/*"],
|
||||
"@opentiny/tiny-engine-toolbar-clean/*": ["packages/toolbars/clean/*"],
|
||||
"@opentiny/tiny-engine-toolbar-save/*": ["packages/toolbars/save/*"],
|
||||
"@opentiny/tiny-engine-theme-dark/*": ["packages/theme/dark/*"],
|
||||
"@opentiny/tiny-engine-theme-light/*": ["packages/theme/light/*"],
|
||||
"@opentiny/tiny-engine-svgs/*": ["packages/svgs/*"],
|
||||
"@opentiny/tiny-engine-http/*": ["packages/http/*"],
|
||||
"@opentiny/tiny-engine-utils": ["packages/utils/src/index.js"],
|
||||
"@opentiny/tiny-engine-webcomponent-core": ["packages/webcomponent/src/lib"],
|
||||
"@opentiny/tiny-engine-i18n-host": ["packages/i18n/src/lib"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"include": ["packages/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
|
14
lerna.json
14
lerna.json
|
@ -1,5 +1,15 @@
|
|||
{
|
||||
"packages": ["src/**", "packages/**"],
|
||||
"command": {
|
||||
"version": {
|
||||
"message": "chore(release): publish"
|
||||
}
|
||||
},
|
||||
"useNx": false,
|
||||
"version": "independent"
|
||||
"version": "independent",
|
||||
"npmClient": "pnpm",
|
||||
"publish": {
|
||||
"npmClient": "pnpm"
|
||||
},
|
||||
"ignoreChanges": ["**/*.md", "**/test/**", ".npmrc"],
|
||||
"granularPathspec": false
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
'./src/**/**.{js,vue,jsx}': 'eslint',
|
||||
'./src/**/**.{vue,js,ts,html,json,less}': 'prettier --write'
|
||||
'./packages/**/**.{js,vue,jsx}': 'eslint',
|
||||
'./packages/**/**.{vue,js,ts,html,json,less}': 'prettier --write'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "koa2-mock",
|
||||
"name": "@opentiny/tiny-engine-mock",
|
||||
"version": "1.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{"id":"L0fyFYECrNiRZMiX","app":{"id":918,"name":"portal-app","app_website":null,"platform":{"id":897,"name":"portal-platform"},"obs_url":"","created_by":null,"updated_by":null,"created_at":"2022-06-08T07:19:01.000Z","updated_at":"2023-09-04T08:55:40.000Z","state":null,"published":false,"createdBy":86,"updatedBy":564,"tenant":1,"home_page":"NTJ4MjvqoVj8OVsc","css":null,"config":{},"git_group":"","project_name":"","constants":null,"data_handler":{"type":"JSFunction","value":"function dataHanlder(res){\n return res;\n}"},"description":"demo应用","latest":22,"platform_history":null,"editor_url":"","branch":"develop","visit_url":null,"is_demo":null,"image_url":"","is_default":true,"template_type":null,"set_template_time":null,"set_template_by":null,"set_default_by":169,"framework":"Vue","global_state":[],"default_lang":null,"extend_config":{"business":{"serviceName":"","endpointName":"cce","endpointId":"ee","serviceId":"ee","router":"ee"},"env":{"alpha":{"regions":[{"name":"","baseUrl":"","isDefault":false}],"isDefault":true}},"type":"console"},"assets_url":"","data_hash":"ae128e37f6bc378f1b9c21d75bd05551","can_associate":true,"data_source_global":{"dataHandler":{"type":"JSFunction","value":"function dataHanlder(res){\n return res;\n}"}}},"name":"我的分类","desc":"","blocks":["ALvDb0JD8atzd3nA"],"category_id":"qukuaifenlei","_id":"L0fyFYECrNiRZMiX"}
|
||||
{"$$indexCreated":{"fieldName":"name","unique":true,"sparse":false}}
|
||||
{"$$indexCreated":{"fieldName":"name","unique":true}}
|
|
@ -0,0 +1,3 @@
|
|||
{"id":"b57MCCORYPGjgL23","app":{"id":918,"name":"portal-app","app_website":null,"platform":{"id":897,"name":"portal-platform"},"obs_url":"","created_by":null,"updated_by":null,"created_at":"2022-06-08T07:19:01.000Z","updated_at":"2023-09-04T08:55:40.000Z","state":null,"published":false,"createdBy":86,"updatedBy":564,"tenant":1,"home_page":"NTJ4MjvqoVj8OVsc","css":null,"config":{},"git_group":"","project_name":"","constants":null,"data_handler":{"type":"JSFunction","value":"function dataHanlder(res){\n return res;\n}"},"description":"demo应用","latest":22,"platform_history":null,"editor_url":"","branch":"develop","visit_url":null,"is_demo":null,"image_url":"","is_default":true,"template_type":null,"set_template_time":null,"set_template_by":null,"set_default_by":169,"framework":"Vue","global_state":[],"default_lang":null,"extend_config":{"business":{"serviceName":"","endpointName":"cce","endpointId":"ee","serviceId":"ee","router":"ee"},"env":{"alpha":{"regions":[{"name":"","baseUrl":"","isDefault":false}],"isDefault":true}},"type":"console"},"assets_url":"","data_hash":"ae128e37f6bc378f1b9c21d75bd05551","can_associate":true,"data_source_global":{"dataHandler":{"type":"JSFunction","value":"function dataHanlder(res){\n return res;\n}"}}},"name":"我的区块","desc":"","blocks":["ALvDb0JD8atzd3nA"],"_id":"b57MCCORYPGjgL23"}
|
||||
{"$$indexCreated":{"fieldName":"name","unique":true,"sparse":false}}
|
||||
{"$$indexCreated":{"fieldName":"name","unique":true}}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -83,856 +83,6 @@
|
|||
}
|
||||
},
|
||||
"componentsTree": [
|
||||
{
|
||||
"state": {
|
||||
"components": [
|
||||
{
|
||||
"name": "表单",
|
||||
"text": "由按钮、输入框、选择器、单选框、多选框等控件组成..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
},
|
||||
{
|
||||
"name": "按钮",
|
||||
"text": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮..."
|
||||
}
|
||||
],
|
||||
"pageConfig": {
|
||||
"component": {
|
||||
"type": "JSResource",
|
||||
"value": "this.utils.Pager"
|
||||
},
|
||||
"attrs": {
|
||||
"currentPage": 1,
|
||||
"pageSize": 50,
|
||||
"pageSizes": [10, 20, 50],
|
||||
"total": 0,
|
||||
"layout": "sizes,total, prev, pager, next, jumper"
|
||||
}
|
||||
},
|
||||
"componentsTotal": 0,
|
||||
"renderf5956ed2": [
|
||||
{
|
||||
"label": "按更新时间",
|
||||
"value": "updata",
|
||||
"_RID": "row_6"
|
||||
},
|
||||
{
|
||||
"label": "按创建时间",
|
||||
"value": "create"
|
||||
}
|
||||
],
|
||||
"renderb52aeac9": [
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "表单",
|
||||
"description": "由按钮、输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据",
|
||||
"id": "021fd6b6",
|
||||
"_RID": "row_1"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "按钮",
|
||||
"description": "常用的操作按钮,提供包括默认按钮、图标按钮、图片按钮、下拉按钮等类型",
|
||||
"id": "84d239bb",
|
||||
"_RID": "row_2"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "表单项",
|
||||
"description": "Form 组件下的 FormItem 配置",
|
||||
"id": "490f8a00",
|
||||
"_RID": "row_3"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "开关",
|
||||
"description": "关闭或打开",
|
||||
"id": "c259b8b3",
|
||||
"_RID": "row_4"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "互斥按钮组",
|
||||
"description": "以按钮组的方式出现,常用于多项类似操作",
|
||||
"id": "083ed9c7",
|
||||
"_RID": "row_5"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "提示框",
|
||||
"description": "Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画",
|
||||
"id": "09136cea",
|
||||
"_RID": "row_6"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "文字提示框",
|
||||
"description": "动态显示提示信息,一般通过鼠标事件进行响应;提供 warning、error、info、success 四种类型显示不同类别的信",
|
||||
"id": "a63b57d5",
|
||||
"_RID": "row_7"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "树",
|
||||
"description": "可进行展示有父子层级的数据,支持选择,异步加载等功能。但不推荐用它来展示菜单,展示菜单推荐使用树菜单",
|
||||
"id": "a0f6e8a3",
|
||||
"_RID": "row_8"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "分页",
|
||||
"description": "当数据量过多时,使用分页分解数据,常用于 Grid 和 Repeater 组件",
|
||||
"id": "d1aa18fc",
|
||||
"_RID": "row_9"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "表格",
|
||||
"description": "提供了非常强大数据表格功能,可以展示数据列表,可以对数据列表进行选择、编辑等",
|
||||
"id": "ca49cc52",
|
||||
"_RID": "row_10"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "搜索框",
|
||||
"description": "指定条件对象进行搜索数据",
|
||||
"id": "4e20ecc9"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "折叠面板",
|
||||
"description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作",
|
||||
"id": "6b093ee5"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "对话框",
|
||||
"description": "模态对话框,在浮层中显示,引导用户进行相关操作",
|
||||
"id": "0a09abc0"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "标签页签项",
|
||||
"description": "tab页签",
|
||||
"id": "f814b901"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "单选",
|
||||
"description": "用于配置不同场景的选项,在一组备选项中进行单选",
|
||||
"id": "c5ae797c"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "弹出编辑",
|
||||
"description": "该组件只能在弹出的面板中选择数据,不能手动输入数据;弹出面板中显示为 Tree 组件或者 Grid 组件",
|
||||
"id": "33d0c590"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "下拉框",
|
||||
"description": "Select 选择器是一种通过点击弹出下拉列表展示数据并进行选择的 UI 组件",
|
||||
"id": "16711dfa"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "折叠面板项",
|
||||
"description": "内容区可指定动态页面或自定义 html 等,支持展开收起操作",
|
||||
"id": "a9fd190a"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "复选框",
|
||||
"description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选",
|
||||
"id": "a7dfa9ec"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "复选框按钮",
|
||||
"description": "用于配置不同场景的选项,提供用户可在一组选项中进行多选",
|
||||
"id": "c9071a7b"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "输入框",
|
||||
"description": "通过鼠标或键盘输入字符",
|
||||
"id": "d4bb8330"
|
||||
},
|
||||
{
|
||||
"framework": "",
|
||||
"materials": "",
|
||||
"name": "时间线",
|
||||
"description": "时间线",
|
||||
"id": "ced3dc83"
|
||||
}
|
||||
],
|
||||
"render7e97d9c7": [
|
||||
{
|
||||
"name": "标签页",
|
||||
"description": "分隔内容上有关联但属于不同类别的数据集合",
|
||||
"id": "a2b3e681",
|
||||
"_RID": "row_1"
|
||||
},
|
||||
{
|
||||
"name": "走马灯",
|
||||
"description": "常用于一组图片或卡片轮播,当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现",
|
||||
"id": "311fd1ae",
|
||||
"_RID": "row_2"
|
||||
},
|
||||
{
|
||||
"name": "日期选择器",
|
||||
"description": "用于设置/选择日期,包括年月/年月日/年月日时分/年月日时分秒日期格式",
|
||||
"id": "8d38b248",
|
||||
"_RID": "row_3"
|
||||
},
|
||||
{
|
||||
"name": "布局列",
|
||||
"description": "列配置信息",
|
||||
"id": "1f6940d8"
|
||||
}
|
||||
]
|
||||
},
|
||||
"methods": {
|
||||
"linkClick": {
|
||||
"type": "JSFunction",
|
||||
"value": "function linkClick() {\n location.href = '';\n}"
|
||||
},
|
||||
"query": {
|
||||
"type": "JSFunction",
|
||||
"value": "function query(name) {\n this.state.components.fillter((e) => {\n return e.name !== name;\n });\n}"
|
||||
},
|
||||
"getTableData": {
|
||||
"type": "JSFunction",
|
||||
"value": "function getTableData() {\n return new Promise((resolve, reject) => {\n this.dataSourceMap['timeData'].load().then((res) => {\n resolve({ result: [], page: { total: 0 } });\n });\n });\n}"
|
||||
},
|
||||
"clearSelected": {
|
||||
"type": "JSFunction",
|
||||
"value": "function clearSelected(event) {\nthis.dataSourceMap['selectedComponents'] = this.dataSourceMap['selectedComponents'] || [];\n this.dataSourceMap['selectedComponents'].map((e) => {\n this.dataSourceMap['componentList'].push(e);\n });\n this.dataSourceMap['selectedComponents'] = [];\n}"
|
||||
}
|
||||
},
|
||||
"componentName": "Page",
|
||||
"css": ".components-box{\r\n height:900px;\r\n display: flex;\r\n}\r\n.components-box-left{\r\n width: 270px;\r\n}\r\n.components-box-right{\r\n width:50%;\r\n}\r\n.components-box-right-add{\r\n width: 100%;\r\n height: 200px;\r\n}\r\n.mgr20{\r\n margin-right: 20px;\r\n}",
|
||||
"props": {},
|
||||
"children": [
|
||||
{
|
||||
"componentName": "PortalHeader",
|
||||
"props": {},
|
||||
"componentType": "Block",
|
||||
"id": "60284cf1"
|
||||
},
|
||||
{
|
||||
"componentName": "portalBlock",
|
||||
"props": {},
|
||||
"componentType": "Block",
|
||||
"id": "6911db84"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "height: 80px; width: 87%; margin: 0 auto; margin-bottom: 20px; margin-top: 20px; padding-left: 20px; padding-top: 30px; background: rgb(242, 245, 252);"
|
||||
},
|
||||
"id": "436ecc4a",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": " 物料资产包简介",
|
||||
"style": "color: rgb(138, 142, 153);"
|
||||
},
|
||||
"id": "16ad7aa9"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "调试构建报错",
|
||||
"style": "margin-left: 10px; margin-right: 10px;"
|
||||
},
|
||||
"id": "ab44d8ea"
|
||||
},
|
||||
{
|
||||
"componentName": "Icon",
|
||||
"props": {
|
||||
"name": "IconEdit"
|
||||
},
|
||||
"id": "8b6be3c2"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {},
|
||||
"id": "848e3e8a",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "发布地址",
|
||||
"style": "color: rgb(138, 142, 153);"
|
||||
},
|
||||
"id": "cd51ad2c"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "",
|
||||
"style": "margin-left: 20px; margin-right: 10px; color: rgb(36, 150, 255);",
|
||||
"onClick": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.linkClick"
|
||||
}
|
||||
},
|
||||
"id": "3ed13633"
|
||||
},
|
||||
{
|
||||
"componentName": "Icon",
|
||||
"props": {
|
||||
"name": "IconEdit"
|
||||
},
|
||||
"id": "16b75d9f"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"className": "components-box",
|
||||
"style": "width: 88%; margin: 0 auto; border-width: 1px; border-color: rgb(223, 225, 230); border-style: solid; padding-top: 40px; padding-bottom: 40px; height: 1200px;"
|
||||
},
|
||||
"id": "c880007b",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"className": "components-box-left",
|
||||
"style": "border-right-width: 2px; border-right-style: solid; border-color: rgb(223, 225, 230); position: relative;"
|
||||
},
|
||||
"id": "3525fc52",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "TinyTimeLine",
|
||||
"props": {
|
||||
"active": "1",
|
||||
"data": [
|
||||
{
|
||||
"name": "添加组件"
|
||||
},
|
||||
{
|
||||
"name": "添加区块"
|
||||
}
|
||||
],
|
||||
"horizontal": false,
|
||||
"className": "components-box-left",
|
||||
"vertical": true
|
||||
},
|
||||
"id": "1e391ed7"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {},
|
||||
"id": "81ccd767",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "height: 300px; position: absolute; bottom: 20px; left: 20px;"
|
||||
},
|
||||
"id": "bc11d593",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {},
|
||||
"id": "50ed6e39",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "组件示意图 "
|
||||
},
|
||||
"id": "fa6b920c"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {},
|
||||
"id": "9ca346e6",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "组件是构建物料资产包的必要元素\n",
|
||||
"style": "margin-top: 10px; color: rgb(173, 176, 184); margin-bottom: 20px;"
|
||||
},
|
||||
"id": "d0ac5a34"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "Img",
|
||||
"props": {
|
||||
"src": "http://localhost:9090/assets/images/f750dc319828b039af713c643aad02bd_222x134.png",
|
||||
"style": "margin-top: 20px; width: 95%;"
|
||||
},
|
||||
"id": "3eac458c"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"className": ".components-box-right",
|
||||
"style": "padding-left: 50px; border-radius: 0px; height: 100%;"
|
||||
},
|
||||
"id": "d0890144",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"className": "components-box-right-add"
|
||||
},
|
||||
"id": "0c79b824",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "height: 50px;"
|
||||
},
|
||||
"id": "5dd75633",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "已添加",
|
||||
"style": "font-size: 16px; font-weight: bold;"
|
||||
},
|
||||
"id": "e534646e"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "display: inline-block;",
|
||||
"onClick": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.clearSelected(event)"
|
||||
}
|
||||
},
|
||||
"id": "1f3f03e5",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Icon",
|
||||
"props": {
|
||||
"name": "IconUndelete",
|
||||
"style": "margin-left: 10px; font-size: 20px; color:rgb(94, 124, 224);"
|
||||
},
|
||||
"id": "1ea6eea4"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "清空默认",
|
||||
"style": "color: rgb(94, 124, 224); border-radius: 0px;"
|
||||
},
|
||||
"id": "4f143cd5"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "Collection",
|
||||
"props": {
|
||||
"style": "height: 140px; display: flex; border-radius: 0px;",
|
||||
"dataSource": 151
|
||||
},
|
||||
"id": "9b4f4898",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "width: 300px; height: 70px; margin-top: 20px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-width: 1px; border-style: solid; border-color: #dfe1e6; display: flex; flex-direction: row; padding-right: 0px; padding-left: 0px; margin-right: 25px; margin-left: 0px; padding-top: 20px; margin-bottom: 20px; position: relative; background: rgb(242, 245, 252); border-radius: 2px;"
|
||||
},
|
||||
"id": "b5f585f9",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Img",
|
||||
"props": {
|
||||
"style": "width: 50px; height: 50px; margin-left: 20px; margin-top: 0px;",
|
||||
"src": "http://localhost:9090/assets/images/24b520f0-dd5d-11ec-9e28-e51c91ead705.png"
|
||||
},
|
||||
"id": "ee90fa60"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "width: 200px; margin-left: 12px;"
|
||||
},
|
||||
"id": "7735e4da",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.name"
|
||||
},
|
||||
"style": "font-weight: bold;"
|
||||
},
|
||||
"id": "068127b6"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "默认",
|
||||
"style": "position: absolute; right: 2px; top: 2px; font-family: \"Microsoft YaHei\"; color: rgb(255, 255, 255); background: rgb(80, 212, 171); border-radius: 4.5px 0px;"
|
||||
},
|
||||
"id": "6d0281d2"
|
||||
},
|
||||
{
|
||||
"componentName": "TinyCheckbox",
|
||||
"props": {
|
||||
"text": "",
|
||||
"style": "position: absolute; right: 10px; bottom: 10px; color: rgb(82, 110, 204);",
|
||||
"checked": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.isSelected"
|
||||
},
|
||||
"modelValue": true
|
||||
},
|
||||
"id": "622d9bdf"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.description"
|
||||
},
|
||||
"style": "display: block; margin-top: 10px; text-overflow: ellipsis; width: 90%; overflow: hidden; white-space: nowrap;"
|
||||
},
|
||||
"id": "eb87da78"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"loop": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.render7e97d9c7"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "width: 98%; display: flex; margin-bottom: 22px; justify-content: space-between; margin-right: 0px; padding-right: 0px;"
|
||||
},
|
||||
"id": "c7f80c55",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": "选择组件",
|
||||
"style": "font-size: 16px; font-weight: bold;"
|
||||
},
|
||||
"id": "2ebef929"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "display: flex;"
|
||||
},
|
||||
"id": "00a6fb16",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "TinySearch",
|
||||
"props": {
|
||||
"modelValue": "",
|
||||
"placeholder": "输入关键词",
|
||||
"style": "width: 295px; margin-right: 12px;",
|
||||
"onChange": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.query"
|
||||
}
|
||||
},
|
||||
"id": "d7364e4d"
|
||||
},
|
||||
{
|
||||
"componentName": "Collection",
|
||||
"props": {
|
||||
"dataSource": 129
|
||||
},
|
||||
"id": "03a2f95b",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "TinySelect",
|
||||
"props": {
|
||||
"modelValue": "",
|
||||
"placeholder": "请选择",
|
||||
"options": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.renderf5956ed2"
|
||||
},
|
||||
"style": "border-radius: 0px; margin-right: 0px;"
|
||||
},
|
||||
"id": "181b5ab7"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "Collection",
|
||||
"props": {
|
||||
"dataSource": 150,
|
||||
"style": "margin-left: 0px; margin-right: 314px; display: flex; justify-content: flex-start; flex-wrap: wrap; width: 98%; over-flow: hidden; border-radius: 0px;"
|
||||
},
|
||||
"id": "2b24a6d3",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "padding-top: 20px; padding-left: 12px; padding-right: 12px; width: 280px; height: 92px; background: rgb(255, 255, 255); border-width: 1px; border-color: rgb(223, 225, 230); border-style: solid; border-radius: 2px; padding-bottom: 20px; display: flex; margin-right: 0px; margin-bottom: 20px; margin-left: 20px;"
|
||||
},
|
||||
"id": "8a6e5b83",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Img",
|
||||
"props": {
|
||||
"style": "width: 40px; height: 40px;",
|
||||
"src": "http://localhost:9090/assets/images/0cfe4680-dd6c-11ec-a115-b53bbc5cfe9d.png"
|
||||
},
|
||||
"id": "474ffcb2"
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "margin-left: 12px; border-radius: 0px; width: 90%;"
|
||||
},
|
||||
"id": "99944a57",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "display: flex; justify-content: space-between;"
|
||||
},
|
||||
"id": "b5c88120",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"text": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.name"
|
||||
},
|
||||
"style": "font-weight: bold; border-radius: 0px;"
|
||||
},
|
||||
"id": "a747169d"
|
||||
},
|
||||
{
|
||||
"componentName": "TinyCheckbox",
|
||||
"props": {
|
||||
"text": "",
|
||||
"checked": false,
|
||||
"modelValue": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.isSelected",
|
||||
"model": true
|
||||
},
|
||||
"style": "border-radius: 0px;"
|
||||
},
|
||||
"id": "72cee0e5"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"style": "display: block; font-size: 12px; line-height: 17px; color: #333333; margin-top: 10px;",
|
||||
"text": {
|
||||
"type": "JSExpression",
|
||||
"value": "item.description"
|
||||
}
|
||||
},
|
||||
"id": "1aed3258"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"loop": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.renderb52aeac9"
|
||||
},
|
||||
"condition": true,
|
||||
"loopArgs": ["item", "idx"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "TinyPager",
|
||||
"props": {
|
||||
"layout": "sizes,total, prev, pager, next",
|
||||
"total": {
|
||||
"type": "JSExpression",
|
||||
"value": "this.state.componentsTotal"
|
||||
},
|
||||
"pageSize": 10,
|
||||
"currentPage": 1,
|
||||
"style": "margin-left: 314px; margin-right: 314px;"
|
||||
},
|
||||
"id": "ff96cc4e"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"componentName": "div",
|
||||
"props": {
|
||||
"style": "height: 100px; background: rgb(255, 255, 255); filter: drop-shadow(rgba(0, 0, 0, 0.1) 0px -1px 4px); text-align: center;"
|
||||
},
|
||||
"id": "616d5f40",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "TinyButton",
|
||||
"props": {
|
||||
"text": "创建物料资产包",
|
||||
"style": "background: rgb(245, 245, 246); border-width: 1px; border-color: rgb(173, 176, 184); border-style: solid; border-radius: 2.5px; opacity: 0.6; margin: 0 auto; width: 200px; height: 32px; margin-top: 30px; max-width: none; margin-bottom: 10px;"
|
||||
},
|
||||
"id": "e6abff72"
|
||||
},
|
||||
{
|
||||
"componentName": "Text",
|
||||
"props": {
|
||||
"style": "display: block; color: rgb(173, 176, 184); margin-top: 5px; width: 380px; margin: 0 auto;",
|
||||
"text": "组件或区块未添加,请切换左侧步骤条去完成添加"
|
||||
},
|
||||
"id": "f3a123ba",
|
||||
"children": [
|
||||
{
|
||||
"componentName": "Icon",
|
||||
"props": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fileName": "ComponentsSetting",
|
||||
"meta": {
|
||||
"id": 1761,
|
||||
"parentId": "0",
|
||||
"group": "staticPages",
|
||||
"occupier": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"provider": null,
|
||||
"password": null,
|
||||
"resetPasswordToken": "developer",
|
||||
"confirmationToken": "dfb2c162-351f-4f44-ad5f-899831311129",
|
||||
"confirmed": true,
|
||||
"blocked": null,
|
||||
"role": null,
|
||||
"created_by": null,
|
||||
"updated_by": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"isHome": true,
|
||||
"router": "componentsSetting",
|
||||
"rootElement": "div",
|
||||
"creator": "",
|
||||
"gmt_create": "2022-06-23 03:21:31",
|
||||
"gmt_modified": "2023-05-10 07:36:26"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": {
|
||||
"dataDisk": [1, 2, 3]
|
||||
|
|
|
@ -1,503 +0,0 @@
|
|||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 81,
|
||||
"name": "test",
|
||||
"app": {
|
||||
"id": 918,
|
||||
"name": "portal-app",
|
||||
"app_website": null,
|
||||
"platform": 897,
|
||||
"obs_url": "",
|
||||
"created_at": "2022-06-08T07:19:01.000Z",
|
||||
"updated_at": "2023-08-23T02:22:28.000Z",
|
||||
"state": null,
|
||||
"published": false,
|
||||
"createdBy": 86,
|
||||
"tenant": 1,
|
||||
"home_page": "1761",
|
||||
"css": null,
|
||||
"config": {},
|
||||
"git_group": "",
|
||||
"project_name": "",
|
||||
"constants": null,
|
||||
"data_handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
},
|
||||
"description": "demo应用",
|
||||
"latest": 22,
|
||||
"platform_history": null,
|
||||
"editor_url": "http://localhost:9090/platform-center/entry/portal-platform?type=app&id=918",
|
||||
"branch": "develop",
|
||||
"visit_url": null,
|
||||
"is_demo": null,
|
||||
"image_url": "http://localhost:9090/assets/images/27f7f9d26edd98f6bb1ed8d594d408d9_100x100.jpg",
|
||||
"is_default": true,
|
||||
"template_type": null,
|
||||
"set_template_time": null,
|
||||
"set_template_by": null,
|
||||
"framework": "Vue",
|
||||
"global_state": [
|
||||
{
|
||||
"id": "test1",
|
||||
"state": {
|
||||
"testa": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
},
|
||||
{
|
||||
"id": "test2",
|
||||
"state": {
|
||||
"name1": "xxx1"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test3",
|
||||
"state": {
|
||||
"name1": "xxx"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test4",
|
||||
"state": {
|
||||
"region": "",
|
||||
"scenario": "all",
|
||||
"productId": "",
|
||||
"planId": "",
|
||||
"addEvs": false,
|
||||
"addHss": false,
|
||||
"addCbr": false,
|
||||
"period": {
|
||||
"value": 1,
|
||||
"unit": "month"
|
||||
},
|
||||
"amount": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
}
|
||||
],
|
||||
"default_lang": null,
|
||||
"extend_config": {
|
||||
"business": {
|
||||
"serviceName": "",
|
||||
"endpointName": "cce",
|
||||
"endpointId": "ee",
|
||||
"serviceId": "ee",
|
||||
"router": "ee"
|
||||
},
|
||||
"env": {
|
||||
"alpha": {
|
||||
"regions": [
|
||||
{
|
||||
"name": "",
|
||||
"baseUrl": "",
|
||||
"isDefault": false
|
||||
}
|
||||
],
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
"type": "console"
|
||||
},
|
||||
"assets_url": "",
|
||||
"data_hash": "d15fe133765a70ee503c9643a329f0db",
|
||||
"can_associate": true,
|
||||
"data_source_global": {
|
||||
"dataHandler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"desc": null,
|
||||
"createdBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"updatedBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"created_at": "2023-06-12T00:49:54.000Z",
|
||||
"updated_at": "2023-06-12T00:49:54.000Z",
|
||||
"category_id": "test",
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"id": 82,
|
||||
"name": "test_mChange",
|
||||
"app": {
|
||||
"id": 918,
|
||||
"name": "portal-app",
|
||||
"app_website": null,
|
||||
"platform": 897,
|
||||
"obs_url": "",
|
||||
"created_at": "2022-06-08T07:19:01.000Z",
|
||||
"updated_at": "2023-08-23T02:22:28.000Z",
|
||||
"state": null,
|
||||
"published": false,
|
||||
"createdBy": 86,
|
||||
"tenant": 1,
|
||||
"home_page": "1761",
|
||||
"css": null,
|
||||
"config": {},
|
||||
"git_group": "",
|
||||
"project_name": "",
|
||||
"constants": null,
|
||||
"data_handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
},
|
||||
"description": "demo应用",
|
||||
"latest": 22,
|
||||
"platform_history": null,
|
||||
"editor_url": "http://localhost:9090/platform-center/entry/portal-platform?type=app&id=918",
|
||||
"branch": "develop",
|
||||
"visit_url": null,
|
||||
"is_demo": null,
|
||||
"image_url": "http://localhost:9090/assets/images/27f7f9d26edd98f6bb1ed8d594d408d9_100x100.jpg",
|
||||
"is_default": true,
|
||||
"template_type": null,
|
||||
"set_template_time": null,
|
||||
"set_template_by": null,
|
||||
"framework": "Vue",
|
||||
"global_state": [
|
||||
{
|
||||
"id": "test1",
|
||||
"state": {
|
||||
"testa": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
},
|
||||
{
|
||||
"id": "test2",
|
||||
"state": {
|
||||
"name1": "xxx1"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test3",
|
||||
"state": {
|
||||
"name1": "xxx"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test4",
|
||||
"state": {
|
||||
"region": "",
|
||||
"scenario": "all",
|
||||
"productId": "",
|
||||
"planId": "",
|
||||
"addEvs": false,
|
||||
"addHss": false,
|
||||
"addCbr": false,
|
||||
"period": {
|
||||
"value": 1,
|
||||
"unit": "month"
|
||||
},
|
||||
"amount": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
}
|
||||
],
|
||||
"default_lang": null,
|
||||
"extend_config": {
|
||||
"business": {
|
||||
"serviceName": "",
|
||||
"endpointName": "cce",
|
||||
"endpointId": "ee",
|
||||
"serviceId": "ee",
|
||||
"router": "ee"
|
||||
},
|
||||
"env": {
|
||||
"alpha": {
|
||||
"regions": [
|
||||
{
|
||||
"name": "",
|
||||
"baseUrl": "",
|
||||
"isDefault": false
|
||||
}
|
||||
],
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
"type": "console"
|
||||
},
|
||||
"assets_url": "",
|
||||
"data_hash": "d15fe133765a70ee503c9643a329f0db",
|
||||
"can_associate": true,
|
||||
"data_source_global": {
|
||||
"dataHandler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"desc": null,
|
||||
"createdBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"updatedBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"created_at": "2023-06-12T00:50:54.000Z",
|
||||
"updated_at": "2023-06-12T00:50:54.000Z",
|
||||
"category_id": "test_mChange",
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "test1",
|
||||
"app": {
|
||||
"id": 918,
|
||||
"name": "portal-app",
|
||||
"app_website": null,
|
||||
"platform": 897,
|
||||
"obs_url": "",
|
||||
"created_at": "2022-06-08T07:19:01.000Z",
|
||||
"updated_at": "2023-08-23T02:22:28.000Z",
|
||||
"state": null,
|
||||
"published": false,
|
||||
"createdBy": 86,
|
||||
"tenant": 1,
|
||||
"home_page": "1761",
|
||||
"css": null,
|
||||
"config": {},
|
||||
"git_group": "",
|
||||
"project_name": "",
|
||||
"constants": null,
|
||||
"data_handler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
},
|
||||
"description": "demo应用",
|
||||
"latest": 22,
|
||||
"platform_history": null,
|
||||
"editor_url": "http://localhost:9090/platform-center/entry/portal-platform?type=app&id=918",
|
||||
"branch": "develop",
|
||||
"visit_url": null,
|
||||
"is_demo": null,
|
||||
"image_url": "http://localhost:9090/assets/images/27f7f9d26edd98f6bb1ed8d594d408d9_100x100.jpg",
|
||||
"is_default": true,
|
||||
"template_type": null,
|
||||
"set_template_time": null,
|
||||
"set_template_by": null,
|
||||
"framework": "Vue",
|
||||
"global_state": [
|
||||
{
|
||||
"id": "test1",
|
||||
"state": {
|
||||
"testa": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
},
|
||||
{
|
||||
"id": "test2",
|
||||
"state": {
|
||||
"name1": "xxx1"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test3",
|
||||
"state": {
|
||||
"name1": "xxx"
|
||||
},
|
||||
"getters": {
|
||||
"count": {
|
||||
"type": "JSFunction",
|
||||
"value": "function count() {}"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"actions": {
|
||||
"type": "JSFunction",
|
||||
"value": "function actions() {}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "test4",
|
||||
"state": {
|
||||
"region": "",
|
||||
"scenario": "all",
|
||||
"productId": "",
|
||||
"planId": "",
|
||||
"addEvs": false,
|
||||
"addHss": false,
|
||||
"addCbr": false,
|
||||
"period": {
|
||||
"value": 1,
|
||||
"unit": "month"
|
||||
},
|
||||
"amount": 1
|
||||
},
|
||||
"getters": {},
|
||||
"actions": {}
|
||||
}
|
||||
],
|
||||
"default_lang": null,
|
||||
"extend_config": {
|
||||
"business": {
|
||||
"serviceName": "",
|
||||
"endpointName": "cce",
|
||||
"endpointId": "ee",
|
||||
"serviceId": "ee",
|
||||
"router": "ee"
|
||||
},
|
||||
"env": {
|
||||
"alpha": {
|
||||
"regions": [
|
||||
{
|
||||
"name": "",
|
||||
"baseUrl": "",
|
||||
"isDefault": false
|
||||
}
|
||||
],
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
"type": "console"
|
||||
},
|
||||
"assets_url": "",
|
||||
"data_hash": "d15fe133765a70ee503c9643a329f0db",
|
||||
"can_associate": true,
|
||||
"data_source_global": {
|
||||
"dataHandler": {
|
||||
"type": "JSFunction",
|
||||
"value": "function dataHanlder(res){\n return res;\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"desc": null,
|
||||
"createdBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"updatedBy": {
|
||||
"id": 86,
|
||||
"username": "开发者",
|
||||
"email": "developer@lowcode.com",
|
||||
"resetPasswordToken": "developer",
|
||||
"blocked": null,
|
||||
"created_at": "2022-05-27T16:50:44.000Z",
|
||||
"updated_at": "2022-05-27T16:50:44.000Z",
|
||||
"block": null,
|
||||
"is_admin": true,
|
||||
"is_public": null
|
||||
},
|
||||
"created_at": "2023-03-22T07:26:04.000Z",
|
||||
"updated_at": "2023-06-02T08:45:34.000Z",
|
||||
"category_id": "test_mChange01",
|
||||
"blocks": []
|
||||
}
|
||||
],
|
||||
"locale": "zh-cn"
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,31 +1,24 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
|
||||
import KoaRouter from 'koa-router'
|
||||
import * as glob from 'glob'
|
||||
import path from 'path'
|
||||
import fs from 'fs-extra'
|
||||
import Schema2CodeServcice from '../services/schema2code'
|
||||
import PageService from '../services/pages'
|
||||
import AppService from '../services/app'
|
||||
import BlockService from '../services/block'
|
||||
import SourceService from '../services/source'
|
||||
import MockService from '../services/mockService'
|
||||
|
||||
import { getResponseData } from '../tool/Common'
|
||||
const router = new KoaRouter()
|
||||
const schema2codeService = new Schema2CodeServcice()
|
||||
export const pageService = new PageService()
|
||||
export const appService = new AppService()
|
||||
export const blockService = new BlockService()
|
||||
export const sourceService = new SourceService()
|
||||
export const mockService = new MockService()
|
||||
const getJsonPathData = (jpath, method = 'get') => {
|
||||
const usefulPath = jpath.split(`${method}${path.sep}`)[1]
|
||||
const apipath = usefulPath.split(path.sep)
|
||||
|
@ -63,50 +56,170 @@ glob.globSync(`${mockPath}/post/**/*.json`).forEach((jpath) => {
|
|||
})
|
||||
|
||||
router.get('/app-center/api/apps/canvas/lock', async (ctx) => {
|
||||
ctx.body = await appService.lock(ctx.request.query)
|
||||
ctx.body = await mockService.appService.lock(ctx.request.query)
|
||||
})
|
||||
|
||||
router.post('/app-center/api/schema2code', (ctx) => {
|
||||
const { pageInfo } = ctx.request.body
|
||||
ctx.body = schema2codeService.schema2code(pageInfo)
|
||||
ctx.body = mockService.schema2codeService.schema2code(pageInfo)
|
||||
})
|
||||
|
||||
router.get('/app-center/api/preview/metadata', (ctx) => {
|
||||
ctx.body = appService.getAppPreviewMetaData()
|
||||
ctx.body = mockService.appService.getAppPreviewMetaData()
|
||||
})
|
||||
|
||||
router.post('/app-center/api/pages/create', async (ctx) => {
|
||||
ctx.body = await pageService.create(ctx.request.body)
|
||||
ctx.body = await mockService.pageService.create(ctx.request.body)
|
||||
})
|
||||
|
||||
router.post('/app-center/api/pages/update/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
const { body } = ctx.request
|
||||
ctx.body = await pageService.update(id, body)
|
||||
ctx.body = await mockService.pageService.update(id, body)
|
||||
})
|
||||
|
||||
router.get('/app-center/api/pages/list/:appId', async (ctx) => {
|
||||
const { appId } = ctx.params
|
||||
ctx.body = await pageService.list(appId)
|
||||
ctx.body = await mockService.pageService.list(appId)
|
||||
})
|
||||
|
||||
router.get('/app-center/api/pages/detail/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await pageService.detail(id)
|
||||
ctx.body = await mockService.pageService.detail(id)
|
||||
})
|
||||
|
||||
router.get('/app-center/api/pages/delete/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await pageService.delete(id)
|
||||
ctx.body = await mockService.pageService.delete(id)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/block', (ctx)=> {
|
||||
ctx.body = blockService.find(ctx.request.query)
|
||||
router.get('/material-center/api/block/detail/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.blockService.detail(id)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/blocks', async (ctx) => {
|
||||
const { appId } = ctx.params
|
||||
ctx.body = await mockService.blockService.list(appId)
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block/create', async (ctx) => {
|
||||
const result = mockService.blockService.create(ctx.request.body)
|
||||
const categoriesId = ctx.request.body.categories[0]
|
||||
const _id = result.id
|
||||
await mockService.blockCategoryService.update(categoriesId, { _id })
|
||||
ctx.body = getResponseData(result)
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block/update/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
const { body } = ctx.request
|
||||
ctx.body = await mockService.blockService.update(id, body)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/block/delete/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.blockService.delete(id)
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block-groups/create', async (ctx) => {
|
||||
ctx.body = await mockService.blockGroupService.create(ctx.request.body)
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block-groups/update/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
const { body } = ctx.request
|
||||
ctx.body = await mockService.blockGroupService.update(id, body)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/block-groups/delete/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.blockGroupService.delete(id)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/block-groups', async (ctx) => {
|
||||
const result = await mockService.blockGroupService.find(ctx.query)
|
||||
let blockGroup
|
||||
if (result.data.length > 1) {
|
||||
blockGroup = await Promise.all(
|
||||
result.data.map(async (group) => {
|
||||
group.blocks = await Promise.all(
|
||||
group.blocks.map(async (block) => {
|
||||
const blockData = await mockService.blockService.detail(block.id)
|
||||
return blockData
|
||||
})
|
||||
)
|
||||
return group
|
||||
})
|
||||
)
|
||||
ctx.body = getResponseData(blockGroup)
|
||||
} else {
|
||||
blockGroup = result.data[0]
|
||||
const blocks = await Promise.all(
|
||||
blockGroup.blocks.map(async (item) => {
|
||||
const blockData = await mockService.blockService.detail(item)
|
||||
return blockData
|
||||
})
|
||||
)
|
||||
|
||||
blockGroup.blocks = blocks
|
||||
ctx.body = getResponseData([blockGroup])
|
||||
}
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block-categories', async (ctx) => {
|
||||
ctx.body = await mockService.blockCategoryService.create(ctx.request.body)
|
||||
})
|
||||
|
||||
router.put('/material-center/api/block-categories/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
const { body } = ctx.request
|
||||
ctx.body = await mockService.blockCategoryService.update(id, body)
|
||||
})
|
||||
|
||||
router.delete('/material-center/api/block-categories/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.blockCategoryService.delete(id)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/block-categories', async (ctx) => {
|
||||
const result = await mockService.blockCategoryService.find(ctx.query)
|
||||
const blockCategories = await Promise.all(
|
||||
result.data.map(async (group) => {
|
||||
const blocks = await Promise.all(
|
||||
group.blocks.map(async (block) => {
|
||||
const blockData = await mockService.blockService.detail(block)
|
||||
return blockData
|
||||
})
|
||||
)
|
||||
group.blocks = blocks
|
||||
return group
|
||||
})
|
||||
)
|
||||
ctx.body = getResponseData(blockCategories)
|
||||
})
|
||||
|
||||
router.get('/app-center/api/sources/detail/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await sourceService.detail(id)
|
||||
ctx.body = await mockService.sourceService.detail(id)
|
||||
})
|
||||
|
||||
router.post('/material-center/api/block/deploy', async (ctx) => {
|
||||
ctx.body = await mockService.blockBuildService.build(ctx.request.body)
|
||||
})
|
||||
|
||||
router.get('/material-center/api/tasks/:id', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.taskService.detail(id)
|
||||
})
|
||||
|
||||
router.get('/block-history', async (ctx) => {
|
||||
const { id } = ctx.params
|
||||
ctx.body = await mockService.blockHistoryService.find(id)
|
||||
})
|
||||
|
||||
router.post('block-history/create', async (ctx) => {
|
||||
ctx.body = await mockService.blockHistoryService.create(ctx.request.body)
|
||||
})
|
||||
|
||||
export default router
|
||||
|
|
|
@ -1,20 +1,93 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import path from 'path'
|
||||
import DateStore from '@seald-io/nedb'
|
||||
import { getResponseData } from '../tool/Common'
|
||||
import blocks from './blocks.json'
|
||||
export default class BlockService {
|
||||
find({label}) {
|
||||
const blockData = blocks[label] || {}
|
||||
return getResponseData(blockData)
|
||||
constructor() {
|
||||
this.db = new DateStore({
|
||||
filename: path.resolve(__dirname, '../database/blocks.db'),
|
||||
autoload: true
|
||||
})
|
||||
|
||||
this.db.ensureIndex({
|
||||
fieldName: 'label',
|
||||
unique: true
|
||||
})
|
||||
|
||||
this.userInfo = {
|
||||
id: 86,
|
||||
username: '开发者',
|
||||
email: 'developer@lowcode.com',
|
||||
resetPasswordToken: 'developer',
|
||||
confirmationToken: 'dfb2c162-351f-4f44-ad5f-8998',
|
||||
is_admin: true
|
||||
}
|
||||
|
||||
this.blockModel = {
|
||||
id: '',
|
||||
label: '',
|
||||
name_cn: '',
|
||||
framework: [],
|
||||
content: {},
|
||||
description: '',
|
||||
path: '',
|
||||
screenshot: '',
|
||||
created_app: '',
|
||||
tags: '',
|
||||
categories: [],
|
||||
occupier: {
|
||||
id: 86,
|
||||
username: '开发者',
|
||||
resetPasswordToken: 'developer'
|
||||
},
|
||||
isDefault: null,
|
||||
isOfficial: null
|
||||
}
|
||||
}
|
||||
|
||||
async create(params) {
|
||||
const blockData = { ...this.blockModel, ...params }
|
||||
const result = await this.db.insertAsync(blockData)
|
||||
const { _id } = result
|
||||
await this.db.updateAsync({ _id }, { $set: { id: _id } })
|
||||
result.id = result._id
|
||||
return result
|
||||
}
|
||||
|
||||
async update(id, params) {
|
||||
await this.db.updateAsync({ _id: id }, { $set: params })
|
||||
const result = await this.db.findOneAsync({ _id: id })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async detail(blockId) {
|
||||
const result = await this.db.findOneAsync({ _id: blockId })
|
||||
return result
|
||||
}
|
||||
|
||||
async delete(blockId) {
|
||||
const result = await this.db.findOneAsync({ _id: blockId })
|
||||
await this.db.removeAsync({ _id: blockId })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async list(appId) {
|
||||
const result = await this.db.findAsync()
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async find(params) {
|
||||
const result = await this.db.findAsync(params)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import path from 'path'
|
||||
import DateStore from '@seald-io/nedb'
|
||||
import { getResponseData } from '../tool/Common'
|
||||
import appinfo from './appinfo.json'
|
||||
export default class BlockCategoryService {
|
||||
constructor() {
|
||||
this.db = new DateStore({
|
||||
filename: path.resolve(__dirname, '../database/blockCategories.db'),
|
||||
autoload: true
|
||||
})
|
||||
|
||||
this.db.ensureIndex({
|
||||
fieldName: 'name',
|
||||
unique: true
|
||||
})
|
||||
|
||||
this.blockCategoriesModel = {
|
||||
id: '',
|
||||
app: '',
|
||||
name: '',
|
||||
desc: '',
|
||||
blocks: []
|
||||
}
|
||||
}
|
||||
|
||||
async create(params) {
|
||||
const blockCategoriesData = { ...this.blockCategoriesModel, ...params }
|
||||
blockCategoriesData.app = appinfo.app
|
||||
const result = await this.db.insertAsync(blockCategoriesData)
|
||||
const { _id } = result
|
||||
await this.db.updateAsync({ _id }, { $set: { id: _id } })
|
||||
result.id = result._id
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async update(id, params) {
|
||||
if (params?._id) {
|
||||
const categories = await this.db.findOneAsync({ _id: id })
|
||||
categories.blocks.push(params._id)
|
||||
await this.db.updateAsync({ _id: id }, { $set: categories })
|
||||
return
|
||||
}
|
||||
params.app = appinfo.app
|
||||
await this.db.updateAsync({ _id: id }, { $set: params })
|
||||
|
||||
const result = await this.db.findOneAsync({ _id: id })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async find(params) {
|
||||
const result = await this.db.findAsync()
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async delete(id) {
|
||||
const result = await this.db.findOneAsync({ _id: id })
|
||||
await this.db.removeAsync({ _id: id })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async list(appId) {
|
||||
const result = await this.db.findAsync()
|
||||
return getResponseData(result)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import path from 'path'
|
||||
import DateStore from '@seald-io/nedb'
|
||||
import { getResponseData } from '../tool/Common'
|
||||
import appinfo from './appinfo.json'
|
||||
export default class BlockGroupService {
|
||||
constructor() {
|
||||
this.db = new DateStore({
|
||||
filename: path.resolve(__dirname, '../database/blockGroups.db'),
|
||||
autoload: true
|
||||
})
|
||||
|
||||
this.db.ensureIndex({
|
||||
fieldName: 'name',
|
||||
unique: true
|
||||
})
|
||||
|
||||
this.blockGroupModel = {
|
||||
id: '',
|
||||
app: '',
|
||||
name: '',
|
||||
desc: '',
|
||||
blocks: []
|
||||
}
|
||||
}
|
||||
|
||||
async create(params) {
|
||||
const blockGroupData = { ...this.blockGroupModel, ...params }
|
||||
blockGroupData.app = appinfo.app
|
||||
const result = await this.db.insertAsync(blockGroupData)
|
||||
const { _id } = result
|
||||
await this.db.updateAsync({ _id }, { $set: { id: _id } })
|
||||
result.id = result._id
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async update(id, params) {
|
||||
params.app = appinfo.app
|
||||
await this.db.updateAsync({ _id: id }, { $set: params })
|
||||
|
||||
const result = await this.db.findOneAsync({ _id: id })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async find(params) {
|
||||
if (params?.app || !params?.id) {
|
||||
const result = await this.db.findAsync()
|
||||
return getResponseData(result)
|
||||
}
|
||||
const { id } = params
|
||||
const blockGroup = await this.db.findOneAsync({ _id: id })
|
||||
return getResponseData([blockGroup])
|
||||
}
|
||||
|
||||
async delete(blockGroupId) {
|
||||
const result = await this.db.findOneAsync({ _id: blockGroupId })
|
||||
await this.db.removeAsync({ _id: blockGroupId })
|
||||
return getResponseData(result)
|
||||
}
|
||||
|
||||
async list(appId) {
|
||||
const result = await this.db.findAsync()
|
||||
return getResponseData(result)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
import PageService from './pages'
|
||||
import AppService from './app'
|
||||
import BlockService from './block'
|
||||
import SourceService from './source'
|
||||
import BlockGroupService from './blockGroup'
|
||||
import BlockCategoryService from './blockCategory'
|
||||
import Schema2CodeServcice from './schema2code'
|
||||
export default class MockService {
|
||||
schema2codeService
|
||||
pageService
|
||||
appService
|
||||
blockService
|
||||
sourceService
|
||||
blockGroupService
|
||||
blockCategoryService
|
||||
|
||||
constructor() {
|
||||
this.schema2codeService = new Schema2CodeServcice()
|
||||
this.pageService = new PageService()
|
||||
this.appService = new AppService()
|
||||
this.blockService = new BlockService()
|
||||
this.sourceService = new SourceService()
|
||||
this.blockGroupService = new BlockGroupService()
|
||||
this.blockCategoryService = new BlockCategoryService()
|
||||
}
|
||||
}
|
117
package.json
117
package.json
|
@ -1,105 +1,29 @@
|
|||
{
|
||||
"name": "@opentiny/tiny-engine",
|
||||
"version": "1.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "TinyEngine enables developers to customize low-code platforms, build low-bit platforms online in real time, and support secondary development or integration of low-bit platform capabilities.",
|
||||
"homepage": "https://opentiny.design/tiny-engine",
|
||||
"keywords": [
|
||||
"vue",
|
||||
"vue3",
|
||||
"frontend",
|
||||
"opentiny",
|
||||
"lowcode",
|
||||
"tiny-engine"
|
||||
],
|
||||
"name": "tiny-engine",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_OPTIONS=--max-old-space-size=10240 VITE_API_MOCK=mock vite",
|
||||
"serve": "cross-env NODE_OPTIONS=--max-old-space-size=10240 vite",
|
||||
"build:plugin": "lerna run build --scope @opentiny/tiny-engine-*",
|
||||
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode alpha",
|
||||
"build:prod": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode prod",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"dev": "concurrently 'pnpm:serve:backend' 'pnpm:serve:frontend'",
|
||||
"dev:mock": "pnpm --filter @opentiny/tiny-engine dev",
|
||||
"serve:frontend": "pnpm --filter @opentiny/tiny-engine serve",
|
||||
"serve:backend": "pnpm --filter @opentiny/tiny-engine-mock dev",
|
||||
"build:plugin": "pnpm --filter @opentiny/tiny-engine-* build",
|
||||
"build:alpha": "pnpm --filter @opentiny/tiny-engine build:alpha",
|
||||
"build:prod": "pnpm --filter @opentiny/tiny-engine build:prod",
|
||||
"buildComponentSchemas": "node scripts/buildComponentSchemas.js",
|
||||
"preview": "vite preview",
|
||||
"preview": "pnpm --filter @opentiny/tiny-engine preview",
|
||||
"lint": "eslint . --ext .js,.vue,.jsx --fix",
|
||||
"format": "prettier --write **/*{.vue,.js,.ts,.html,.json}",
|
||||
"publish:core": "npm publish",
|
||||
"publish:plugin": "lerna exec npm publish --scope @opentiny/tiny-engine-*",
|
||||
"version": "lerna exec npm version ${version}",
|
||||
"clean": "lerna clean",
|
||||
"prepare": "node -e \"if(require('fs').existsSync('.git')){process.exit(1)}\" || husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "7.18.13",
|
||||
"@babel/generator": "7.18.13",
|
||||
"@babel/parser": "7.18.13",
|
||||
"@babel/traverse": "7.18.13",
|
||||
"@opentiny/vue": "~3.9.0",
|
||||
"@opentiny/vue-design-smb": "~3.9.0",
|
||||
"@vue/babel-plugin-jsx": "1.1.1",
|
||||
"@vue/repl": "^1.3.0",
|
||||
"@vueuse/core": "^9.6.0",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"file-saver": "^2.0.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jszip": "^3.10.1",
|
||||
"monaco-editor": "0.33.0",
|
||||
"prettier": "2.7.1",
|
||||
"sortablejs": "^1.14.0",
|
||||
"vue": "3.2.45",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
"vue-draggable-next": "2.1.0",
|
||||
"vue-i18n": "9.2.2",
|
||||
"xlsx": "^0.18.5"
|
||||
"prepare": "node -e \"if(require('fs').existsSync('.git')){process.exit(1)}\" || husky install",
|
||||
"pub:premajor": "pnpm run build:plugin && pnpm run build:alpha && pnpm lerna version premajor --preid beta --no-push --yes && lerna publish from-package --pre-dist-tag beta --yes",
|
||||
"pub:preminor": "pnpm run build:plugin && pnpm run build:alpha && pnpm lerna version preminor --preid beta --no-push --yes && lerna publish from-package --pre-dist-tag beta --yes",
|
||||
"pub:prepatch": "pnpm run build:plugin && pnpm run build:alpha && pnpm lerna version prepatch --preid beta --no-push --yes && lerna publish from-package --pre-dist-tag beta --yes",
|
||||
"pub:prerelease": "pnpm run build:plugin && pnpm run build:alpha && pnpm lerna version prerelease --preid beta --no-push --yes && lerna publish from-package --pre-dist-tag beta --yes"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.21.3",
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||
"@opentiny/tiny-engine-canvas": "file:src/canvas",
|
||||
"@opentiny/tiny-engine-common": "file:src/common",
|
||||
"@opentiny/tiny-engine-controller": "file:src/controller",
|
||||
"@opentiny/tiny-engine-http": "file:src/http",
|
||||
"@opentiny/tiny-engine-plugin-block": "file:src/plugins/packages/block",
|
||||
"@opentiny/tiny-engine-plugin-bridge": "file:src/plugins/packages/bridge",
|
||||
"@opentiny/tiny-engine-plugin-data": "file:src/plugins/packages/data",
|
||||
"@opentiny/tiny-engine-plugin-datasource": "file:src/plugins/packages/datasource",
|
||||
"@opentiny/tiny-engine-plugin-help": "file:src/plugins/packages/help",
|
||||
"@opentiny/tiny-engine-plugin-i18n": "file:src/plugins/packages/i18n",
|
||||
"@opentiny/tiny-engine-plugin-materials": "file:src/plugins/packages/materials",
|
||||
"@opentiny/tiny-engine-plugin-page": "file:src/plugins/packages/page",
|
||||
"@opentiny/tiny-engine-plugin-schema": "file:src/plugins/packages/schema",
|
||||
"@opentiny/tiny-engine-plugin-script": "file:src/plugins/packages/script",
|
||||
"@opentiny/tiny-engine-plugin-tree": "file:src/plugins/packages/tree",
|
||||
"@opentiny/tiny-engine-plugin-tutorial": "file:src/plugins/packages/tutorial",
|
||||
"@opentiny/tiny-engine-plugin-robot": "file:src/plugins/packages/robot",
|
||||
"@opentiny/tiny-engine-setting-design": "file:src/settings/packages/design",
|
||||
"@opentiny/tiny-engine-setting-events": "file:src/settings/packages/events",
|
||||
"@opentiny/tiny-engine-setting-props": "file:src/settings/packages/props",
|
||||
"@opentiny/tiny-engine-setting-styles": "file:src/settings/packages/styles",
|
||||
"@opentiny/tiny-engine-svgs": "file:src/svgs",
|
||||
"@opentiny/tiny-engine-theme-dark": "file:src/theme/packages/dark",
|
||||
"@opentiny/tiny-engine-theme-light": "file:src/theme/packages/light",
|
||||
"@opentiny/tiny-engine-toolbar-breadcrumb": "file:src/toolbars/packages/breadcrumb",
|
||||
"@opentiny/tiny-engine-toolbar-checkinout": "file:src/toolbars/packages/lock",
|
||||
"@opentiny/tiny-engine-toolbar-clean": "file:src/toolbars/packages/clean",
|
||||
"@opentiny/tiny-engine-toolbar-collaboration": "file:src/toolbars/packages/collaboration",
|
||||
"@opentiny/tiny-engine-toolbar-fullscreen": "file:src/toolbars/packages/fullscreen",
|
||||
"@opentiny/tiny-engine-toolbar-generate-vue": "file:src/toolbars/packages/generate-vue",
|
||||
"@opentiny/tiny-engine-toolbar-lang": "file:src/toolbars/packages/lang",
|
||||
"@opentiny/tiny-engine-toolbar-layout": "file:src/toolbars/packages/layout",
|
||||
"@opentiny/tiny-engine-toolbar-logo": "file:src/toolbars/packages/logo",
|
||||
"@opentiny/tiny-engine-toolbar-logout": "file:src/toolbars/packages/logout",
|
||||
"@opentiny/tiny-engine-toolbar-media": "file:src/toolbars/packages/media",
|
||||
"@opentiny/tiny-engine-toolbar-preview": "file:src/toolbars/packages/preview",
|
||||
"@opentiny/tiny-engine-toolbar-redoundo": "file:src/toolbars/packages/redoundo",
|
||||
"@opentiny/tiny-engine-toolbar-refresh": "file:src/toolbars/packages/refresh",
|
||||
"@opentiny/tiny-engine-toolbar-save": "file:src/toolbars/packages/save",
|
||||
"@opentiny/tiny-engine-toolbar-setting": "file:src/toolbars/packages/setting",
|
||||
"@opentiny/tiny-engine-utils": "file:src/utils",
|
||||
"@opentiny/tiny-engine-webcomponent-core": "file:src/webcomponent",
|
||||
"@opentiny/tiny-engine-i18n-host": "file:src/i18n",
|
||||
"@types/node": "^18.0.0",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.2",
|
||||
|
@ -110,7 +34,8 @@
|
|||
"eslint-plugin-vue": "^8.0.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"husky": "^8.0.0",
|
||||
"lerna": "^5.1.8",
|
||||
"concurrently": "^8.2.0",
|
||||
"lerna": "^7.2.0",
|
||||
"less": "^4.1.2",
|
||||
"lint-staged": "^13.2.0",
|
||||
"path": "^0.12.7",
|
||||
|
@ -128,5 +53,9 @@
|
|||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"pnpm": ">=7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "@opentiny/tiny-engine-canvas",
|
||||
"version": "1.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "7.18.13",
|
||||
"@opentiny/tiny-engine-common": "workspace:^1.0.0",
|
||||
"@opentiny/tiny-engine-controller": "workspace:^1.0.0",
|
||||
"@opentiny/tiny-engine-i18n-host": "workspace:^1.0.0",
|
||||
"@opentiny/tiny-engine-utils": "workspace:^1.0.0",
|
||||
"@opentiny/tiny-engine-webcomponent-core": "workspace:^1.0.0",
|
||||
"@opentiny/vue": "~3.10.0",
|
||||
"@opentiny/vue-icon": "~3.10.0",
|
||||
"@opentiny/vue-renderless": "~3.10.0",
|
||||
"@vue/babel-plugin-jsx": "1.1.1",
|
||||
"@vue/shared": "^3.3.4",
|
||||
"@vueuse/core": "^9.6.0",
|
||||
"vue": "3.2.45",
|
||||
"vue-i18n": "9.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"vite": "^4.3.7"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
@ -135,6 +135,4 @@ export const createRender = (config) => {
|
|||
]).finally(create)
|
||||
}
|
||||
|
||||
createRender(window.parent.TinyGlobalConfig)
|
||||
|
||||
document.addEventListener('updateDependencies', updateDependencies)
|
|
@ -1,14 +1,14 @@
|
|||
/**
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
* Copyright (c) 2023 - present TinyEngine Authors.
|
||||
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license.
|
||||
*
|
||||
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
||||
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
*
|
||||
*/
|
||||
|
||||
import CanvasContainer from './components/container/CanvasContainer.vue'
|
||||
import CanvasAction from './components/container/CanvasAction.vue'
|
||||
|
@ -17,6 +17,7 @@ import CanvasFooter from './components/container/CanvasFooter.vue'
|
|||
import CanvasResize from './components/container/CanvasResize.vue'
|
||||
import Builtin from './components/builtin/builtin.json'
|
||||
import RenderMain, { api as renderApi } from './components/render/RenderMain'
|
||||
import { createRender } from './components/render/runner'
|
||||
import {
|
||||
dragStart,
|
||||
updateRect,
|
||||
|
@ -90,7 +91,8 @@ export {
|
|||
setGlobalState,
|
||||
getGlobalState,
|
||||
getDocument,
|
||||
canvasDispatch
|
||||
canvasDispatch,
|
||||
createRender
|
||||
}
|
||||
|
||||
export default CanvasContainer
|
|
@ -24,7 +24,7 @@ export default defineConfig({
|
|||
}
|
||||
},
|
||||
define: {
|
||||
'process.env': process.env
|
||||
'process.env': {}
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
|
@ -66,7 +66,7 @@ export default defineConfig({
|
|||
formats: ['es']
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['vue', 'vue-i18n', /@opentiny\/tiny-engine.*/, /@opentiny\/vue.*/]
|
||||
external: ['vue', '@vueuse/core', 'vue-i18n', /@opentiny\/tiny-engine.*/, /@opentiny\/vue.*/]
|
||||
},
|
||||
minify: true
|
||||
}
|
|
@ -81,10 +81,10 @@ import {
|
|||
Popover as TinyPopover,
|
||||
FormItem as TinyFormItem
|
||||
} from '@opentiny/vue'
|
||||
import { VueMonaco } from '@opentiny/tiny-engine-common'
|
||||
import { theme } from '@opentiny/tiny-engine-controller/adapter'
|
||||
import { useLayout } from '@opentiny/tiny-engine-controller'
|
||||
import { getSchema, setSchema } from '@opentiny/tiny-engine-canvas'
|
||||
import VueMonaco from './VueMonaco.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
|
@ -81,7 +81,7 @@ import { Button, DialogBox, Popover, Search, Alert } from '@opentiny/vue'
|
|||
import { getGlobalConfig, useModal, usePage, useNotify } from '@opentiny/tiny-engine-controller'
|
||||
import { theme } from '@opentiny/tiny-engine-controller/adapter'
|
||||
import { getSchema } from '@opentiny/tiny-engine-canvas'
|
||||
import { MetaListItems } from '@opentiny/tiny-engine-common'
|
||||
import MetaListItems from './MetaListItems.vue'
|
||||
import { iconYes } from '@opentiny/vue-icon'
|
||||
import VueMonaco from './VueMonaco.vue'
|
||||
import { initCompletion } from '../js/completion'
|
|
@ -126,9 +126,9 @@ import { useHttp } from '@opentiny/tiny-engine-http'
|
|||
import { getSchema, getGlobalState, setState, getNode, getCurrent } from '@opentiny/tiny-engine-canvas'
|
||||
import { useCanvas, useResource, useLayout, useApp, useProperties, useData } from '@opentiny/tiny-engine-controller'
|
||||
import { theme } from '@opentiny/tiny-engine-controller/adapter'
|
||||
import { SvgButton } from '@opentiny/tiny-engine-common'
|
||||
import { parse, traverse, generate } from '@opentiny/tiny-engine-common/js/ast'
|
||||
import { constants } from '@opentiny/tiny-engine-utils'
|
||||
import SvgButton from './SvgButton.vue'
|
||||
import { parse, traverse, generate } from '../js/ast'
|
||||
import { DEFAULT_LOOP_NAME } from '../js/constants.js'
|
||||
import MonacoEditor from './VueMonaco.vue'
|
||||
import { formatString } from '../js/ast.js'
|
|
@ -11,7 +11,7 @@
|
|||
<script>
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import { ButtonGroup } from '@opentiny/vue'
|
||||
import i18n from '@opentiny/tiny-engine-common/js/i18n'
|
||||
import i18n from '../js/i18n'
|
||||
|
||||
export default {
|
||||
name: 'MetaButtonGroup',
|
|
@ -16,7 +16,7 @@
|
|||
<script>
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import { Cascader } from '@opentiny/vue'
|
||||
import i18n from '@opentiny/tiny-engine-common/js/i18n'
|
||||
import i18n from '../js/i18n'
|
||||
|
||||
export default {
|
||||
name: 'MetaCascader',
|
|
@ -10,7 +10,7 @@
|
|||
<script>
|
||||
import { ref, watchEffect, computed } from 'vue'
|
||||
import { CheckboxGroup } from '@opentiny/vue'
|
||||
import i18n from '@opentiny/tiny-engine-common/js/i18n'
|
||||
import i18n from '../js/i18n'
|
||||
|
||||
export default {
|
||||
name: 'MetaCheckboxGroup',
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue