Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
337547038 committed Jul 16, 2024
1 parent 33d237f commit db93a41
Show file tree
Hide file tree
Showing 64 changed files with 43 additions and 339 deletions.
1 change: 0 additions & 1 deletion docs/assets/404-BuvcQL02.svg

This file was deleted.

This file was deleted.

211 changes: 0 additions & 211 deletions docs/assets/aceTooptip-DPWTz_Ze.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/api-B60ZNGk4.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/api-CQ4li6K-.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/assets/applyed-DBnrXcLD.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/copyer-B3fOt00v.js

This file was deleted.

Binary file removed docs/assets/data-5i_D1foY.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/assets/dept-JwDTukmU.js

This file was deleted.

2 changes: 0 additions & 2 deletions docs/assets/dict-BLSrzDwZ.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/done-IoUJlf34.js

This file was deleted.

Binary file removed docs/assets/echarts-CD3jBC0I.png
Binary file not shown.
Binary file removed docs/assets/flow-D0pmACqH.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/assets/form-CVP7iZFP.js

This file was deleted.

4 changes: 2 additions & 2 deletions docs/assets/form-FxoDkBsF.js → docs/assets/form-S3w6qjhp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* empty css */import{o as s,c as t,ad as a}from"./index-DW6ahk2i.js";const n={class:"marked-body"},l=a(`<h1 id="akform-表单">AKForm 表单</h1><p>适用于导出vue文件</p><h2 id="使用方式">使用方式</h2><pre class="language-html"><code class="hljs">
/* empty css */import{o as s,c as t,A as a}from"./index-4Q00i4b2.js";const n={class:"marked-body"},l=a(`<h1 id="akform-表单">AKForm 表单</h1><p>适用于导出vue文件</p><h2 id="使用方式">使用方式</h2><pre class="language-html"><code class="hljs">
<span class="hljs-tag">&lt;<span class="hljs-name">ak-form</span> <span class="hljs-attr">:formData</span>=<span class="hljs-string">&quot;formData&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">ak-form</span>&gt;</span></code></pre><h2 id="api">API</h2><h3 id="props">Props</h3><table><thead><tr><th>参数</th><th>类型</th><th>说明</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>设计的生成表单数据</td></tr><tr><td>type</td><td>number/1</td><td>表单展示模式,1新增;2修改;3查看(表单模式) ;4查看; 5设计</td></tr><tr><td>disabled</td><td>boolean/false</td><td>表单禁用模式,类似于表单模式查看</td></tr><tr><td>requestUrl</td><td>string</td><td>表单编辑初始数据加载。适用于导出vue文件</td></tr><tr><td>beforeFetch</td><td>function (params,route)</td><td>请求编辑数据前参数处理方法,可对请求参数处理。适用于导出vue文件,<code>return false</code>时不请求</td></tr><tr><td>afterFetch</td><td>function/string</td><td>请求编辑数据完成后数据处理方法。适用于导出vue文件,<code>return false</code>阻止事件运行</td></tr><tr><td>submitUrl</td><td>string</td><td>表单数据新增提交保存url</td></tr><tr><td>editUrl</td><td>string</td><td>表单数据修改保存提交url</td></tr><tr><td>beforeSubmit</td><td>function (params,route)/string</td><td>表单提交前数据处理。适用于导出vue文件,<code>return false</code>时不发送请求</td></tr><tr><td>afterSubmit</td><td>function(type,res)</td><td>表单提交后,默认提示提交结果,可return false阻止提示。res接口返回参数,type提交结果类型success/fail/validate。validate表单没通过校验时</td></tr><tr><td>dict</td><td>object</td><td>用于匹配的字典数据,一般不设置,从接口获取</td></tr><tr><td>btnClick</td><td>function(key)</td><td>表单按钮事件,拖拽设计和快速添加的按钮,<code>return false</code>可阻止默认事件</td></tr><tr><td>query</td><td>object</td><td>一些附加的请求参数。也可在<code>beforeFetch</code>处添加</td></tr><tr><td>params</td><td>object</td><td>提交表单一些附加参数,如在提交修改时可添加id等信息。而不需要在提交前拦截处理</td></tr></tbody></table><h3 id="events">Events</h3><table><thead><tr><th>事件名</th><th>说明</th></tr></thead><tbody><tr><td>btnClick</td><td>按钮组件点击事件</td></tr><tr><td>change</td><td>表单组件值发生变化事件(key,value,model,data,tProp)。key:组件的name值,value:组件当前的值,model:当前表单的值,tProp:表格内组件才会有值,data当前组件所在的list数据</td></tr></tbody></table><h3 id="methods">Methods</h3><table><thead><tr><th>方法</th><th>说明</th></tr></thead><tbody><tr><td>validate</td><td>表单校验方法</td></tr><tr><td>getValue</td><td>用于获取表单的值</td></tr><tr><td>setValue</td><td>对表单设置初始值(model,filter:boolean) filter=true时将会过滤掉model中不属于当前表单的字段</td></tr><tr><td>setOptions</td><td>对表单选择项快速设置</td></tr><tr><td>resetFields</td><td>重置表单方法</td></tr><tr><td>getData</td><td>加载表单初始数据(params:any)</td></tr><tr><td>submit</td><td>表单提交</td></tr></tbody></table><p> 两个全局特殊方法</p><table><thead><tr><th>方法</th><th>说明</th></tr></thead><tbody><tr><td>get[formName]ControlByName</td><td>用于根据name值获取formData中的数据项(name:string)</td></tr><tr><td>get[formName]ValueByName</td><td>用于根据name值获取formData中的数据项的值(name:string)</td></tr></tbody></table><h3 id="slot">Slot</h3><table><thead><tr><th>参数</th><th>说明</th></tr></thead><tbody><tr><td>default</td><td>-</td></tr></tbody></table><h3 id="data">data</h3><p>更多数据详细配置可查看<a href="/#/docs/form-option">配置手册</a></p><p>代码编辑输入框可支持<code>json</code>或<code>javascript</code>,初始使用时可通过修改<code>/src/utils/design.ts</code>里的<code>EDITTYPE</code>的值</p><pre class="language-javascript"><code class="hljs">formData = {
<span class="hljs-attr">list</span>: [
{
Expand Down Expand Up @@ -87,4 +87,4 @@
<span class="hljs-keyword">return</span> model
}
}
}</code></pre>`,19),p=[l],h={__name:"form",setup(e){return(r,d)=>(s(),t("div",n,p))}};export{h as default};
}</code></pre>`,19),p=[l],h={__name:"form",setup(e){return(r,c)=>(s(),t("div",n,p))}};export{h as default};
Binary file removed docs/assets/form-h0Yhw6Q2.png
Binary file not shown.
Binary file removed docs/assets/form-list-CdhILkHT.png
Binary file not shown.
Loading

0 comments on commit db93a41

Please sign in to comment.