Skip to content

Commit

Permalink
chore: deploy docs of project Nop Entropy via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nop-cao committed Sep 20, 2024
1 parent 4119753 commit 257a253
Show file tree
Hide file tree
Showing 6 changed files with 1,437 additions and 6 deletions.
2 changes: 1 addition & 1 deletion projects/nop-entropy/docs/dev-guide/auth/auth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ <h1 class="Article-title">权限</h1>
<li>配置<code>nop.auth.use-data-auth-table=true</code>启用数据权限配置表<code>NopAuthRoleDataAuth</code>,数据库中配置的数据权限规则可以和配置文件中的权限规则合并</li>
<li>缺省会加载&#x2F;nop&#x2F;main&#x2F;auth&#x2F;main.action-auth.xml 静态权限配置文件,可以通过nop.auth.site-map.static-config-path定制为不同的值</li>
<li>在main.action-auth.xml可以通过<code>x:extends</code>来引入已有的权限配置文件。</li>
<li>如果配置<code>nop.auth.skip-check-for-admin=true</code>,则对于具有admin角色的用户会跳过操作权限检查,缺省为true。</li>
<li>如果配置<code>nop.auth.skip-check-for-admin=true</code>,则对于具有admin角色或者<code>nop-admin</code>的用户会跳过操作权限检查,缺省为true。</li>
<li>配置<code>nop.auth.service-public=true</code>可以开放后台服务,无需登录即可访问后台服务函数</li>
<li>配置<code>nop.auth.quarkus-dev-public=true</code>会开放quarkus调试页面,无需登录即可访问&#x2F;q&#x2F;graphql-ui等调试页面</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1493,12 +1493,12 @@ <h2 id="REST-Over-GraphQL"><a href="#REST-Over-GraphQL" class="headerlink" title
<p><code>&#123;@formSelection&#125;</code>表示选择当前表单中用到的所有字段。</p>
<h2 id="GraphQL扩展"><a href="#GraphQL扩展" class="headerlink" title="GraphQL扩展"></a>GraphQL扩展</h2><h3 id="Map类型"><a href="#Map类型" class="headerlink" title="Map类型"></a>Map类型</h3><p>GraphQL是一种强类型的框架,它要求所有数据都有明确的类型定义,这在某些动态场景中使用时并不方便。例如有的时候我们可能需要把一个扩展集合返回到前端。</p>
<p>NopGraphQL引入了一个特殊的Scalar类型: Map,可以利用它来描述那些动态数据结构。例如</p>
<figure class="highlight js"><table><tr><td class="code"><pre><code class="hljs js">type <span class="hljs-title class_">QueryBean</span>&#123;<br> <span class="hljs-attr">filter</span>: <span class="hljs-title class_">Map</span><br> <span class="hljs-attr">orderBy</span>: [<span class="hljs-title class_">OrderFieldBean</span>]<br>&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs graphql">type QueryBean&#123;<br> filter: Map<br> orderBy: [OrderFieldBean]<br>&#125;<br></code></pre></td></tr></table></figure>

<h3 id="树形结构"><a href="#树形结构" class="headerlink" title="树形结构"></a>树形结构</h3><p>对于单位树、菜单树这样的树形结构的获取,NopGraphQL通过Directive机制提供了一个扩展语法,可以直接表达递归拉取数据,例如</p>
<figure class="highlight js"><table><tr><td class="code"><pre><code class="hljs js"><span class="hljs-title class_">NopAuthDept</span>_findList&#123;<br> <span class="hljs-attr">value</span>: id,<br> <span class="hljs-attr">label</span>: displayName<br> children @<span class="hljs-title class_">TreeChildren</span>(max=<span class="hljs-number">5</span>)<br>&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><code class="hljs graphql">query &#123;<br> NopAuthDept_findList&#123;<br> value: id<br> label: displayName<br> children @TreeChildren(max:5)<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<p><code>@TreeChildren(max=5)</code>表示按照本层的结构最多嵌套5层。</p>
<p><code>@TreeChildren(max:5)</code>表示按照本层的结构最多嵌套5层。</p>
<h2 id="文件上传下载"><a href="#文件上传下载" class="headerlink" title="文件上传下载"></a>文件上传下载</h2><p>参见<a href="../upload/">upload.md</a></p>
<h2 id="REST链接"><a href="#REST链接" class="headerlink" title="REST链接"></a>REST链接</h2><p>NopGraphQL引擎支持通过REST链接的方式调用后台服务函数。<br>在某种意义上它统一了GraphQL和REST,使得它们可以实现同样的功能,区别仅仅是请求和响应消息的格式不同</p>
<p>参见 <a href="../rest/">rest.md</a></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,9 @@ <h2 id="外部表"><a href="#外部表" class="headerlink" title="外部表"></a
<p>因为是外部表,不需要为该表生成代码,所以增加<code>not-gen</code>标签。同时需要指定这个表所在的模块,<code>模块ID</code>的格式为<code>A/B</code>这种形式,对应于二级目录结构。<br>例如<code>nop-auth</code>这个包生成的资源文件都存放在<code>/_vfs/nop/auth</code>目录下,它对应的模块名是<code>nop/auth</code></p>
<p>Excel模型中如果定义了<code>所属模型</code>这个参数,则会在自动生成<code>_app.orm.xml</code>和关联字段的meta定义中都增加<code>biz:moduleId</code>配置。</p>
<p>前端页面使用的控件缺省由<code>control.xlib</code>库根据meta配置来自动推定。<code>edit-relation</code>控件会调用<code>XuiHelper.getRelationPickerUrl</code><br>函数来生成<code>picker</code>页面对应的链接,链接格式为 <code>&quot;/&quot; + moduleId + &quot;/pages/&quot; + bizObjName + &quot;/picker.page.yaml&quot;</code>。如果关联子表的meta配置中<br>设置了<code>biz:moduleId</code>属性,则<code>moduleId</code>以设置的值为准,否则会自动根据meta文件的路径推定它所在的模块。</p>
<h2 id="常见问题诊断"><a href="#常见问题诊断" class="headerlink" title="常见问题诊断"></a>常见问题诊断</h2><ol>
<li>在Excel模型中定义了关联属性,但是生成的<code>app.orm.xml</code>文件中却没有。<br>注意关联属性是在【关联列表】中定义,对于列表结构,每一个条目的第一列是序号列,其中必须设置为整数值。<img src="/knosys/project-nop-entropy/dev-guide/model/images/relation.png"></li>
</ol>

