repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
tiny-engine
github_2023
javascript
1,219
opentiny
hexqi
@@ -26,12 +41,18 @@ const layoutState = reactive({ height: '100%' }, plugins: { + isShow: true, fixedPanels: [PLUGIN_NAME.Materials], - render: null, - pluginEvent: 'all' + render: PLUGIN_NAME.Materials, + pluginEvent: 'all', + api: {}, // 插件需要注册交互API到这里
这个API字段应该没有用到,现在不放在layout里
tiny-engine
github_2023
others
1,219
opentiny
hexqi
@@ -52,18 +79,167 @@ export default { isShowDocsIcon: { type: Boolean, default: false + }, + /** + * 固定面板插件数组 + */ + fixedPanels: { + type: Array + }, + /** + * 固定面板标识 + */ + fixedName: { + type: String + }, + /** + * 自定义标题下边距 + */ + header...
这里是不是拼写错误单词Ran看起来不太对
tiny-engine
github_2023
others
1,219
opentiny
hexqi
@@ -52,18 +79,167 @@ export default { isShowDocsIcon: { type: Boolean, default: false + }, + /** + * 固定面板插件数组 + */ + fixedPanels: { + type: Array + }, + /** + * 固定面板标识 + */ + fixedName: { + type: String + }, + /** + * 自定义标题下边距 + */ + header...
可以直接用vueuse的节流方法 ```js import { useThrottleFn } from '@vueuse/core' ```
tiny-engine
github_2023
others
1,219
opentiny
coderabbitai[bot]
@@ -52,18 +80,143 @@ export default { isShowDocsIcon: { type: Boolean, default: false + }, + /** + * 固定面板插件数组 + */ + fixedPanels: { + type: Array + }, + /** + * 固定面板标识 + */ + fixedName: { + type: String + }, + /** + * 自定义标题下边距 + */ + header...
_🛠️ Refactor suggestion_ **Avoid direct DOM queries for resizer elements.** Using `document.querySelector` to get DOM elements is brittle and can lead to issues if the DOM structure changes. Consider using Vue refs instead for more reliable element references. ```diff - const initResizerDOM = () => { - leftResi...
tiny-engine
github_2023
others
1,219
opentiny
hexqi
@@ -28,6 +28,8 @@ --te-component-common-border-color-transparent: var(--te-base-color-transparent); // 透明色直接使用base的变量 --te-component-common-button-border-color: var(--te-common-border-secondary); + --te-component-common-resizer-border-color: #1476ff;
用base变量:var(--te-base-blue-70)
tiny-engine
github_2023
others
1,219
opentiny
hexqi
@@ -4,6 +4,7 @@ class="outlinebox plugin-tree" :fixed-name="PLUGIN_NAME.OutlineTree" :fixedPanels="fixedPanels" + :draggable-enabled="true"
draggable不能体现宽度调节,建议换个名字,例如:width-resizable
tiny-engine
github_2023
others
1,219
opentiny
hexqi
@@ -5,6 +5,7 @@ :fixedPanels="fixedPanels" :docsUrl="docsUrl" :isShowDocsIcon="true" + :draggable-enabled="true"
配置应该写到插件的注册表里,可覆盖调整,不应该写死在代码里
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,37 @@ +# 简介 + +<b>低代码平台</b>是一种应用程序开发平台,允许用户以图形化方式构建应用程序,通过拖放组件、模板和可视化界面,降低了开发者和非技术用户的技能门槛。用户只需编写少量代码,便可以实现复杂的功能。这种方式不仅提高了开发速度, +随着数字化转型的加速,企业越来越多地寻求降低开发成本、提升开发效率的解决方案。 + +## 低代码引擎背景: + +随着公司的发展,各种垂直领域的低代码平台如雨后春笋般涌现。这些低代码平台在基本需求上大致一致,包括物料导入、页面编排以及属性和样式设置等功能。然而,这种高度的一致性导致了大量重复的基础建设。因此,低代码引擎应运而生,以解决这一问题。 + +## ...
_:hammer_and_wrench: Refactor suggestion_ **Add descriptive alt text to images for accessibility** Both images lack alt text which is essential for accessibility. While they have title text "创建应用", more descriptive alt text would better convey the image content to screen readers. Apply these changes: ```diff -![](....
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,192 @@ +# 区块发布方案 + +## 介绍 + +### 背景 + +区块发布,就是把区块的实时数据当前状态固定下来,并用相应逻辑将区块schema构建为前端可用的webcomponent,并且将构建结果(区块web component)和区块数据快照保存在block_histories表中的一个动作; + +为了区块webcomponent 能够快捷引用, 服务端将区块的web component 作为一个npm包发布到npm仓库, 同时设计器通过unpkg cdn的方式加载, 利用unpkg服务的版本浮动特性, 解决设计器引入高版本区块时需重新构建的问题。 + +### npm发布 + +通过注册n...
_:hammer_and_wrench: Refactor suggestion_ **Consider using environment variables for configuration** The hardcoded values in the code examples should be configurable through environment variables for better security and flexibility: ```diff - unpkgBaseUrl = 'https://npm.onmicrosoft.cn' + unpkgBaseUrl = process.env.U...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,169 @@ +# 样式设置 + +> 在页面开发过程中,为了给用户友好的体验和交互能力,提供样式自定义是不可或缺的能力。因此,我们提供了样式面板提供用户修改样式的能力 + +在高代码编辑中,我们通常有两种方式可以对组件写入样式: + +1. 行内样式,比如: + +```html +<div style="display:block; color: red; font-size: 12px; background-color: #fff;"> +</div> +``` + +2. 绑定 css 类名,然后在 css 类名中声明规则,比如: + +```vue3 +<template> + <div class...
_:warning: Potential issue_ **Fix Vue scoped styles syntax.** The `scope` attribute should be `scoped`: ```diff -<style scope> +<style scoped> ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accu...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,121 @@ +# 如何自定义出码 + +## 出码的核心过程 + +在[出码功能简介与使用](./出码功能简介与使用.md)章节中,我们知道了出码的核心是将符合TinyEngine协议规范的 schema 转换成符合语义的、高质量可读的代码。但是,工程化代码(基础项目代码)、代码风格、具体 schema to code 具体细节等等的情形可能每个团队都有不同的选择,所以也就诞生了自定义出码的需求。下面,我们针对“基于官方出码能力增加出码插件”以及“自定义插件完成 schema to code 的转换”两种情形进行介绍。 + +## 基于官方出码能力自定义出码 + +官方默认提供了 vue compositio...
_:warning: Potential issue_ **Fix syntax error and consider adding type information** The custom plugin example has the following issues: 1. Syntax error in the `run` method declaration 2. Missing return type and parameter types ```diff const customDataSourcePlugin = () => { return { name: '', descript...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,121 @@ +# 如何自定义出码 + +## 出码的核心过程 + +在[出码功能简介与使用](./出码功能简介与使用.md)章节中,我们知道了出码的核心是将符合TinyEngine协议规范的 schema 转换成符合语义的、高质量可读的代码。但是,工程化代码(基础项目代码)、代码风格、具体 schema to code 具体细节等等的情形可能每个团队都有不同的选择,所以也就诞生了自定义出码的需求。下面,我们针对“基于官方出码能力增加出码插件”以及“自定义插件完成 schema to code 的转换”两种情形进行介绍。 + +## 基于官方出码能力自定义出码 + +官方默认提供了 vue compositio...
_:bulb: Codebase verification_ **Missing image file `TinyEngineSchem2Code.png` in documentation** The verification shows that while `vuetemplate.png` exists at the correct location, `TinyEngineSchem2Code.png` is missing from the `docs/扩展能力使用教程/出码功能/imgs/` directory. - ✅ `./imgs/vuetemplate.png` exists - ❌ `./imgs/Ti...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,144 @@ +# 开发设置器组件 + +## 相关概念 + +设置器组件本质上就是一个 Vue 单文件组件。在设计器页面右侧的属性面板中,设置器组件用于设置画布中选中的组件的属性的值。你可以把属性面板看做一个大表单,每个设置器组件用于一个表单项的输入。比如下图的输入框设置器组件 + +![输入框设置器组件](./imgs/input-configurator.png) + +## 开发 + +设置器组件可以有多种形式,它们都需要遵循以下规范: + +- 是一个 vue 的单文件组件 +- 组件的 props 必须要有 `modalValue` 属性 +- 组件的 emits 必须支持 `update:mode...
_:hammer_and_wrench: Refactor suggestion_ **Add watch for modelValue prop changes** The component doesn't react to external changes to the modelValue prop. Add a watch to keep the local value in sync. ```diff const value = ref(props.modelValue) +watch(() => props.modelValue, (newVal) => { + value.value = newVal +...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,144 @@ +# 开发设置器组件 + +## 相关概念 + +设置器组件本质上就是一个 Vue 单文件组件。在设计器页面右侧的属性面板中,设置器组件用于设置画布中选中的组件的属性的值。你可以把属性面板看做一个大表单,每个设置器组件用于一个表单项的输入。比如下图的输入框设置器组件 + +![输入框设置器组件](./imgs/input-configurator.png) + +## 开发 + +设置器组件可以有多种形式,它们都需要遵循以下规范: + +- 是一个 vue 的单文件组件 +- 组件的 props 必须要有 `modalValue` 属性
_:warning: Potential issue_ **Fix typo in prop name** There's a typo in the prop name that could cause confusion: ```diff -- 组件的 props 必须要有 `modalValue` 属性 +- 组件的 props 必须要有 `modelValue` 属性 ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,157 @@ +# 快速上手 + +本篇会讲解两种上手模式:一种是使用Cli工具快速搭建本地项目进行低代码平台开发,另外一种是下载/克隆源码,直接在源码上进行开发。 + +## 一、环境准备 + +在开始上手之前,先确保我们的开发环境以及⼯具齐全: + +- Node.js v18+版本 +- pnpm 包管理⼯具 +- 前端项目代码编辑器 +- git 代码版本管理⼯具 +- chrome浏览器 110+ 版本 +- 以及其他必要的开发前端开发环境、⼯具等。 + + + +## 二、Tiny Engine CLI + + TinyEngine提供了CLI⼯具⽅便⽤户⼆次开发,通过CLI,⼀⾏命令即可基于T...
_:warning: Potential issue_ **Fix version inconsistency in GitHub link** The GitHub link points to `v1.0.0` but the text references `v2.0.0`: ```diff -前往[Tiny Engine github](https://github.com/opentiny/tiny-engine/tree/v1.0.0) 地址 +前往[Tiny Engine github](https://github.com/opentiny/tiny-engine/tree/v2.0.0) 地址 ``` <...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,157 @@ +# 快速上手 + +本篇会讲解两种上手模式:一种是使用Cli工具快速搭建本地项目进行低代码平台开发,另外一种是下载/克隆源码,直接在源码上进行开发。 + +## 一、环境准备 + +在开始上手之前,先确保我们的开发环境以及⼯具齐全: + +- Node.js v18+版本 +- pnpm 包管理⼯具 +- 前端项目代码编辑器 +- git 代码版本管理⼯具 +- chrome浏览器 110+ 版本 +- 以及其他必要的开发前端开发环境、⼯具等。 + + + +## 二、Tiny Engine CLI + + TinyEngine提供了CLI⼯具⽅便⽤户⼆次开发,通过CLI,⼀⾏命令即可基于T...
_:bulb: Codebase verification_ _:warning: Potential issue_ **Consider updating to the latest RC version instead of alpha** The CLI package `@opentiny/tiny-engine-cli` has more stable release candidate (RC) versions available. The latest version is `2.0.0-rc.3` which is more stable than the alpha versions. Consider u...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,62 @@ +# 初识设计器 + +> 本节主要简单介绍设计器界面模块 + +### 设计器界面概览
_:hammer_and_wrench: Refactor suggestion_ **Improve document structure by using correct heading levels** The document structure should follow a hierarchical heading pattern. After the h1 title, main sections should use h2 (##) instead of h3 (###). Apply this change to all section headings: ```diff # 初识设计器 -### 设计器...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,43 @@ +# 快速上手 + +为了帮助开发者迅速掌握TinyEngine并深入理解其核心特性,我们设计了一个简单的实践上手案例:“开关按钮控制图片显示与隐藏”。 +这个案例直观展示了TinyEngine在交互设计,允许用户通过一个简单的开关按钮来控制图片的显示与隐藏状态。 + +通过这个案例,开发者可以快速学习如何利用TinyEngine的低代码特性,实现界面交互逻辑。 + +### 效果图 + +![](./imgs/showImg.png) +
_:hammer_and_wrench: Refactor suggestion_ **Improve documentation structure and accessibility.** 1. The heading level jumps from h1 (`#`) to h3 (`###`). For proper document structure, use h2 (`##`) instead. 2. Add alt text to the image for accessibility. Apply these changes: ```diff -### 效果图 +## 效果图 -![](./imgs/sh...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,43 @@ +# 快速上手 + +为了帮助开发者迅速掌握TinyEngine并深入理解其核心特性,我们设计了一个简单的实践上手案例:“开关按钮控制图片显示与隐藏”。 +这个案例直观展示了TinyEngine在交互设计,允许用户通过一个简单的开关按钮来控制图片的显示与隐藏状态。 + +通过这个案例,开发者可以快速学习如何利用TinyEngine的低代码特性,实现界面交互逻辑。 + +### 效果图 + +![](./imgs/showImg.png) + +### 第一步,新建页面 + +![](./imgs/page1.png) + +### 第二步,拖入元素 + +![](./imgs/addCompon...
_:hammer_and_wrench: Refactor suggestion_ **Add alt text to step images for accessibility.** The step-by-step instructions are clear, but the images need alt text for accessibility. Apply these changes: ```diff -![](./imgs/page1.png) +![步骤1 - 新建页面的操作界面](./imgs/page1.png) -![](./imgs/addComponent.png) +![步骤2 - 拖入元素...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,201 @@ +# 直播答疑视频链接 + +- [https://www.bilibili.com/video/BV16j411e7y2/](https://www.bilibili.com/video/BV16j411e7y2/) + +# 基础功能使用类问题 + +### 问题1:如何使用第三方组件库? + +答:详情可以查看[如何在设计器中引入第三方组件库](../解决方案/设计器中引入第三方组件库.md) + +### 问题2:如何使用插槽? + +答:详情可以查看[插槽的声明与使用](../进阶功能/如何使用插槽.md) + +### 问题3:通过 TinyEngine 低代码引擎生成代码到本地时,如...
_:warning: Potential issue_ **Review sensitive information disclosure** The response about backend technology stack contains internal information about unreleased plans and specific dates. Consider generalizing this information. ```diff -答:目前服务端有两套源代码,一套技术栈是 node.js ,一套技术栈是 Java。因为要从公司流程流程审批、技术评估还有后面的迭代演进等维度考虑,目前还不知...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,201 @@ +# 直播答疑视频链接 + +- [https://www.bilibili.com/video/BV16j411e7y2/](https://www.bilibili.com/video/BV16j411e7y2/) + +# 基础功能使用类问题 + +### 问题1:如何使用第三方组件库? + +答:详情可以查看[如何在设计器中引入第三方组件库](../解决方案/设计器中引入第三方组件库.md) + +### 问题2:如何使用插槽? + +答:详情可以查看[插槽的声明与使用](../进阶功能/如何使用插槽.md) + +### 问题3:通过 TinyEngine 低代码引擎生成代码到本地时,如...
_:warning: Potential issue_ **Review AI capabilities disclosure** The response about AI capabilities contains specific details about internal systems and future plans. Consider providing a more general response. ```diff -答:AI 能力目前已经在 TinyEngine 官网部署,当前采用的大模型是文心一言,通过 AI生成代码->生成 AST->页面 schema->展示在页面->下载源代码 ,后续会切回华为的盘...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,62 @@ +# 设计器界面模块简介 + +> 本节主要简单介绍设计器界面模块 + +### 设计器界面概览
_:hammer_and_wrench: Refactor suggestion_ **Fix heading hierarchy for better document structure.** The document structure skips from h1 (`#`) to h3 (`###`). For better organization and accessibility, headings should increment by only one level at a time. Apply this diff to fix the heading hierarchy: ```diff # 设计器界面...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,9 @@ +## 如何发布区块 + +区块录入需要根据 + + [区块协议](portal-only-prefix/protocol/app) 填写 content 字段
_:warning: Potential issue_ **Fix the relative link to block protocol** The link to the block protocol uses a portal-only prefix which might not work across different environments. Please update the link to use the correct base URL or repository-relative path. <!-- This is an auto-generated comment by CodeRabbit --...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,9 @@ +## 如何发布区块 + +区块录入需要根据 + + [区块协议](portal-only-prefix/protocol/app) 填写 content 字段 + 因为区块可以简单理解为组件的组合,content 内每个属性的含义也可以参考课程 如何发布组件,在那个课程里详细介绍了每个属性的含义。 + 需要注意的是:区块录入之后,需要在设计器中发布区块之后,才能够加入物料包中使用,用户可以参考应用开发者-区块管理课程。 + 也就是说,区块录入只是替代了在设计器里新建和搭建区块的步骤。 +![](./imgs/ecology2.png)
_:warning: Potential issue_ **Add alt text to the image** The image is missing alt text, which is important for accessibility. Update the image markdown to include descriptive alt text: ```diff -![](./imgs/ecology2.png) +![Block publishing interface showing the content field and protocol settings](./imgs/ecology2.p...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,19 @@ +# 使用状态管理和变量绑定 + +state 是响应式的数据,状态管理面板对 state 的响应式变量进行系统管理,包含添加、删除、搜索、编辑 state + +- 在状态管理面板添加 state 变量。 + +![添加Sate变量](./imgs/state1.gif)
_:warning: Potential issue_ **Add alt text to all images** All three images are missing alt text, which is important for accessibility. Update the image markdown to include descriptive alt text: ```diff -![添加Sate变量](./imgs/state1.gif) +![Tutorial: Adding a new state variable through the state management panel](./im...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,16 @@ +# 关于物料资产包 + +## 什么是物料 + +物料是可视化页面搭建的原料,按照粒度可分为组件库和区块 + +1. **组件库**:组件库一般是按照组件的性质进行组织。组件是页面搭建最小的可复用单元,其只对外暴露配置项,用户无需感知其内部实现。组件库在设计器定制完成后 **不能再次添加与删除** 。 +2. **区块**:区块可以包含一个或多个组件也可以包含其他区块,带有一定的业务逻辑,能够实现更丰富的功能与表现。区块分为**消费侧**和**管理侧**,在区块管理侧,用户可以向设计器中拖入一个区块后可以编辑其内部的组件和区块配置,暴露区块的属性和事件供消费区块的时候使用,最后发布区块,消费侧区块...
_:warning: Potential issue_ **Add alt text to the image** The image is missing alt text, which is important for accessibility. Update the image markdown to include descriptive alt text: ```diff -![view-material](./imgs/materialPanel.png) +![Material panel interface showing the collection of components and blocks av...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,32 @@ +# 行内绑定状态变量 + +## 使用说明 + +设计器提供了一种功能,允许使用定义变量来动态计算组件的位置。这些计算结果随后可以直接应用到组件的行内样式style属性中,从而实现动态样式的调整和布局的优化。 + +## 操作步骤 + +1. 添加变量,例如:bgcolor,用来控制背景颜色。 + + **图 1** 添加变量 + ![](./imgs/addVar.png "addVar") + +2. 画布中选中组件,在组件属性设置面板选择“样式”。 +3. 单击行内样式的编辑框后的![](./imgs/icon-code.png)。 +4. 在弹框中进行变量绑定。 + + **...
_:warning: Potential issue_ **Fix broken image link** The image path `not-found/绑定变量.png` appears to be incorrect. Please update it to use the correct path under the `./imgs/` directory like other images in the document. <details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.35.0)</summary> 19...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,32 @@ +# 行内绑定状态变量 + +## 使用说明 + +设计器提供了一种功能,允许使用定义变量来动态计算组件的位置。这些计算结果随后可以直接应用到组件的行内样式style属性中,从而实现动态样式的调整和布局的优化。 + +## 操作步骤 + +1. 添加变量,例如:bgcolor,用来控制背景颜色。 + + **图 1** 添加变量 + ![](./imgs/addVar.png "addVar")
_:hammer_and_wrench: Refactor suggestion_ **Add alt text to images for accessibility** All images in the document lack alternative text (alt text), which is essential for accessibility. Please add descriptive alt text to each image. Example fix for the first image: ```diff -![](./imgs/addVar.png "addVar") +![Adding ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,42 @@ +## 物料同步方案 + +由于当前情况下物料无法通过页面交互维护,提供一个临时方案,由前端托管物料。 +在本地运行时提供nodejs脚本维护物料,执行脚本保证mockServer工程和前端工程物料的同步。如果启动了后端服务,还可以连接数据库,保证本地json文件和数据库的一致性。 + +![物料同步数据流转图](./imgs/synchronize-materials.png '物料同步数据流转图')
_:hammer_and_wrench: Refactor suggestion_ **Add alt text to flowchart image** The flowchart image lacks alternative text. Please add descriptive alt text for accessibility. ```diff -![物料同步数据流转图](./imgs/synchronize-materials.png '物料同步数据流转图') +![物料同步过程的数据流转示意图,展示了从本地文件到数据库的同步流程](./imgs/synchronize-materials.png '物料同步数...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,49 @@ +# 简介 + +### TinyEngine 低代码引擎
_:warning: Potential issue_ **Fix heading hierarchy to follow proper markdown structure** The document uses H3 (`###`) headings directly under H1 (`#`). Headings should only increment by one level at a time for proper document structure and accessibility. Apply this change to all section headings: ```diff # 简介 - ##...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,64 @@ +# 设计前端应用流程 + +前端应用可以由一个或多个页面组成一个完整的业务系统。在TinyEngine中,通过创建应用、(可选)创建文件夹、创建页面、页面设计和生成应用代码五步,即可快速完成前端应用设计,具体流程如图1 +所示。 + +**图 1** 创建应用 +![](./imgs/createApp.png "创建应用")
_:warning: Potential issue_ **Add alt text to images for accessibility** Images should include descriptive alt text for accessibility. The title text is present but alt text is missing. Example fix for one image: ```diff -![](./imgs/createApp.png "创建应用") +![Creating a new application in TinyEngine](./imgs/createApp....
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,64 @@ +# 设计前端应用流程 + +前端应用可以由一个或多个页面组成一个完整的业务系统。在TinyEngine中,通过创建应用、(可选)创建文件夹、创建页面、页面设计和生成应用代码五步,即可快速完成前端应用设计,具体流程如图1 +所示。 + +**图 1** 创建应用 +![](./imgs/createApp.png "创建应用") + +## 步骤一:新建文件夹 + +1. 单击应用模块内的“应用开发”,进入设计器。 +2. 在左侧插件栏中,单击![](./imgs/icon-page.png),进入“页面管理“页面。 +3. 单击“页面管理“的新增文件夹按钮。 +4. 设置基本属性,如输入文件夹I...
_:warning: Potential issue_ **Fix broken image path** The image path `not-found/添加组件.png` appears to be incorrect. Update to the correct path: ```diff -![](not-found/添加组件.png "添加组件") +![](./imgs/添加组件.png "添加组件") ``` > Committable suggestion skipped: line range outside the PR's diff. <details> <summary>🧰 Tools</s...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,72 @@ +# 使用组件 + +## 概述 + +组件是低代码开发的构建块,就像积木一样。它们是可重复使用的小部件,可以轻松搭建和管理网页。举个例子,按钮、导航栏和表单都可以是组件。这有助于您快速搭建网站。 + +下面介绍如何在低代码中使用组件,实现页面快速搭建。 + +## 从物料面板中添加组件 + +1. 在左侧插件栏中,单击![](./imgs/icon-add.png),展开物料资产包。 +2. 在物料资产包中选择组件,并拖拽至中心画布中。 + +![拖入组件](./imgs/dragComponent.gif) + +![](./imgs/addComponent-13.png "addCompon...
_:warning: Potential issue_ **Add alt text to images for accessibility** Images throughout the documentation are missing alt text, which is essential for accessibility. Add descriptive alt text to images. For example: ```diff -![](./imgs/icon-add.png) +![Material panel add icon](./imgs/icon-add.png) -![](./imgs/dr...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,79 @@ +# 国际化资源管理 + +## 使用说明 + +同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 + +> ![](public_sys-resources/icon-note.gif) **说明:** +> 注意的是国际化只针对画布中的项目,不针对设计器本身。
_:warning: Potential issue_ **Add alt text to images for accessibility** All images in the internationalization documentation are missing alt text. Add descriptive alt text to images. For example: ```diff -![](public_sys-resources/icon-note.gif) +![Note icon](public_sys-resources/icon-note.gif) -![](./imgs/icon-i1...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,79 @@ +# 国际化资源管理 + +## 使用说明 + +同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 + +> ![](public_sys-resources/icon-note.gif) **说明:** +> 注意的是国际化只针对画布中的项目,不针对设计器本身。 + +## 添加国际化词条 + +1. 在左侧插件栏中,单击![](./imgs/icon-i18n.png),展开国际化资源页面。 +2. 单击“新增词条”。 +3. 编辑key,中文和英文内容 + + > ![](public...
_:warning: Potential issue_ **Fix broken internal link reference** The link to the "复制词条键值" section is broken. ```diff -可参考[复制词条键值](#section4672122212320)获取 +可参考[复制词条键值](#复制词条键值)获取 ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,123 @@ +# 注册表 + +## 什么是注册表 + +在 新架构介绍中,我们引入了注册表的概念,二次低代码平台开发用户通过注册表配置元服务元应用,TinyEngine底层引擎读取注册表的配置,完成元应用元服务的定制,然后加载对应的元应用元服务,完成低代码平台的启动。 + +所以注册表就是完成元应用元服务注册、配置、覆盖的TinyEngine提供的底层核心功能。 + +注册表的作用: + +- 接收元应用元服务的配置,传递到低代码底层引擎,完成低代码平台的定制化。 +- 合并默认的元应用元服务的配置项以及用户的自定义配置项。 +- 提供查询能力,使得元服务与元服务之间能够相互通信,或者相关状态变量。 + +...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling for getMergeMeta calls.** The example should demonstrate proper error handling when accessing potentially undefined values returned by getMergeMeta. ```diff -const platformId = getMergeMeta('engine.config')?.platformId -const materialsPanel = getMergeMet...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,169 @@ +# 工具类方法 utils + +## 基本概念 + +在常规代码开发中,我们通常会将一些高频率用到的一些代码片段抽离出来业务代码,使其成为一个公共函数,减少重复的代码,从而达到代码复用的目的。 +同样,在低代码开发中,我们不可避免的需要编写一些高代码进行组合开发,这里同样存在存储一些公共函数以供各处调用需求。工具类方法 utils 就是诞生在这样的背景之下,我们可以将一些可复用的公共函数编写到工具类方法中,也可以将一些 npm 包引用到utils中,供后续调用。 + +**注意:utils 是应用级别的,即引入之后,即可在该应用下任意页面中进行调用** + +## 分类 + +### func...
_:warning: Potential issue_ **Fix broken image path.** The image path references a non-existent directory 'not-found'. ```diff -![添加工具类教程图](not-found/zh-cn_image_0000001994511922.png) +![添加工具类教程图](./imgs/zh-cn_image_0000001994511922.png) ``` > Committable suggestion skipped: line range outside the PR's diff. <!--...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,253 @@ +# 如何自定义出码插件 + +## 插件开发相关约定 + +为了让 CodeGenInstance 实例能够调用用户传入的自定义插件,我们需要做相关的约定: + +- 提供 run 函数,不能是箭头函数,否则无法绑定相关上下文 +- 函数名遵守 tinyEngine-generateCode-plugin-xxx 的规则 +- 提供 options 进行配置并且有默认 options + +例如: + +```javascript +// 默认配置 +const defaultOptions = {} +// 如有必要,增加参数 options,增加自定义插件的可复用性 +function cu...
_:warning: Potential issue_ **Add input validation for schema parameter** The `run` function receives a schema parameter but doesn't validate its structure. This could lead to runtime errors if an invalid schema is provided. Add schema validation before processing: ```diff run(schema, context) { + if (!schema || t...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,347 @@ +# 插件开发 + +## 插件相关概念 + +在设计器中,插件的范围包括顶部工具栏、左侧插件栏。 +![插件示意图](./imgs/plugin1.png) + +官方实现了很多插件,但是可能无法满足部分人的需求,所以,我们提供插件定制功能,通过插件定制和使用我们提供的能力,可以满足绝大部分人的需求。 + +插件提供的能力: + +- 获取 schema 或操作 schema +- 通过画布暴露的逻辑与画布交互 +- 通过插件面板实现其他自定义逻辑 + +## 插件从开发到上线使用的完整流程 + +- 开发插件 +- 联调 +- 发布插件 +- 在生态中心中录入插件(左侧插件则到插件生态中录入,...
_:warning: Potential issue_ **Add type checking for generateNode function** The `generateNode` function is called without type checking or error handling. Add type checking and error handling: ```diff <template> - <canvas-drag-item :data="generateNode({ component: 'snippetName' })"> + <canvas-drag-item + :dat...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,393 @@ +# 区块局域网发布方案 + +在TinyEngine开源后,对私有化部署存在诉求的用户越来越多,而当前TinyEngine多项内容都依托在公网中,当前官网提供的[区块发布方案](./区块发布方案.md),为公网环境下的发布,不能完全满足部分用户的需求。因此需要提供用户能够在内网环境下,也能够正常使用TinyEngine全部功能的方案。 + +现在提出区块发布私有化的两种解决方案给用户自行选择: + +- 公司内部搭建unpkg(npm cdn)和私仓环境,将区块发布到npm私仓中; +- 将区块发布到数据库中,从库中直接读取区块产物。 + +**我们推荐使用第一种方式**,因为采用私仓的方式能尽...
_:warning: Potential issue_ **Add file size limit check** The file content storage lacks size limits, which could lead to database performance issues. Add size limit validation: ```diff this.replaceFile({ ...item, + // Add size limit check + fileContent: formattedCode.length > MAX_FILE_SIZE + ? throw new ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,393 @@ +# 区块局域网发布方案 + +在TinyEngine开源后,对私有化部署存在诉求的用户越来越多,而当前TinyEngine多项内容都依托在公网中,当前官网提供的[区块发布方案](./区块发布方案.md),为公网环境下的发布,不能完全满足部分用户的需求。因此需要提供用户能够在内网环境下,也能够正常使用TinyEngine全部功能的方案。 + +现在提出区块发布私有化的两种解决方案给用户自行选择: + +- 公司内部搭建unpkg(npm cdn)和私仓环境,将区块发布到npm私仓中; +- 将区块发布到数据库中,从库中直接读取区块产物。 + +**我们推荐使用第一种方式**,因为采用私仓的方式能尽...
_:warning: Potential issue_ **Add input sanitization and rate limiting to file content API** The file content API lacks input validation and rate limiting, which could lead to security vulnerabilities. Implement security measures: ```diff async readFileContentLink() { + // Add rate limiting + const ip = this.ctx....
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,393 @@ +# 区块局域网发布方案 + +在TinyEngine开源后,对私有化部署存在诉求的用户越来越多,而当前TinyEngine多项内容都依托在公网中,当前官网提供的[区块发布方案](./区块发布方案.md),为公网环境下的发布,不能完全满足部分用户的需求。因此需要提供用户能够在内网环境下,也能够正常使用TinyEngine全部功能的方案。 + +现在提出区块发布私有化的两种解决方案给用户自行选择: + +- 公司内部搭建unpkg(npm cdn)和私仓环境,将区块发布到npm私仓中; +- 将区块发布到数据库中,从库中直接读取区块产物。 + +**我们推荐使用第一种方式**,因为采用私仓的方式能尽...
_:hammer_and_wrench: Refactor suggestion_ **Improve database schema security** The current schema lacks important security features. Add additional security fields: ```diff | id |int(10) |自增id | file_name |varchar(255) |文件名 | package_name |varchar(255) |包名 | file_content |longtext ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,49 @@ +# AI功能接口 + +## AI生成简单页面 + +<a id=AI生成简单页面> </a> + +### 基本信息 + +**Path:** /app-center/api/ai/chat + +**Method:** POST + +**接口描述:** + +<p>异常响应实例</p> +<p><span class="colour" style="color:rgb(0, 0, 0)">{ "data":</span><span class="colour" style="color:rgb(0, 128, 128)"><span class="colour" style="color:r...
_:hammer_and_wrench: Refactor suggestion_ **Consider adding security considerations and authentication requirements.** The API documentation would benefit from: - Authentication requirements - Rate limiting information - API key or token usage examples <details> <summary>🧰 Tools</summary> <details> <summary>🪛 Mar...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,160 @@ +# 应用工具类管理 + +## 修改工具类 + +<a id=修改工具类> </a> + +### 基本信息 + +**Path:** /app-center/api/apps/extension/update + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appl...
_:warning: Potential issue_ **Fix inconsistency in app parameter type.** The `app` parameter type is inconsistent: - In create request: `number` - In update request: `string` Standardize the type across all endpoints. <details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.35.0)</summary> 69-69...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,160 @@ +# 应用工具类管理 + +## 修改工具类 + +<a id=修改工具类> </a> + +### 基本信息 + +**Path:** /app-center/api/apps/extension/update + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appl...
_:hammer_and_wrench: Refactor suggestion_ **Add pagination information for list endpoint.** The list endpoint documentation should include: - Pagination parameters - Sort/filter options - Response format for paginated results <details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.35.0)</summary...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,9 @@ +# 查看大纲树 + +1. 在左侧导航栏中,选择“前端开发平台 \> 前端应用“。 +2. 单击应用模块内的“应用开发”,进入设计器。 +3. 在左侧插件栏中,单击![](./imgs/icon-tree.png),展开并查看页面大纲树。 + + **图 1** 设置主页 + ![](not-found/setIndex-20.png "设置主页-20")
_:warning: Potential issue_ **Fix broken image reference** The image path `not-found/setIndex-20.png` appears to be incorrect, resulting in a broken image link. Please verify and update the correct path to the image file. The image should be located in the same directory as the documentation or in a proper assets di...
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,20 @@ +# 关于设计器 + +## 如何定制物料资产包、主题、DSL、工具栏和插件栏 + +设计器创建完成后会自动打开编辑页面,用户可以在这里定制设计器的*物料资产包*、*主题*、*工具*、*插件*和*DSL*,如下图: + +1. **定制物料资产包:** 物料资产包 **必选且唯一** , **不允许删除** 物料资产包,可以添加其他物料资产包来替换当前的。 +![define-material]( ./imgs/defineMaterial.png) + +1. **定制主题:** 主题 **必选且唯一** ,**不允许删除** 主题,可以添加其他主题来替换当前的 +![define-theme...
序号有问题,全都是1
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,10 @@ +# 创建物料资产包 + +## 如何创建物料资产包 + +用户可以在生态中心创建物料资产包,*新建物料资产包* &rarr; *填写必要的字段* &rarr; *保存。*
![image](https://github.com/user-attachments/assets/61129379-63a9-48ed-a392-3392f4b3239f) →符号是可以直接在文本中输入的,比`&rarr;`可读性更好
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,13 @@ +# 关于应用 + +## 如何创建应用 +设计器定制完成后,用户可以在 [我的设计器](portal-only-prefix/my-platform) 中创建应用。选择对应的设计器,在设计器右下方点击“创建应用”。
portal-only-prefix这个前缀有用到吗
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,9 @@ +# 查看大纲树 + +1. 在左侧导航栏中,选择“前端开发平台 \> 前端应用“。 +2. 单击应用模块内的“应用开发”,进入设计器。
1、2看起来都过期了,可以删除了
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,79 @@ +# 国际化资源管理 + +## 使用说明 + +同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 + +> ![](public_sys-resources/icon-note.gif) **说明:**
图片路径不对
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,79 @@ +# 国际化资源管理 + +## 使用说明 + +同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 + +> ![](public_sys-resources/icon-note.gif) **说明:** +> 注意的是国际化只针对画布中的项目,不针对设计器本身。 + +## 添加国际化词条 + +1. 在左侧插件栏中,单击![](./imgs/icon-i18n.png),展开国际化资源页面。 +2. 单击“新增词条”。 +3. 编辑key,中文和英文内容 + + > ![](public...
同上,路径下没有这个gif
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,64 @@ +# 设计前端应用流程 + +前端应用可以由一个或多个页面组成一个完整的业务系统。在TinyEngine中,通过创建应用、(可选)创建文件夹、创建页面、页面设计和生成应用代码五步,即可快速完成前端应用设计,具体流程如图1 +所示。
“所示”两个字不需要专门换一行
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,169 @@ +# 样式设置 + +> 在页面开发过程中,为了给用户友好的体验和交互能力,提供样式自定义是不可或缺的能力。因此,我们提供了样式面板提供用户修改样式的能力 + +在高代码编辑中,我们通常有两种方式可以对组件写入样式: + +1. 行内样式,比如: + +```html +<div style="display:block; color: red; font-size: 12px; background-color: #fff;"> +</div> +``` + +2. 绑定 css 类名,然后在 css 类名中声明规则,比如: + +```vue3
markdown中用语言用vue3应该是没有效果的,这类包含template的建议用html或者vue,html通用性一般更好
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,192 @@ +# 区块发布方案 + +## 介绍 + +### 背景 + +区块发布,就是把区块的实时数据当前状态固定下来,并用相应逻辑将区块schema构建为前端可用的webcomponent,并且将构建结果(区块web component)和区块数据快照保存在block_histories表中的一个动作; + +为了区块webcomponent 能够快捷引用, 服务端将区块的web component 作为一个npm包发布到npm仓库, 同时设计器通过unpkg cdn的方式加载, 利用unpkg服务的版本浮动特性, 解决设计器引入高版本区块时需重新构建的问题。 + +### npm发布 + +通过注册n...
好几处微软写成了“渺软”,要改下
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,192 @@ +# 区块发布方案 + +## 介绍 + +### 背景 + +区块发布,就是把区块的实时数据当前状态固定下来,并用相应逻辑将区块schema构建为前端可用的webcomponent,并且将构建结果(区块web component)和区块数据快照保存在block_histories表中的一个动作; + +为了区块webcomponent 能够快捷引用, 服务端将区块的web component 作为一个npm包发布到npm仓库, 同时设计器通过unpkg cdn的方式加载, 利用unpkg服务的版本浮动特性, 解决设计器引入高版本区块时需重新构建的问题。 + +### npm发布 + +通过注册n...
接口地址url可以加上`号
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,47 @@ +# 循环渲染 + +页面可能有若干份重复的、动态生成的内容,例如商品列表页、表格数据。这时候需要用到循环渲染。您可以在高级面板中指定循环数据绑定的变量、迭代的变量名、索引变量名、以及唯一的key。 + +1. 拖拽组件至画布,例如拖拽一个“段落“组件。 +2. 添加变量,例如loop.isLogin。 + + **图 1** 添加变量 + + ![](./imgs/addVar-17.png "addVar-17") + +3. 选中组件,在组件属性设置面板选择“高级”。 +4. 单击“循环数据“后的![](figures/icon-code.png),进行变量绑定。 +5. 选择绑定的...
模板代码要格式化下,并添加语言```html
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,347 @@ +# 插件开发 + +## 插件相关概念 + +在设计器中,插件的范围包括顶部工具栏、左侧插件栏。 +![插件示意图](./imgs/plugin1.png) + +官方实现了很多插件,但是可能无法满足部分人的需求,所以,我们提供插件定制功能,通过插件定制和使用我们提供的能力,可以满足绝大部分人的需求。 + +插件提供的能力: + +- 获取 schema 或操作 schema +- 通过画布暴露的逻辑与画布交互 +- 通过插件面板实现其他自定义逻辑 + +## 插件从开发到上线使用的完整流程 + +- 开发插件 +- 联调 +- 发布插件 +- 在生态中心中录入插件(左侧插件则到插件生态中录入,...
末尾要加两个空格或者一个换行,不然文字和图片会渲染到同一行 ![image](https://github.com/user-attachments/assets/1551e333-0cbe-4515-9526-cc9be67e1b8b)
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,347 @@ +# 插件开发 + +## 插件相关概念 + +在设计器中,插件的范围包括顶部工具栏、左侧插件栏。 +![插件示意图](./imgs/plugin1.png) + +官方实现了很多插件,但是可能无法满足部分人的需求,所以,我们提供插件定制功能,通过插件定制和使用我们提供的能力,可以满足绝大部分人的需求。 + +插件提供的能力: + +- 获取 schema 或操作 schema +- 通过画布暴露的逻辑与画布交互 +- 通过插件面板实现其他自定义逻辑 + +## 插件从开发到上线使用的完整流程 + +- 开发插件 +- 联调 +- 发布插件 +- 在生态中心中录入插件(左侧插件则到插件生态中录入,...
缩进的空格可以去掉
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,347 @@ +# 插件开发 + +## 插件相关概念 + +在设计器中,插件的范围包括顶部工具栏、左侧插件栏。 +![插件示意图](./imgs/plugin1.png) + +官方实现了很多插件,但是可能无法满足部分人的需求,所以,我们提供插件定制功能,通过插件定制和使用我们提供的能力,可以满足绝大部分人的需求。 + +插件提供的能力: + +- 获取 schema 或操作 schema +- 通过画布暴露的逻辑与画布交互 +- 通过插件面板实现其他自定义逻辑 + +## 插件从开发到上线使用的完整流程 + +- 开发插件 +- 联调 +- 发布插件 +- 在生态中心中录入插件(左侧插件则到插件生态中录入,...
缩进不对,与下面的没有对齐
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,9 @@ +## 如何发布区块 + +区块录入需要根据 + + [区块协议](portal-only-prefix/protocol/app) 填写 content 字段 + 因为区块可以简单理解为组件的组合,content 内每个属性的含义也可以参考课程 如何发布组件,在那个课程里详细介绍了每个属性的含义。
这一段的缩进和换行都不太对
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,171 @@ +# 区块分类 + +## 修改区块分类 + +<a id=修改区块分类> </a>
这行是用来当锚点的吗?如果没有用到可以删掉
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,171 @@ +# 区块分类 + +## 修改区块分类 + +<a id=修改区块分类> </a> + +### 基本信息 + +**Path:** /material-center/api/block-categories/:id + +**Method:** PUT + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | ap...
这段html可以转成markdown语法的表格,html的不好维护
tiny-engine
github_2023
others
917
opentiny
hexqi
@@ -0,0 +1,104 @@ +# 目录 + +## 使用指南 + +- 新手指引 + - [简介](./新手指引/简介.md) + - [快速上手](./新手指引/快速上手.md) +- 基础功能 + - [初识设计器](./基础功能/初识设计器.md) + - [设计前端应用流程](./基础功能/设计前端应用流程.md) + - [设计器界面模块简介](./基础功能/设计器界面模块简介.md) + - [页面管理](./基础功能/页面管理.md) + - [使用组件](./基础功能/使用组件.md) + - [样式设置](./基础功能/样式设置.md) + - [使用状态管理和变量绑定](./基础功能/使...
网站文档挪到后面吧,跟平台开发指南调换一下顺序
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,157 @@ +# 快速上手 + +本篇会讲解两种上手模式:一种是使用Cli工具快速搭建本地项目进行低代码平台开发,另外一种是下载/克隆源码,直接在源码上进行开发。 + +## 一、环境准备 + +在开始上手之前,先确保我们的开发环境以及⼯具齐全: + +- Node.js v18+版本 +- pnpm 包管理⼯具 +- 前端项目代码编辑器 +- git 代码版本管理⼯具 +- chrome浏览器 110+ 版本 +- 以及其他必要的开发前端开发环境、⼯具等。 + + + +## 二、Tiny Engine CLI + + TinyEngine提供了CLI⼯具⽅便⽤户⼆次开发,通过CLI,⼀⾏命令即可基于T...
_:bulb: Codebase verification_ **Update CLI version to latest 2.0.0-rc.4** The documentation currently uses version `2.0.0` but the latest available version is `2.0.0-rc.4`. Since the stable 2.0.0 version is not yet released, we should update the documentation to use the latest RC version to ensure users get the most...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,160 @@ +# 应用工具类管理 + +## 修改工具类 + +<a id=修改工具类> </a> + +### 基本信息 + +**Path:** /app-center/api/apps/extension/update + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appl...
_:hammer_and_wrench: Refactor suggestion_ **Use appropriate HTTP method for delete operation** The delete endpoint uses GET method which is not RESTful. DELETE operations should use the HTTP DELETE method. ```diff -**Method:** GET +**Method:** DELETE ``` <!-- suggestion_start --> <details> <summary>📝 Committable...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,117 @@ +## PDM 元数据审批电子流 + +<br> + +审批流业务场景是现代企业运营中不可或缺的一环。业务流程从某个特定点开始,然后经过一系列的审批节点,完成流程的审批。这些节点通常由不同级别的人员担任,例如主管、经理、财务、法务和总经理等,每个人都扮演着特定的角色和职责。 +</br> +</br>
_:hammer_and_wrench: Refactor suggestion_ **Replace HTML tags with Markdown syntax** The document mixes HTML tags (`<br>`, `</br>`) with Markdown. For better maintainability and consistency, use Markdown's native line breaks (two spaces or blank lines). ```diff -<br> -</br> -</br> + + ``` Also applies to: 15-19 ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,117 @@ +## PDM 元数据审批电子流 + +<br> + +审批流业务场景是现代企业运营中不可或缺的一环。业务流程从某个特定点开始,然后经过一系列的审批节点,完成流程的审批。这些节点通常由不同级别的人员担任,例如主管、经理、财务、法务和总经理等,每个人都扮演着特定的角色和职责。 +</br> +</br> +假设场景如下:流程发起人 A 启动了一个电子审批流程。这个流程首先会被传递到主管进行审批。在审批过程中,主管会仔细检查初始业务流程信息和其他相关数据,然后决定是否进一步推进流程,或退回给 A 进行修订。如果主管批准了这个流程,那么它将被移交给下一级审批人,也就是经理。在经理的审批环节,他/她也会...
_:warning: Potential issue_ **Add descriptive alt text to images** Images are missing alt text, which is essential for accessibility and SEO. Add descriptive alt text that explains what the images represent. ```diff -<img src="./imgs/process.png" style="width:60%;"> +<img src="./imgs/process.png" alt="PDM metadata a...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,117 @@ +## PDM 元数据审批电子流 + +<br> + +审批流业务场景是现代企业运营中不可或缺的一环。业务流程从某个特定点开始,然后经过一系列的审批节点,完成流程的审批。这些节点通常由不同级别的人员担任,例如主管、经理、财务、法务和总经理等,每个人都扮演着特定的角色和职责。 +</br> +</br> +假设场景如下:流程发起人 A 启动了一个电子审批流程。这个流程首先会被传递到主管进行审批。在审批过程中,主管会仔细检查初始业务流程信息和其他相关数据,然后决定是否进一步推进流程,或退回给 A 进行修订。如果主管批准了这个流程,那么它将被移交给下一级审批人,也就是经理。在经理的审批环节,他/她也会...
_:hammer_and_wrench: Refactor suggestion_ **Expand on deployment details** The fourth step lacks specific details about the deployment process. Consider adding: 1. How the schema is converted to source code 2. Build process steps 3. Deployment requirements and considerations Would you like me to help draft a more de...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,48 @@ + +## 前言 + +SMB项目立项之初即采取TinyEngine设计器进行开发以及项目管理,其中很多区块以及页面都是在设计器上开发完成的,在积累使用设计器进行应用开发经验的同时也帮助不断完善设计器。下面主要介绍下SMB项目中如何使用设计器进行应用开发。 + +## 基于TinyEngine设计器开发的SMB项目 + +在使用TinyEngine设计器开发SMB项目初期,主要是先了解设计器所具备的能力,重点关注点在组件、区块、页面三个模块。 +这里以SMB项目中的首页举例,首先看下SMB项目中使用设计器搭建的首页部分内容 + +![Alt text](./imgs/smbHome.png) + +...
_:hammer_and_wrench: Refactor suggestion_ **Replace HTML line break with Markdown syntax** Replace the HTML `<br/>` tag with Markdown's double newline for consistency with Markdown formatting. ```diff -<br/> + ``` <!-- This is an auto-generated comment by CodeRabbit -->
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,63 @@ +# 设计前端应用流程 + +前端应用可以由一个或多个页面组成一个完整的业务系统。在TinyEngine中,通过创建应用、(可选)创建文件夹、创建页面、页面设计和生成应用代码五步,即可快速完成前端应用设计,具体流程如图1所示。 + +**图 1** 创建应用 +![创建应用](./imgs/createApp.png) + +## 步骤一:新建文件夹 + +1. 单击应用模块内的“应用开发”,进入设计器。 +2. 在左侧插件栏中,单击![页面管理插件图标](./imgs/icon-page.png),进入“页面管理“页面。 +3. 单击“页面管理“的新增文件夹按钮。 +4. 设置基本属性,如输入文...
_:warning: Potential issue_ **Fix broken image reference** The image path `not-found/添加组件.png` appears to be invalid. This matches the PR objectives which mention missing images linked to `not-found`. Please update the image reference to use the correct path, similar to other images in the document (e.g., `./imgs/`)...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,63 @@ +# 设计前端应用流程 + +前端应用可以由一个或多个页面组成一个完整的业务系统。在TinyEngine中,通过创建应用、(可选)创建文件夹、创建页面、页面设计和生成应用代码五步,即可快速完成前端应用设计,具体流程如图1所示。 + +**图 1** 创建应用 +![创建应用](./imgs/createApp.png) + +## 步骤一:新建文件夹 + +1. 单击应用模块内的“应用开发”,进入设计器。 +2. 在左侧插件栏中,单击![页面管理插件图标](./imgs/icon-page.png),进入“页面管理“页面。 +3. 单击“页面管理“的新增文件夹按钮。 +4. 设置基本属性,如输入文...
_:bulb: Codebase verification_ **Missing image for component addition step** The verification revealed that all referenced images exist in the repository except for one: - `not-found/添加组件.png` (Figure 5) is missing, which is needed for illustrating the component addition step <details> <summary>🔗 Analysis chain</...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,79 @@ +# 国际化资源管理 + +## 使用说明 + +同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 + +> ![](public_sys-resources/icon-note.gif) **说明:** +> 注意的是国际化只针对画布中的项目,不针对设计器本身。 + +## 添加国际化词条 + +1. 在左侧插件栏中,单击![国际化插件图标](./imgs/icon-i18n.png),展开国际化资源页面。
_:bulb: Codebase verification_ **Missing image: icon-note.gif** The verification shows that all referenced images in `./imgs/` directory exist, but `icon-note.gif` is missing from the `public_sys-resources/` directory. Here's what needs attention: - The image `public_sys-resources/icon-note.gif` is referenced but no...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,49 @@ +# AI功能接口 + +## AI生成简单页面 + +<a id=AI生成简单页面> </a> + +### 基本信息 + +**Path:** /app-center/api/ai/chat + +**Method:** POST + +**接口描述:** + +<p>异常响应实例</p> +<p><span class="colour" style="color:rgb(0, 0, 0)">{ "data":</span><span class="colour" style="color:rgb(0, 128, 128)"><span class="colour" style="color:r...
_:hammer_and_wrench: Refactor suggestion_ **Convert HTML tables to Markdown format** Consider converting HTML tables to Markdown format for better consistency and maintainability. This aligns with the PR objectives mentioning the need to convert HTML tables to native Markdown tables. Example conversion: ```markdown ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,117 @@ + +# app-service + +## 传入schema生成代码 + +<a id=传入schema生成代码> </a> + +### 基本信息 + +**Path:** /api/schema2code + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appli...
_:hammer_and_wrench: Refactor suggestion_ **Convert HTML tables to Markdown format** As mentioned in the PR objectives, HTML tables should be converted to native Markdown tables for better maintainability and consistency. Here's an example of how to convert the first table to Markdown format: ```diff -<table> - <t...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,117 @@ + +# app-service + +## 传入schema生成代码 + +<a id=传入schema生成代码> </a> + +### 基本信息 + +**Path:** /api/schema2code + +**Method:** POST + +**接口描述:**
_:hammer_and_wrench: Refactor suggestion_ **Enhance API documentation with critical details** The API documentation should include the following essential information for each endpoint: - Authentication requirements - Possible response status codes and their meanings - Error response format and examples - Rate limiti...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,103 @@ +# 页面JS +> 1 在常规代码开发中,我们需要为某个区块或者某个元素添加一些事件,比如点击事件,同一个页面或者区块的事件会统一保存到对应的页面JS中 +> 2 很多时候我们需要自定义一些方法去复用一些逻辑,也需要用到页面js +> 3 需要注意的是当前的页面js只能使用声明函数,不能使用函数表达式声明函数,也不能在页面js中定义其他的变量 +> 4 页面js中可以通过 **this** 访问当前页面的 **state**,全局的 **stores**, 以及**t**函数(获取国际化词条) + +## 页面JS基本使用与管理 +下面将通过两个示例分别展示如何使用 +### 为图片添加点击...
_:warning: Potential issue_ **Fix broken image references** Several image references appear to be broken or missing: - `./imgs/pageJs.png` - `./imgs/pageJsContent.png` - `./imgs/pageJsMethod.png` - `./imgs/pageJsJsxFunc.png` - `./imgs/parseJxBindingJsxFunc.png` - `./imgs/parseJxBindingJsxFuncResult.png` Please ensu...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,129 @@ +# 区块管理 + +> 区块的概念类似于前端开发中的 Component,我们可以将很多页面中都一样的结构(比如 Header),构建到区块中,发布之后直接在页面中拖入使用,提高开发效率 + +## 区块相关概念 + +假设我们有如下前端工程: + +```bash +- project + - components + |_ Header.vue + - Footer.vue + - Container.vue + - views + |_ Index.vue + - Page2.vue + - TodoFolder + |_ Todo....
_:warning: Potential issue_ **Fix broken image references** Several image references appear to be broken or missing: - `./imgs/createEmptyBlock.png` - `./imgs/createBlockFromPage.gif` - `./imgs/blockBaseSetting.png` - `./imgs/blockExposeAttr.gif` - `./imgs/blockexposeattrusage.gif` Please ensure all referenced imag...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,6 @@ +# 构建自定义设计器 + +## 什么是定制扩展能力 + +什么是扩展能力呢,一方面我们可以快速拥有一个官方标准的设计器,另外一方面如果用户有独特的业务功能需要,我们可以不用看它的源码、不用关心其实现,用户可以使用 API、插件等方式快速开发自己的工具,插件,DSL等的npm包,用于构建用户自定义的设计器。而设计器引擎对于设计器的扩展能力支持基本上覆盖了设计器的所有功能点。 +![expend]( ./imgs/platformExpend.png)
_:bulb: Codebase verification_ _:hammer_and_wrench: Refactor suggestion_ **Image exists but alt text needs improvement** The image `platformExpend.png` exists at the specified location, but the alt text "expend" is not descriptive enough for accessibility purposes. - Update the alt text to be more descriptive, such...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,37 @@ +# 简介 + +<b>低代码平台</b>是一种应用程序开发平台,允许用户以图形化方式构建应用程序,通过拖放组件、模板和可视化界面,降低了开发者和非技术用户的技能门槛。用户只需编写少量代码,便可以实现复杂的功能。这种方式不仅提高了开发速度, +随着数字化转型的加速,企业越来越多地寻求降低开发成本、提升开发效率的解决方案。 + +## 低代码引擎背景: + +随着公司的发展,各种垂直领域的低代码平台如雨后春笋般涌现。这些低代码平台在基本需求上大致一致,包括物料导入、页面编排以及属性和样式设置等功能。然而,这种高度的一致性导致了大量重复的基础建设。因此,低代码引擎应运而生,以解决这一问题。 + +## ...
_:hammer_and_wrench: Refactor suggestion_ **Enhance feature list formatting and content.** 1. Use proper Markdown ordered list syntax 2. Fix the grammatical issue in line 23 ("强大的" instead of "强大") 3. Add more details to support the AI development claim ```diff -1. 可以定制开发低码平台: TinyEngine 提供了一套完善的插件体系,涵盖了插件开发所需的基础 UI...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,21 @@ +# 数据源Mock数据 + +目前数据源在编辑态时只能使用Mock数据,所以我们可能需要给数据源添加Mock数据 + +## 操作步骤 + +- 打开数据源面板,选中数据源 +- 点击新增数据,添加数据并保存 +![新增数据](./imgs/dataSource5.png) + +## 使用数据源Mock数据 + +- 拖动一个Collection组件到画布中,在Collection组件属性面板上选择数据源 +- 拖动格组件到Collection中,表格组件将自动生成数据源中的字段 +![使用数据源Mock数据](not-found/dataSource6.png)
_:warning: Potential issue_ **Fix broken image reference** The image reference `not-found/dataSource6.png` appears to be incorrect. This matches the PR objectives which mentioned issues with `not-found` image links. Update the image path to match the pattern used by other images: ```diff -![使用数据源Mock数据](not-found/da...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,27 @@ +# 数据源获取远程字段 + +我们可以通过已有的远程Http接口,快速地生成数据源的字段 + +## 操作步骤 + +- 打开数据源面板,新建数据源。点击获取远程数据 +- 设置请求地址、请求方式、请求参数、请求结果回调 +![数据源设置](./imgs/dataSource1.png) +- 请求成功后获取到接口字段信息,填写字段名后,保存后即可生成数据源字段信息 +![请求结果](./imgs/dataSource2.png) +![字段配置](./imgs/dataSource3.png) +![保存数据源](./imgs/dataSource4.png) + + +## 请求完成回调函数示...
_:hammer_and_wrench: Refactor suggestion_ **Improve code example formatting and error handling** The callback function example could be improved with: - Consistent indentation - Error handling - Type documentation Consider updating the example: ```diff -function dataHandler(data) { - return data.map(v => { - ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,30 @@ +# 条件渲染 + +在页面开发中,可能需要根据某些条件来动态显示或隐藏页面中的内容,例如:如果您希望当用户已经登录的时候,显示“欢迎登录“的文字,未登录的时候,显示“请登录“的文字。 + +1. 拖拽组件至画布,分别输入希望展示的文字。 +2. 添加变量,例如state.isLogin + + **图 1** 添加变量 + + ![addvar-15](./imgs/addvar-15.png) + +3. 选中组件,在组件属性设置面板选择“高级”。 +4. 单击“是否渲染“后的 ![变量绑定图标](./imgs/icon-code.png),进行变量绑定。 + + **图 2** ...
_:warning: Potential issue_ **Fix typo in "ture"** There's a typo in the word "ture" which should be "true". This appears both in the text and image filename. ```diff - **图 4** state.isLogin为ture时 - ![state-isLogin为ture时.png](./imgs/state-isLogin为ture时.png) + **图 4** state.isLogin为true时 + ![state-isLogin为t...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,47 @@ +# 循环渲染 + +页面可能有若干份重复的、动态生成的内容,例如商品列表页、表格数据。这时候需要用到循环渲染。您可以在高级面板中指定循环数据绑定的变量、迭代的变量名、索引变量名、以及唯一的key。 + +1. 拖拽组件至画布,例如拖拽一个“段落“组件。 +2. 添加变量,例如loop.isLogin。 + + **图 1** 添加变量 + + ![addVar-17](./imgs/addVar-17.png) + +3. 选中组件,在组件属性设置面板选择“高级”。 +4. 单击“循环数据“后的![](figures/icon-code.png),进行变量绑定。 +5. 选择绑定的变量,...
_:warning: Potential issue_ **Standardize image path format** The document uses inconsistent image path formats. Line 14 uses `figures/icon-code.png` while other images use `./imgs/`. ```diff -单击"循环数据"后的![](figures/icon-code.png),进行变量绑定。 +单击"循环数据"后的![绑定变量图标](./imgs/icon-code.png),进行变量绑定。 ``` <!-- suggestion_start ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,69 @@ +# 高级面板设置 + +> 选中组件之后,我们可以在高级面板对组件进行事件的绑定、以及循环渲染、条件渲染等高级设置 + +## 条件渲染 + +在页面开发中,我们可能需要根据某些条件来动态显示或隐藏页面中的内容,举个例子:我们希望当用户已经登录的时候,显示欢迎登录的文字,未登录的时候,显示请登录的文字。 +那么,我们可以在组件上面绑定条件渲染,点击绑定变量,选择变量 state.isLogin,那么,我们的组件就会根据变量 state.isLogin 的真假值来进行渲染。 + +![条件渲染示例](./imgs/conditionRender.gif) + +## 循环渲染 + +我们的页面可能有...
_:bulb: Codebase verification_ **Missing GIF resources need to be added to the documentation** The verification confirms that all referenced GIF images in the documentation are missing: - `imgs/conditionRender.gif` - `imgs/useLoop.gif` - `imgs/bindEvent.gif` Please add these GIF resources to the `imgs` directory to ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,127 @@ +## 数据源 + +### 前言 +设计器提供数据源来配合画布上的组件/区块渲染,数据源的配置既可以采取在设计器中静态配置的方式,也可以采取远程 API 请求 JSON 数据动态获取的方式。 + +> 目前**数据源**可便捷地应用于表格组件的表格列,也可灵活地应用于手动调用指定的远程 API。 + +### 创建数据源 + +创建数据源步骤: + +1. 选择左边操作栏 - 数据源 +2. 点击左上操作区 - 新建数据源 + + ![Alt text](./imgs/data-source-2.png) +3. 配置数据源类型(可选对象数组、树结构),配置数据源名称以及数据源字段 +4....
_:warning: Potential issue_ **Fix broken image reference** The image reference `not-found/dataSource6.png` appears to be invalid. Please ensure the image file exists in the correct location and update the path accordingly. <!-- This is an auto-generated comment by CodeRabbit -->
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,11 @@ +# 关于应用 + +## 如何去开发应用 + +应用创建完成后,即可在 **我的应用** 中看到这个应用,点击 **开发应用** 即可前往可视化设计器进行可视化地搭建该应用下的 *页面* 和 *区块*。 + +![view-app1]( ./imgs/appDevOne.png) + +**可视化设计器** +
_:hammer_and_wrench: Refactor suggestion_ **Use proper markdown heading syntax instead of bold text.** Replace the bold text with a proper markdown heading: ```diff -**可视化设计器** +### 可视化设计器 ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review t...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,104 @@ +# DSL代码生成 + +## generateCode + +<a id=generateCode> </a> + +### 基本信息 + +**Path:** /generateCode + +**Method:** GET + +**接口描述:** + +<p>作为npm包使用generateCode方法生成代码示例:</p> +<pre><code data-language="js" class="lang-js">const path = require('path') +const fs = require('fs') +const { generateCode } = requi...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling to the file writing example.** The file writing example should include try-catch block to handle potential errors. ```diff -result.forEach((item) => fs.writeFileSync(`dist/${item.filePath}/${item.panelName}`, item.panelValue)) +result.forEach((item) => {...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,253 @@ +# 如何自定义出码插件 + +## 插件开发相关约定 + +为了让 CodeGenInstance 实例能够调用用户传入的自定义插件,我们需要做相关的约定: + +- 提供 run 函数,不能是箭头函数,否则无法绑定相关上下文 +- 函数名遵守 tinyEngine-generateCode-plugin-xxx 的规则 +- 提供 options 进行配置并且有默认 options + +例如: + +```javascript +// 默认配置 +const defaultOptions = {} +// 如有必要,增加参数 options,增加自定义插件的可复用性 +function cu...
_:warning: Potential issue_ **Fix undefined variable reference.** The `options` variable is used but not defined. ```diff +const defaultOptions = { + customPlugin: [] +} -const mergedOption = options +const mergedOption = { ...defaultOptions, ...options } ``` <!-- suggestion_start --> <details> <summary>📝 Commi...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,253 @@ +# 如何自定义出码插件 + +## 插件开发相关约定 + +为了让 CodeGenInstance 实例能够调用用户传入的自定义插件,我们需要做相关的约定: + +- 提供 run 函数,不能是箭头函数,否则无法绑定相关上下文 +- 函数名遵守 tinyEngine-generateCode-plugin-xxx 的规则 +- 提供 options 进行配置并且有默认 options + +例如: + +```javascript +// 默认配置 +const defaultOptions = {} +// 如有必要,增加参数 options,增加自定义插件的可复用性 +function cu...
_:warning: Potential issue_ **Add safeguard against potential infinite loop.** The while loop checking parent IDs should have a reasonable maximum depth limit. ```diff -while (curParentId !== '0' && depth < 1000) { +const MAX_DEPTH = 100; // Reasonable maximum nesting level +while (curParentId !== '0' && depth < MAX...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,348 @@ +# 插件开发 + +## 插件相关概念 + +在设计器中,插件的范围包括顶部工具栏、左侧插件栏。 +![插件示意图](./imgs/plugin1.png) + +官方实现了很多插件,但是可能无法满足部分人的需求,所以,我们提供插件定制功能,通过插件定制和使用我们提供的能力,可以满足绝大部分人的需求。 + +插件提供的能力: + +- 获取 schema 或操作 schema +- 通过画布暴露的逻辑与画布交互 +- 通过插件面板实现其他自定义逻辑 + +## 插件从开发到上线使用的完整流程 + +- 开发插件 +- 联调 +- 发布插件 +- 在生态中心中录入插件(左侧插件则到插件生态中录入,...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling for node removal.** The node removal example should include error handling for cases where the node or parent is not found. ```diff let { schema, parent } = getCurrent() // 获取当前选中节点的 schema,当前父节点的 schema +if (!schema || !parent) { + console.error('No...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,549 @@ +# 自定义页面出码插件 + +页面出码是整体应用出码中的核心组成部分。关于页面出码也有很多的定制化需求,比如 vue 出码可以选择 composition api 的风格、可以选择 options 的风格,可以选择 return jsx 的出码风格。为了满足二次开发用户自定义页面出码的需求。我们提供两种自定的方式,下面是具体介绍: + +## 自定义插件替换页面出码与区块出码 + +第一种方式,假如用户想出码成 vue options 风格的页面,与官方的出码存在较大差异,则官方建议自定义插件。替换官方的页面出码插件与区块出码插件。 +例如: + +```javascript +import {...
_:hammer_and_wrench: Refactor suggestion_ **Add error handling for potential undefined values** The TinyGrid example should include error handling for potential undefined values when accessing nested properties. ```diff const handleTinyGrid = (optionData, globalHooks, config) => { const { componentName, props } ...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,123 @@ +# 注册表 + +## 什么是注册表 + +在 新架构介绍中,我们引入了注册表的概念,二次低代码平台开发用户通过注册表配置元服务元应用,TinyEngine底层引擎读取注册表的配置,完成元应用元服务的定制,然后加载对应的元应用元服务,完成低代码平台的启动。 + +所以注册表就是完成元应用元服务注册、配置、覆盖的TinyEngine提供的底层核心功能。 + +注册表的作用: + +- 接收元应用元服务的配置,传递到低代码底层引擎,完成低代码平台的定制化。 +- 合并默认的元应用元服务的配置项以及用户的自定义配置项。 +- 提供查询能力,使得元服务与元服务之间能够相互通信,或者相关状态变量。 + +...
_:hammer_and_wrench: Refactor suggestion_ **Document type definitions and validation rules for registry configuration** The configuration example would be more helpful with TypeScript interfaces and validation rules for each property. Consider adding: ```typescript interface EngineRegistry { root: { id: stri...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,160 @@ +# 应用工具类管理 + +## 修改工具类 + +<a id=修改工具类> </a> + +### 基本信息 + +**Path:** /app-center/api/apps/extension/update + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appl...
_:hammer_and_wrench: Refactor suggestion_ **Consider using DELETE HTTP method for deletion endpoint** The delete operation currently uses GET method which doesn't align with REST conventions. GET requests should be idempotent and used for retrieving data, not for modifying resources. Consider changing the HTTP metho...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,160 @@ +# 应用工具类管理 + +## 修改工具类 + +<a id=修改工具类> </a> + +### 基本信息 + +**Path:** /app-center/api/apps/extension/update + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | appl...
_:hammer_and_wrench: Refactor suggestion_ **Add validation rules for query parameters** The documentation for the list endpoint's query parameters should specify: 1. Valid format/pattern for the `app` parameter (e.g., numeric only) 2. Case sensitivity for the `category` parameter values 3. Error responses when invali...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,266 @@ +# 数据源管理 + +## 修改数据源 + +<a id=修改数据源> </a> + +### 基本信息 + +**Path:** /app-center/api/sources/update/:id + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | applicati...
_:hammer_and_wrench: Refactor suggestion_ **Convert HTML tables to Markdown format for better maintainability.** The document uses HTML tables which are harder to maintain. Consider converting them to native Markdown tables for better readability and maintainability. Here's an example of how to convert the first tab...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,266 @@ +# 数据源管理 + +## 修改数据源 + +<a id=修改数据源> </a> + +### 基本信息 + +**Path:** /app-center/api/sources/update/:id + +**Method:** POST + +**接口描述:** + + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | applicati...
_:warning: Potential issue_ **Use DELETE HTTP method for delete operations.** The delete endpoints currently use GET method which violates REST principles. Consider changing to DELETE method for the following endpoints: - `/api/sources/delete/:id` - `/api/source_tpl/delete/:id` Using GET for destructive operations c...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,106 @@ +# 设置面板模块API + +## 变量绑定 + +变量绑定列表中的变量可能来自于其他元应用。 + +目前提供一种在元应用中注册变量绑定列表来源的方法:首先在元应用配置中添加 getSharedOptions 接口,这个接口也是用其他需要共享的配置 + +```js +export default { + ...metaData, + entry, + apis: { + getSharedOptions + } +} +``` + + + +getSharedOptions 接口返回一个存储配置对象,这里约定了 variableConfiguratorList 字段为变量绑定列表。下面代...
_:bulb: Codebase verification_ **Update the image path to match the correct location** The image exists at both `docs/API/imgs/bindEventApi.png` and `docs/api/imgs/bindEventApi.png` (case difference), but the current relative path `./imgs/bindEventApi.png` is incorrect. Update the image reference to use the correct p...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,104 @@ +# DSL代码生成 + +## generateCode + +<a id=generateCode> </a> + +### 基本信息 + +**Path:** /generateCode + +**Method:** GET
_:warning: Potential issue_ **HTTP method inconsistency with endpoint behavior** The endpoint is documented as GET but appears to accept complex request parameters that would typically be sent via POST. Consider changing the HTTP method to POST to align with REST best practices for operations that accept complex req...
tiny-engine
github_2023
others
917
opentiny
coderabbitai[bot]
@@ -0,0 +1,104 @@ +# DSL代码生成 + +## generateCode + +<a id=generateCode> </a> + +### 基本信息 + +**Path:** /generateCode + +**Method:** GET + +**接口描述:** + +<p>作为npm包使用generateCode方法生成代码示例:</p> +<pre><code data-language="js" class="lang-js">const path = require('path') +const fs = require('fs') +const { generateCode } = requi...
_:hammer_and_wrench: Refactor suggestion_ **Improve code example with error handling and markdown syntax** The example code has several areas for improvement: 1. Missing error handling for file operations 2. Using HTML tags instead of markdown code blocks Consider updating to: ```diff - <pre><code data-language="js...