</div>
<footer class="Article-footer col-md-3">
Expand Down
10 changes: 10 additions & 0 deletions projects/nop-entropy/docs/dev-guide/xlang/xdef/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,16 @@ <h2 id="集合节点定义"><a href="#集合节点定义" class="headerlink" tit
<li><code>xdef:bean-sub-type-prop=&quot;type&quot;</code>表示json反序列化的时候,根据<code>type</code>属性来确定子节点类型</li>
</ul>
<figure class="highlight xml"><table><tr><td class="code"><pre><code class="hljs xml"><span class="hljs-comment">&lt;!--</span><br><span class="hljs-comment"> 以下 DSL 定义转换为 JSON 后的结构为:</span><br><span class="hljs-comment"> &#123;</span><br><span class="hljs-comment"> &quot;steps&quot;: [&#123;</span><br><span class="hljs-comment"> &quot;type&quot;: &quot;step&quot;,</span><br><span class="hljs-comment"> &quot;name&quot;: &quot;a&quot;</span><br><span class="hljs-comment"> &#125;, &#123;</span><br><span class="hljs-comment"> &quot;type&quot;: &quot;join&quot;,</span><br><span class="hljs-comment"> &quot;name&quot;: &quot;b&quot;</span><br><span class="hljs-comment"> &#125;]</span><br><span class="hljs-comment"> &#125;</span><br><span class="hljs-comment">--&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">steps</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">step</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;a&quot;</span>/&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">join</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;b&quot;</span>/&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">steps</span>&gt;</span><br></code></pre></td></tr></table></figure>

<h2 id="常见问题解答"><a href="#常见问题解答" class="headerlink" title="常见问题解答"></a>常见问题解答</h2><ol>
<li><p>使用<code>&lt;parent&gt; &lt;item xdef:value=&quot;string&quot;&gt; &lt;/parent&gt;</code>定义 和<code>&lt;parent item=&quot;string&quot;&gt;</code> 定义有什么区别?<br>生成到java中没有区别,这种只是在xml形式层面有区别</p>
</li>
<li><p>如果指定<code>xdef:body-type=&quot;list&quot;</code>, 那么它的子节点必须是对象类型吗?如果是int或者string之类的基本类型应该怎么写?<br>我没有处理过这种情况,如果一定要处理。目前的做法大概是 <code>&lt;list xdef:body-type=&quot;list&quot;&gt; &lt;_ xdef:value=&quot;int&quot; /&gt;</code> 类似这种。<br>另外对于常用的逗号分隔的列表值,可以直接写 <code>&lt;list xdef:value=&quot;csv-list&quot; /&gt;</code></p>
</li>
<li><p>如果一个节点已经设置了<code>xdef:body-type=&quot;list&quot;</code>, 但是还有别的属性 例如<br><code>&lt;row name=&quot;string&quot; xdef:body-type=&quot;list&quot; height=&quot;string&quot;&gt;</code>, 这会生成什么结构?<br> 缺省情况下body内容会对应于body属性。这是和AMIS的约定保持一致,tagName对应于type, body内容对应于body。</p>
</li>
</ol>

</div>
<footer class="Article-footer col-md-3">

Expand Down
Loading

0 comments on commit 257a253

Please sign in to comment.