docs 调整

This commit is contained in:
liaoxuezhi 2019-06-04 10:11:24 +08:00
parent fec869552b
commit 1e120fc0b9
101 changed files with 62 additions and 17401 deletions

View File

@ -1,4 +1,4 @@
### Array
## Array
数组输入框配置

View File

@ -1,4 +1,4 @@
### Button-Group(FormItem)
## Button-Group(FormItem)
按钮集合,直接看示例吧。

View File

@ -1,4 +1,4 @@
### Button-Toolbar
## Button-Toolbar
从上面的例子可以看出,当按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以利用 button-toolbar

View File

@ -1,4 +1,4 @@
### Button
## Button
按钮, 包含 `button`、`submit` 和 `reset`。 字段说明。

View File

@ -1,4 +1,4 @@
### Chained-Select
## Chained-Select
无限级别下拉,只支持单选,且必须和 `source` 搭配,通过 API 拉取数据,只要 API 有返回结果,就能一直无限级别下拉下去。

View File

@ -1,4 +1,4 @@
### Checkbox
## Checkbox
勾选框

View File

@ -1,4 +1,4 @@
### Checkboxes
## Checkboxes
复选框

View File

@ -1,4 +1,4 @@
### City
## City
城市选择器,可用于让用户输入城市。

View File

@ -1,4 +1,4 @@
### Color
## Color
颜色选择器。

View File

@ -1,4 +1,4 @@
### Combo
## Combo
组合模式,支持自由组合多个表单项。

View File

@ -1,4 +1,4 @@
### Date-Range
## Date-Range
日期范围类型。

View File

@ -1,4 +1,4 @@
### Date
## Date
日期类型。

View File

@ -111,7 +111,7 @@ export default {
},
{
label: 'Panel',
path: '/docs/renderers/form/Panel',
path: '/docs/renderers/Form/Panel',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Panel.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
@ -125,7 +125,7 @@ export default {
},
{
label: 'Text',
path: '/docs/renderers/form/Text',
path: '/docs/renderers/Form/Text',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Text.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
@ -195,7 +195,7 @@ export default {
},
{
label: 'Checkboxes',
path: '/docs/renderers/form/Checkboxes',
path: '/docs/renderers/Form/Checkboxes',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Checkboxes.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
@ -230,7 +230,7 @@ export default {
},
{
label: 'Datetime',
path: '/docs/renderers/form/Datetime',
path: '/docs/renderers/Form/Datetime',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Datetime.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
@ -265,14 +265,14 @@ export default {
},
{
label: 'Image',
path: '/docs/renderers/form/Image',
path: '/docs/renderers/Form/Image',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Image.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
},
{
label: 'File',
path: '/docs/renderers/form/File',
path: '/docs/renderers/Form/File',
getComponent: (location, cb) => require(['../../docs/renderers/Form/File.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
@ -384,7 +384,7 @@ export default {
},
{
label: 'Editor',
path: '/docs/renderers/form/Editor',
path: '/docs/renderers/Form/Editor',
getComponent: (location, cb) => require(['../../docs/renderers/Form/Editor.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
define('docs/renderers/Array.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"array\" href=\"#array\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Array</h3><p>数组输入框配置</p>\n<p>其实就是 <a href=\"#/docs/renderers/Combo\">Combo</a> 的一个 flat 用法。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>array</code></li>\n<li><code>items</code> 配置单项表单类型</li>\n<li><code>addable</code> 是否可新增。</li>\n<li><code>removable</code> 是否可删除</li>\n<li><code>draggable</code> 默认为 <code>false</code>, 是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段</li>\n<li><code>draggableTip</code> 可拖拽的提示文字,默认为:<code>&quot;可通过拖动每行中的【交换】按钮进行顺序调整&quot;</code></li>\n<li><code>addButtonText</code> 新增按钮文字,默认为 <code>&quot;新增&quot;</code>。</li>\n<li><code>minLength</code> 限制最小长度。</li>\n<li><code>maxLength</code> 限制最大长度。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 650px\"><script type=\"text/schema\" height=\"650\" scope=\"form\">[\n {\n \"name\": \"array\",\n \"label\": \"颜色集合\",\n \"type\": \"array\",\n \"value\": [\"red\"],\n \"inline\": true,\n \"items\": {\n \"type\": \"color\"\n }\n },\n\n {\n \"type\": \"static\",\n \"name\": \"array\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Array",
"fragment": "array",
"fullPath": "#array",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Button-Toolbar.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button-toolbar\" href=\"#button-toolbar\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Toolbar</h3><p>从上面的例子可以看出,当按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以利用 button-toolbar</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-toolbar</code></li>\n<li><code>buttons</code> 按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Button-Toolbar",
"fragment": "button-toolbar",
"fullPath": "#button-toolbar",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Button.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button\" href=\"#button\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button</h3><p>按钮, 包含 <code>button</code>、<code>submit</code> 和 <code>reset</code>。 字段说明。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button</code></li>\n<li><code>label</code> 按钮文字</li>\n<li><code>icon</code> 按钮图标。可以使用来自 fontawesome 的图标。</li>\n<li><code>level</code> 按钮级别。 包含: <code>link</code>、<code>primary</code>、<code>success</code>、<code>info</code>、<code>warning</code>和<code>danger</code>。</li>\n<li><code>size</code> 按钮大小。 包含: <code>xs</code>、<code>sm</code>、<code>md</code>和<code>lg</code></li>\n<li><code>className</code> 按钮的类名。</li>\n</ul>\n<p>如果按钮是 <code>button</code> 类型,则还需要配置 <a href=\"#/docs/renderers/Action\">Action</a> 中定义的属性否则amis 不知道如何响应当前按钮点击。</p>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"level\": \"primary\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\",\n \"level\": \"danger\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Button",
"fragment": "button",
"fullPath": "#button",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Chained-Select.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"chained-select\" href=\"#chained-select\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Chained-Select</h3><p>无限级别下拉,只支持单选,且必须和 <code>source</code> 搭配,通过 API 拉取数据,只要 API 有返回结果,就能一直无限级别下拉下去。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>chained-select</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。另外也可以用 <code>$xxxx</code> 来获取当前作用域中的变量。\n更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a>。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"name\": \"select3\",\n \"type\": \"chained-select\",\n \"label\": \"级联下拉\",\n \"source\": \"https://houtai.baidu.com/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4&waiSeconds=1\",\n \"value\": \"a,b\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Chained-Select",
"fragment": "chained-select",
"fullPath": "#chained-select",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Checkbox.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"checkbox\" href=\"#checkbox\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkbox</h3><p>勾选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkbox</code></li>\n<li><code>option</code> 选项说明</li>\n<li><code>trueValue</code> 默认 <code>true</code></li>\n<li><code>falseValue</code> 默认 <code>false</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"name\": \"checkbox\",\n \"type\": \"checkbox\",\n \"label\": \"Checkbox\",\n \"option\": \"选项说明\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Checkbox",
"fragment": "checkbox",
"fullPath": "#checkbox",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Checkboxes.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"checkboxes\" href=\"#checkboxes\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkboxes</h3><p>复选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkboxes</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>joinValues</code> 默认为 <code>true</code> 选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>columnsCount</code> 默认为 <code>1</code> 可以配置成一行显示多个。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 530px\"><script type=\"text/schema\" height=\"530\" scope=\"form\">[\n {\n \"name\": \"checkboxes\",\n \"type\": \"checkboxes\",\n \"label\": \"Checkboxes\",\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"checkboxes\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Checkboxes",
"fragment": "checkboxes",
"fullPath": "#checkboxes",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Color.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"color\" href=\"#color\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Color</h3><p>颜色选择器。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>color</code></li>\n<li><code>format</code> 请选择 <code>hex</code>、<code>hls</code>、<code>rgb</code>或者<code>rgba</code>。默认为 <code>hex</code>。</li>\n<li><code>clearable</code> 是否显示清除按钮。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"color\",\n \"name\": \"color\",\n \"label\": \"颜色\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Color",
"fragment": "color",
"fullPath": "#color",
"level": 3
}
],
"level": 0
}
};
});

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
define('docs/renderers/Date-Range.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"date-range\" href=\"#date-range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date-Range</h3><p>日期范围类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date-range</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date-range\",\n \"name\": \"select\",\n \"label\": \"日期范围\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>考虑到大家都习惯用两个字段来存储,那么就用 date 来代替吧。</p>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n [\n {\n \"type\": \"date\",\n \"name\": \"start\",\n \"label\": \"开始日期\",\n \"maxDate\": \"$end\"\n },\n\n {\n \"type\": \"date\",\n \"name\": \"end\",\n \"label\": \"结束日期\",\n \"minDate\": \"$start\"\n }\n ],\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\",\n \"description\": \"包含开始日期和结束日期\",\n \"tpl\": \"$start - $end\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Date-Range",
"fragment": "date-range",
"fullPath": "#date-range",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Date.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"date\" href=\"#date\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date</h3><p>日期类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Date",
"fragment": "date",
"fullPath": "#date",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Datetime.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"datetime\" href=\"#datetime\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Datetime</h3><p>日期时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>datetime</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD HH:mm:ss</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">https://github.com/YouCanBookMe/react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"datetime\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Datetime",
"fragment": "datetime",
"fullPath": "#datetime",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Divider.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"divider\" href=\"#divider\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Divider</h3><p>分割线</p>\n<ul>\n<li><code>type</code> 请设置成 <code>divider</code></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"divider\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Divider",
"fragment": "divider",
"fullPath": "#divider",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,32 +0,0 @@
define('docs/renderers/Editor.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"editor\" href=\"#editor\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Editor</h3><h3><a class=\"anchor\" name=\"xxx-editor\" href=\"#xxx-editor\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>XXX-Editor</h3><ul>\n<li><code>type</code> 请设置成 <code>editor</code> 或者 <code>bat-editor</code>、<code>c-editor</code>、<code>coffeescript-editor</code>、<code>cpp-editor</code>、<code>csharp-editor</code>、<code>css-editor</code>、<code>dockerfile-editor</code>、<code>fsharp-editor</code>、<code>go-editor</code>、<code>handlebars-editor</code>、<code>html-editor</code>、<code>ini-editor</code>、<code>java-editor</code>、<code>javascript-editor</code>、<code>json-editor</code>、<code>less-editor</code>、<code>lua-editor</code>、<code>markdown-editor</code>、<code>msdax-editor</code>、<code>objective-c-editor</code>、<code>php-editor</code>、<code>plaintext-editor</code>、<code>postiats-editor</code>、<code>powershell-editor</code>、<code>pug-editor</code>、<code>python-editor</code>、<code>r-editor</code>、<code>razor-editor</code>、<code>ruby-editor</code>、<code>sb-editor</code>、<code>scss-editor</code>、<code>sol-editor</code>、<code>sql-editor</code>、<code>swift-editor</code>、<code>typescript-editor</code>、<code>vb-editor</code>、<code>xml-editor</code>、<code>yaml-editor</code>。</li>\n<li><code>language</code> 默认为 <code>javascript</code> 当 <code>type</code> 为 <code>editor</code> 的时候有用。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 550px\"><script type=\"text/schema\" height=\"550\" scope=\"form-item\">{\n \"type\": \"json-editor\",\n \"name\": \"json\",\n \"label\": \"Json Editor\"\n}\n</script></div>\n<h3><a class=\"anchor\" name=\"diff-editor\" href=\"#diff-editor\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Diff-Editor</h3><ul>\n<li><code>type</code> 请设置成 <code>diff-editor</code></li>\n<li><code>language</code> 默认为 <code>javascript</code> 当 <code>type</code> 为 <code>diff-editor</code> 的时候有用</li>\n<li><code>diffValue</code> 设置左侧编辑器的值,支持<code>${xxx}</code>获取变量</li>\n<li><code>disabled</code> 配置 <strong>右侧编辑器</strong> 是否可编辑,<strong>左侧编辑器</strong>始终不可编辑</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<p>PS: 当用作纯展示时,可以通过<code>value</code>配置项,设置右侧编辑器的值</p>\n<div class=\"amis-preview\" style=\"height: 550px\"><script type=\"text/schema\" height=\"550\" scope=\"form-item\">{\n \"type\": \"diff-editor\",\n \"name\": \"diff\",\n \"diffValue\": \"hello world\",\n \"label\": \"Diff-Editor\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Editor",
"fragment": "editor",
"fullPath": "#editor",
"level": 3
},
{
"label": "XXX-Editor",
"fragment": "xxx-editor",
"fullPath": "#xxx-editor",
"level": 3
},
{
"label": "Diff-Editor",
"fragment": "diff-editor",
"fullPath": "#diff-editor",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Email.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"email\" href=\"#email\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Email</h3><p>Email 输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>email</code></li>\n<li><code>addOn</code> 输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。</li>\n<li><code>addOn.type</code> 请选择 <code>text</code> 、<code>button</code> 或者 <code>submit</code>。</li>\n<li><code>addOn.label</code> 文字说明</li>\n<li><code>addOn.xxx</code> 其他参数请参考按钮配置部分。</li>\n<li><code>clearable</code> 在有值的时候是否显示一个删除图标在右侧。</li>\n<li><code>resetValue</code> 默认为 <code>&quot;&quot;</code>, 删除后设置此配置项给定的值。</li>\n<li><code>options</code> 可选,选项配置,类型为数组,成员格式如下,配置后用户输入内容时会作为选项提示辅助输入。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> 通过 options 只能配置静态数据,如果设置了 source 则会从接口拉取,实现动态效果。</li>\n<li><code>autoComplete</code> 跟 source 不同的是,每次用户输入都会去接口获取提示。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"email\",\n \"name\": \"text\",\n \"validateOnChange\": true,\n \"label\": \"Email\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Email",
"fragment": "email",
"fullPath": "#email",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FieldSet.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"fieldset\" href=\"#fieldset\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>FieldSet</h3><p>多个输入框可以通过 fieldSet 捆绑在一起。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>fieldSet</code></li>\n<li><code>title</code> 标题</li>\n<li><code>controls</code> 表单项集合。</li>\n<li><code>mode</code> 展示默认,跟 <a href=\"#/docs/renderers/Form\">Form</a> 中的模式一样,选择: <code>normal</code>、<code>horizontal</code>或者<code>inline</code>。</li>\n<li><code>horizontal</code> 当为水平模式时,用来控制左右占比。</li>\n<li><code>horizontal.label</code> 左边 label 的宽度占比。</li>\n<li><code>horizontal.right</code> 右边控制器的宽度占比。</li>\n<li><code>horizontal.offset</code> 当没有设置 label 时,右边控制器的偏移量。</li>\n<li><code>collapsable</code> 配置是否可折叠,默认为 <code>true</code>。</li>\n<li><code>collapsed</code> 默认是否折叠。</li>\n<li><code>className</code> CSS 类名</li>\n<li><code>headingClassName</code> 标题 CSS 类名</li>\n<li><code>bodyClassName</code> 内容区域 CSS 类名</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 700px\"><script type=\"text/schema\" height=\"700\" scope=\"form\">[\n {\n \"type\": \"fieldSet\",\n \"title\": \"基本配置\",\n \"controls\": [\n {\n \"name\": \"a\",\n \"type\": \"text\",\n \"label\": \"文本1\"\n },\n\n {\n \"name\": \"a\",\n \"type\": \"text\",\n \"label\": \"文本2\"\n }\n ]\n },\n\n {\n \"type\": \"fieldSet\",\n \"title\": \"其他配置\",\n \"collapsed\": true,\n \"controls\": [\n {\n \"name\": \"c\",\n \"type\": \"text\",\n \"label\": \"文本3\"\n },\n\n {\n \"name\": \"d\",\n \"type\": \"text\",\n \"label\": \"文本4\"\n }\n ]\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "FieldSet",
"fragment": "fieldset",
"fullPath": "#fieldset",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/File.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"file\" href=\"#file\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>File</h3><p>文件输入amis 也默认处理了图片存储,提交给 API 的是文件的下载地址。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>file</code></li>\n<li><code>reciever</code> 默认 <code>/api/upload/file</code> 如果想自己存储,请设置此选项。(PS: 如果想存自己的 bos, 系统配置中可以直接填写自己的 bos 配置。)</li>\n<li><code>accept</code> 默认 <code>text/plain</code> 默认只支持纯文本,要支持其他类型,请配置此属性。</li>\n<li><code>maxSize</code> 默认没有限制,当设置后,文件大小大于此值将不允许上传。</li>\n<li><code>multiple</code> 是否多选。</li>\n<li><code>maxLength</code> 默认没有限制,当设置后,一次只允许上传指定数量文件。</li>\n<li><code>joinValues</code> 多选时是否将多个值用 <code>delimiter</code> 连接起来。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 链接符</li>\n<li><code>autoUpload</code> 是否选择完就自动开始上传?默认为 <code>true</code></li>\n<li><code>fileField</code> 默认 <code>file</code>, 如果你不想自己存储,则可以忽略此属性。</li>\n<li><code>downloadUrl</code> 默认显示文件路径的时候会支持直接下载,可以支持加前缀如:<code>http://xx.dom/filename=</code> ,如果不希望这样,可以把当前配置项设置为 <code>false</code>。</li>\n<li><code>useChunk</code> 默认为 &#39;auto&#39; amis 所在服务器,限制了文件上传大小不得超出 10M所以 amis 在用户选择大文件的时候,自动会改成分块上传模式。</li>\n<li><code>chunkSize</code> 分块大小,默认为 5M.</li>\n<li><code>startChunkApi</code> 默认 <code>/api/upload/startChunk</code> 想自己存储时才需要关注。</li>\n<li><code>chunkApi</code> 默认 <code>/api/upload/chunk</code> 想自己存储时才需要关注。</li>\n<li><code>finishChunkApi</code> 默认 <code>/api/upload/finishChunk</code> 想自己存储时才需要关注。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form-item\">{\n \"type\": \"file\",\n \"name\": \"file\",\n \"label\": \"File\",\n \"maxSize\": 1048576\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "File",
"fragment": "file",
"fullPath": "#file",
"level": 3
}
],
"level": 0
}
};
});

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Array.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"array\" href=\"#array\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Array</h3><p>数组输入框配置</p>\n<p>其实就是 <a href=\"#/docs/renderers/Form/Combo\">Combo</a> 的一个 flat 用法。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>array</code></li>\n<li><code>items</code> 配置单项表单类型</li>\n<li><code>addable</code> 是否可新增。</li>\n<li><code>removable</code> 是否可删除</li>\n<li><code>draggable</code> 默认为 <code>false</code>, 是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段</li>\n<li><code>draggableTip</code> 可拖拽的提示文字,默认为:<code>&quot;可通过拖动每行中的【交换】按钮进行顺序调整&quot;</code></li>\n<li><code>addButtonText</code> 新增按钮文字,默认为 <code>&quot;新增&quot;</code>。</li>\n<li><code>minLength</code> 限制最小长度。</li>\n<li><code>maxLength</code> 限制最大长度。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 650px\"><script type=\"text/schema\" height=\"650\" scope=\"form\">[\n {\n \"name\": \"array\",\n \"label\": \"颜色集合\",\n \"type\": \"array\",\n \"value\": [\"red\"],\n \"inline\": true,\n \"items\": {\n \"type\": \"color\"\n }\n },\n\n {\n \"type\": \"static\",\n \"name\": \"array\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"array\" href=\"#array\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Array</h2><p>数组输入框配置</p>\n<p>其实就是 <a href=\"#/docs/renderers/Form/Combo\">Combo</a> 的一个 flat 用法。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>array</code></li>\n<li><code>items</code> 配置单项表单类型</li>\n<li><code>addable</code> 是否可新增。</li>\n<li><code>removable</code> 是否可删除</li>\n<li><code>draggable</code> 默认为 <code>false</code>, 是否可以拖动排序, 需要注意的是当启用拖动排序的时候,会多一个\\$id 字段</li>\n<li><code>draggableTip</code> 可拖拽的提示文字,默认为:<code>&quot;可通过拖动每行中的【交换】按钮进行顺序调整&quot;</code></li>\n<li><code>addButtonText</code> 新增按钮文字,默认为 <code>&quot;新增&quot;</code>。</li>\n<li><code>minLength</code> 限制最小长度。</li>\n<li><code>maxLength</code> 限制最大长度。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 650px\"><script type=\"text/schema\" height=\"650\" scope=\"form\">[\n {\n \"name\": \"array\",\n \"label\": \"颜色集合\",\n \"type\": \"array\",\n \"value\": [\"red\"],\n \"inline\": true,\n \"items\": {\n \"type\": \"color\"\n }\n },\n\n {\n \"type\": \"static\",\n \"name\": \"array\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Array.md', function(require, exports, module) {
"label": "Array",
"fragment": "array",
"fullPath": "#array",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Button-Group.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button-group-formitem-\" href=\"#button-group-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Group(FormItem)</h3><p>按钮集合,直接看示例吧。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-group</code></li>\n<li><code>buttons</code> 配置按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button-group\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n },\n\n {\n \"type\": \"submit\",\n \"icon\": \"fa fa-check text-success\"\n },\n\n {\n \"type\": \"reset\",\n \"icon\": \"fa fa-times text-danger\"\n }\n ]\n }\n]\n</script></div>\n<p>button-group 有两种模式,除了能让按钮组合在一起,还能做类似于单选功能。</p>\n<p>当不配置 buttons 属性时,就可以当复选框用。</p>\n<ul>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n<li><code>image</code> 图片的 http 地址。</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>clearable</code> 默认为 <code>true</code>, 表示可以取消选中。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"button-group\",\n \"name\": \"select\",\n \"label\": \"单选\",\n \"options\": [\n {\n \"label\": \"Option A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"Option B\",\n \"value\": \"b\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"button-group-formitem-\" href=\"#button-group-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Group(FormItem)</h2><p>按钮集合,直接看示例吧。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-group</code></li>\n<li><code>buttons</code> 配置按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button-group\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n },\n\n {\n \"type\": \"submit\",\n \"icon\": \"fa fa-check text-success\"\n },\n\n {\n \"type\": \"reset\",\n \"icon\": \"fa fa-times text-danger\"\n }\n ]\n }\n]\n</script></div>\n<p>button-group 有两种模式,除了能让按钮组合在一起,还能做类似于单选功能。</p>\n<p>当不配置 buttons 属性时,就可以当复选框用。</p>\n<ul>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n<li><code>image</code> 图片的 http 地址。</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>clearable</code> 默认为 <code>true</code>, 表示可以取消选中。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"button-group\",\n \"name\": \"select\",\n \"label\": \"单选\",\n \"options\": [\n {\n \"label\": \"Option A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"Option B\",\n \"value\": \"b\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Button-Group.md', function(require, exports, module)
"label": "Button-Group(FormItem)",
"fragment": "button-group-formitem-",
"fullPath": "#button-group-formitem-",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Button-Toolbar.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button-toolbar\" href=\"#button-toolbar\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Toolbar</h3><p>从上面的例子可以看出,当按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以利用 button-toolbar</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-toolbar</code></li>\n<li><code>buttons</code> 按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"button-toolbar\" href=\"#button-toolbar\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Toolbar</h2><p>从上面的例子可以看出,当按钮独立配置的时候,是独占一行的,如果想让多个按钮在一起放置,可以利用 button-toolbar</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-toolbar</code></li>\n<li><code>buttons</code> 按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Button-Toolbar.md', function(require, exports, modul
"label": "Button-Toolbar",
"fragment": "button-toolbar",
"fullPath": "#button-toolbar",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Button.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button\" href=\"#button\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button</h3><p>按钮, 包含 <code>button</code>、<code>submit</code> 和 <code>reset</code>。 字段说明。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button</code></li>\n<li><code>label</code> 按钮文字</li>\n<li><code>icon</code> 按钮图标。可以使用来自 fontawesome 的图标。</li>\n<li><code>level</code> 按钮级别。 包含: <code>link</code>、<code>primary</code>、<code>success</code>、<code>info</code>、<code>warning</code>和<code>danger</code>。</li>\n<li><code>size</code> 按钮大小。 包含: <code>xs</code>、<code>sm</code>、<code>md</code>和<code>lg</code></li>\n<li><code>className</code> 按钮的类名。</li>\n</ul>\n<p>如果按钮是 <code>button</code> 类型,则还需要配置 <a href=\"#/docs/renderers/Form/Action\">Action</a> 中定义的属性否则amis 不知道如何响应当前按钮点击。</p>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"level\": \"primary\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\",\n \"level\": \"danger\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"button\" href=\"#button\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button</h2><p>按钮, 包含 <code>button</code>、<code>submit</code> 和 <code>reset</code>。 字段说明。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button</code></li>\n<li><code>label</code> 按钮文字</li>\n<li><code>icon</code> 按钮图标。可以使用来自 font-awesome 的图标。</li>\n<li><code>level</code> 按钮级别。 包含: <code>link</code>、<code>primary</code>、<code>success</code>、<code>info</code>、<code>warning</code>和<code>danger</code>。</li>\n<li><code>size</code> 按钮大小。 包含: <code>xs</code>、<code>sm</code>、<code>md</code>和<code>lg</code></li>\n<li><code>className</code> 按钮的类名。</li>\n</ul>\n<p>如果按钮是 <code>button</code> 类型,则还需要配置 <a href=\"#/docs/renderers/Action\">Action</a> 中定义的属性否则amis 不知道如何响应当前按钮点击。</p>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"level\": \"primary\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\",\n \"level\": \"danger\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Button.md', function(require, exports, module) {
"label": "Button",
"fragment": "button",
"fullPath": "#button",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Chained-Select.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"chained-select\" href=\"#chained-select\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Chained-Select</h3><p>无限级别下拉,只支持单选,且必须和 <code>source</code> 搭配,通过 API 拉取数据,只要 API 有返回结果,就能一直无限级别下拉下去。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>chained-select</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。另外也可以用 <code>$xxxx</code> 来获取当前作用域中的变量。\n更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a>。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"name\": \"select3\",\n \"type\": \"chained-select\",\n \"label\": \"级联下拉\",\n \"source\": \"https://houtai.baidu.com/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4&waiSeconds=1\",\n \"value\": \"a,b\"\n}\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"chained-select\" href=\"#chained-select\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Chained-Select</h2><p>无限级别下拉,只支持单选,且必须和 <code>source</code> 搭配,通过 API 拉取数据,只要 API 有返回结果,就能一直无限级别下拉下去。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>chained-select</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。另外也可以用 <code>$xxxx</code> 来获取当前作用域中的变量。\n更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a>。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"name\": \"select3\",\n \"type\": \"chained-select\",\n \"label\": \"级联下拉\",\n \"source\": \"https://houtai.baidu.com/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4&waiSeconds=1\",\n \"value\": \"a,b\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Chained-Select.md', function(require, exports, modul
"label": "Chained-Select",
"fragment": "chained-select",
"fullPath": "#chained-select",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Checkbox.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"checkbox\" href=\"#checkbox\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkbox</h3><p>勾选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkbox</code></li>\n<li><code>option</code> 选项说明</li>\n<li><code>trueValue</code> 默认 <code>true</code></li>\n<li><code>falseValue</code> 默认 <code>false</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"name\": \"checkbox\",\n \"type\": \"checkbox\",\n \"label\": \"Checkbox\",\n \"option\": \"选项说明\"\n}\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"checkbox\" href=\"#checkbox\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkbox</h2><p>勾选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkbox</code></li>\n<li><code>option</code> 选项说明</li>\n<li><code>trueValue</code> 默认 <code>true</code></li>\n<li><code>falseValue</code> 默认 <code>false</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"name\": \"checkbox\",\n \"type\": \"checkbox\",\n \"label\": \"Checkbox\",\n \"option\": \"选项说明\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Checkbox.md', function(require, exports, module) {
"label": "Checkbox",
"fragment": "checkbox",
"fullPath": "#checkbox",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Checkboxes.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"checkboxes\" href=\"#checkboxes\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkboxes</h3><p>复选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkboxes</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>joinValues</code> 默认为 <code>true</code> 选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>columnsCount</code> 默认为 <code>1</code> 可以配置成一行显示多个。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 530px\"><script type=\"text/schema\" height=\"530\" scope=\"form\">[\n {\n \"name\": \"checkboxes\",\n \"type\": \"checkboxes\",\n \"label\": \"Checkboxes\",\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"checkboxes\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"checkboxes\" href=\"#checkboxes\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Checkboxes</h2><p>复选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>checkboxes</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>joinValues</code> 默认为 <code>true</code> 选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>columnsCount</code> 默认为 <code>1</code> 可以配置成一行显示多个。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 530px\"><script type=\"text/schema\" height=\"530\" scope=\"form\">[\n {\n \"name\": \"checkboxes\",\n \"type\": \"checkboxes\",\n \"label\": \"Checkboxes\",\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"checkboxes\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Checkboxes.md', function(require, exports, module) {
"label": "Checkboxes",
"fragment": "checkboxes",
"fullPath": "#checkboxes",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/City.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"city\" href=\"#city\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>City</h3><p>城市选择器,可用于让用户输入城市。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>city</code></li>\n<li><code>allowDistrict</code> 默认 <code>true</code> 允许输入区域</li>\n<li><code>allowCity</code> 默认 <code>true</code> 允许输入城市</li>\n<li><code>extractValue</code> 默认 <code>true</code> 是否抽取值,如果设置成 <code>false</code> 值格式会变成对象,包含 <code>code</code>、<code>province</code>、<code>city</code> 和 <code>district</code> 文字信息。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>从配置项可以看出来,通过设置 <code>allowDistrict</code> 和 <code>allowCity</code> 是可以限制用户输入级别的,比如只选择省份。</p>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\",\n \"allowDistrict\": false,\n \"allowCity\": false\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>从上面的栗子可以看出来,值默认格式是编码(即 <code>code</code>),如果你想要详细点的信息,可以把 <code>extractValue</code> 设置成 <code>false</code>。</p>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\",\n \"extractValue\": false\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"city\" href=\"#city\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>City</h2><p>城市选择器,可用于让用户输入城市。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>city</code></li>\n<li><code>allowDistrict</code> 默认 <code>true</code> 允许输入区域</li>\n<li><code>allowCity</code> 默认 <code>true</code> 允许输入城市</li>\n<li><code>extractValue</code> 默认 <code>true</code> 是否抽取值,如果设置成 <code>false</code> 值格式会变成对象,包含 <code>code</code>、<code>province</code>、<code>city</code> 和 <code>district</code> 文字信息。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>从配置项可以看出来,通过设置 <code>allowDistrict</code> 和 <code>allowCity</code> 是可以限制用户输入级别的,比如只选择省份。</p>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\",\n \"allowDistrict\": false,\n \"allowCity\": false\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>从上面的栗子可以看出来,值默认格式是编码(即 <code>code</code>),如果你想要详细点的信息,可以把 <code>extractValue</code> 设置成 <code>false</code>。</p>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"name\": \"city\",\n \"type\": \"city\",\n \"label\": \"城市选择\",\n \"extractValue\": false\n },\n\n {\n \"type\": \"static\",\n \"name\": \"city\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/City.md', function(require, exports, module) {
"label": "City",
"fragment": "city",
"fullPath": "#city",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Color.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"color\" href=\"#color\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Color</h3><p>颜色选择器。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>color</code></li>\n<li><code>format</code> 请选择 <code>hex</code>、<code>hls</code>、<code>rgb</code>或者<code>rgba</code>。默认为 <code>hex</code>。</li>\n<li><code>clearable</code> 是否显示清除按钮。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"color\",\n \"name\": \"color\",\n \"label\": \"颜色\"\n}\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"color\" href=\"#color\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Color</h2><p>颜色选择器。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>color</code></li>\n<li><code>format</code> 请选择 <code>hex</code>、<code>hls</code>、<code>rgb</code>或者<code>rgba</code>。默认为 <code>hex</code>。</li>\n<li><code>clearable</code> 是否显示清除按钮。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"color\",\n \"name\": \"color\",\n \"label\": \"颜色\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Color.md', function(require, exports, module) {
"label": "Color",
"fragment": "color",
"fullPath": "#color",
"level": 3
"level": 2
}
],
"level": 0

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Date-Range.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"date-range\" href=\"#date-range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date-Range</h3><p>日期范围类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date-range</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date-range\",\n \"name\": \"select\",\n \"label\": \"日期范围\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>考虑到大家都习惯用两个字段来存储,那么就用 date 来代替吧。</p>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n [\n {\n \"type\": \"date\",\n \"name\": \"start\",\n \"label\": \"开始日期\",\n \"maxDate\": \"$end\"\n },\n\n {\n \"type\": \"date\",\n \"name\": \"end\",\n \"label\": \"结束日期\",\n \"minDate\": \"$start\"\n }\n ],\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\",\n \"description\": \"包含开始日期和结束日期\",\n \"tpl\": \"$start - $end\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"date-range\" href=\"#date-range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date-Range</h2><p>日期范围类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date-range</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date-range\",\n \"name\": \"select\",\n \"label\": \"日期范围\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>考虑到大家都习惯用两个字段来存储,那么就用 date 来代替吧。</p>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n [\n {\n \"type\": \"date\",\n \"name\": \"start\",\n \"label\": \"开始日期\",\n \"maxDate\": \"$end\"\n },\n\n {\n \"type\": \"date\",\n \"name\": \"end\",\n \"label\": \"结束日期\",\n \"minDate\": \"$start\"\n }\n ],\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\",\n \"description\": \"包含开始日期和结束日期\",\n \"tpl\": \"$start - $end\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Date-Range.md', function(require, exports, module) {
"label": "Date-Range",
"fragment": "date-range",
"fullPath": "#date-range",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Date.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"date\" href=\"#date\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date</h3><p>日期类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"date\" href=\"#date\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Date</h2><p>日期类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>date</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"date\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
@ -10,7 +10,7 @@ define('docs/renderers/Form/Date.md', function(require, exports, module) {
"label": "Date",
"fragment": "date",
"fullPath": "#date",
"level": 3
"level": 2
}
],
"level": 0

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Datetime.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"datetime\" href=\"#datetime\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Datetime</h3><p>日期时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>datetime</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD HH:mm:ss</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">https://github.com/YouCanBookMe/react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"datetime\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"datetime\" href=\"#datetime\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Datetime</h3><p>日期时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>datetime</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>YYYY-MM-DD HH:mm:ss</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>maxDate</code> 限制最小日期,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"datetime\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Panel.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"panel-formitem-\" href=\"#panel-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Panel(FormItem)</h3><p>还是为了布局,可以把一部分 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a> 合并到一个 panel 里面单独展示。</p>\n<ul>\n<li><code>title</code> panel 标题</li>\n<li><code>body</code> <a href=\"#/docs/renderers/Form/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>bodyClassName</code> body 的 className.</li>\n<li><code>footer</code> <a href=\"#/docs/renderers/Form/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>footerClassName</code> footer 的 className.</li>\n<li><code>controls</code> 跟 <code>body</code> 二选一,如果设置了 controls 优先显示表单集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text\"\n }\n ]\n },\n\n {\n \"columnClassName\": \"w-xl\",\n \"controls\": [\n {\n \"type\": \"panel\",\n \"title\": \"bla bla\",\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 1\"\n },\n\n {\n \"name\": \"text2\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 2\"\n }\n ]\n }\n ]\n }\n ]\n}\n\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"panel-formitem-\" href=\"#panel-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Panel(FormItem)</h3><p>还是为了布局,可以把一部分 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a> 合并到一个 panel 里面单独展示。</p>\n<ul>\n<li><code>title</code> panel 标题</li>\n<li><code>body</code> <a href=\"#/docs/renderers/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>bodyClassName</code> body 的 className.</li>\n<li><code>footer</code> <a href=\"#/docs/renderers/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>footerClassName</code> footer 的 className.</li>\n<li><code>controls</code> 跟 <code>body</code> 二选一,如果设置了 controls 优先显示表单集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text\"\n }\n ]\n },\n\n {\n \"columnClassName\": \"w-xl\",\n \"controls\": [\n {\n \"type\": \"panel\",\n \"title\": \"bla bla\",\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 1\"\n },\n\n {\n \"name\": \"text2\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 2\"\n }\n ]\n }\n ]\n }\n ]\n}\n\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Range.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"range\" href=\"#range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Range</h3><p>范围输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>range</code></li>\n<li><code>min</code> 最小值</li>\n<li><code>max</code> 最大值</li>\n<li><code>step</code> 步长</li>\n<li><code>multiple</code> 支持选择范围,默认为<code>false</code></li>\n<li><code>joinValuse</code> 默认为 <code>true</code>,选择的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以<code>{min: 1, max: 100}</code>的形式提交,开启<code>multiple</code>时有效</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"range\",\n \"name\": \"range\",\n \"label\": \"数字范围\",\n \"min\": 0,\n \"max\": 20,\n \"step\": 2\n}\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"range\" href=\"#range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Range</h3><p>范围输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>range</code></li>\n<li><code>min</code> 最小值</li>\n<li><code>max</code> 最大值</li>\n<li><code>step</code> 步长</li>\n<li><code>multiple</code> 支持选择范围,默认为<code>false</code></li>\n<li><code>joinValuse</code> 默认为 <code>true</code>,选择的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以<code>{min: 1, max: 100}</code>的形式提交,开启<code>multiple</code>时有效</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"range\",\n \"name\": \"range\",\n \"label\": \"数字范围\",\n \"min\": 0,\n \"max\": 20,\n \"step\": 2\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
define('docs/renderers/Form/Time.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"time\" href=\"#time\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Time</h3><p>时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>time</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">https://github.com/YouCanBookMe/react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"time\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"time\" href=\"#time\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Time</h3><p>时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>time</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"time\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-Button-Group.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"button-group-formitem-\" href=\"#button-group-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Button-Group(FormItem)</h3><p>按钮集合,直接看示例吧。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>button-group</code></li>\n<li><code>buttons</code> 配置按钮集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form\">[\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Text\"\n },\n\n {\n \"type\": \"button-toolbar\",\n \"buttons\": [\n {\n \"type\": \"button-group\",\n \"buttons\": [\n {\n \"type\": \"button\",\n \"label\": \"Button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"confirmMode\": false,\n \"title\": \"提示\",\n \"body\": \"对,你刚点击了!\"\n }\n },\n\n {\n \"type\": \"submit\",\n \"label\": \"Submit\"\n },\n\n {\n \"type\": \"reset\",\n \"label\": \"Reset\"\n }\n ]\n },\n\n {\n \"type\": \"submit\",\n \"icon\": \"fa fa-check text-success\"\n },\n\n {\n \"type\": \"reset\",\n \"icon\": \"fa fa-times text-danger\"\n }\n ]\n }\n]\n</script></div>\n<p>button-group 有两种模式,除了能让按钮组合在一起,还能做类似于单选功能。</p>\n<p>当不配置 buttons 属性时,就可以当复选框用。</p>\n<ul>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n<li><code>image</code> 图片的 http 地址。</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>clearable</code> 默认为 <code>true</code>, 表示可以取消选中。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"button-group\",\n \"name\": \"select\",\n \"label\": \"单选\",\n \"options\": [\n {\n \"label\": \"Option A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"Option B\",\n \"value\": \"b\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Button-Group(FormItem)",
"fragment": "button-group-formitem-",
"fullPath": "#button-group-formitem-",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-Grid.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"grid-formitem-\" href=\"#grid-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Grid(FormItem)</h3><p>支持 form 内部再用 grid 布局。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>grid</code></li>\n<li><code>columns</code> 数据,用来配置列内容。每个 column 又一个独立的渲染器。</li>\n<li><code>columns[x].columnClassName</code> 配置列的 <code>className</code>。</li>\n<li><code>columns[x].controls</code> 如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合。</li>\n<li><code>columns[x].xs</code> 设置极小屏幕宽度占比 1 - 12。</li>\n<li><code>columns[x].xsHidden</code> 设置极小屏幕是否隐藏。</li>\n<li><code>columns[x].xsOffset</code> 设置极小屏幕偏移量 1 - 12。</li>\n<li><code>columns[x].xsPull</code> 设置极小屏幕靠左的距离占比1 - 12 。</li>\n<li><code>columns[x].xsPush</code> 设置极小屏幕靠右的距离占比1 - 12 。</li>\n<li><code>columns[x].sm</code> 设置小屏幕宽度占比 1 - 12。</li>\n<li><code>columns[x].smHidden</code> 设置小屏幕是否隐藏。</li>\n<li><code>columns[x].smOffset</code> 设置小屏幕偏移量 1 - 12。</li>\n<li><code>columns[x].smPull</code> 设置小屏幕靠左的距离占比1 - 12 。</li>\n<li><code>columns[x].smPush</code> 设置小屏幕靠右的距离占比1 - 12 。</li>\n<li><code>columns[x].md</code> 设置平板屏幕宽度占比 1 - 12。</li>\n<li><code>columns[x].mdHidden</code> 设置平板屏幕是否隐藏。</li>\n<li><code>columns[x].mdOffset</code> 设置平板屏幕偏移量 1 - 12。</li>\n<li><code>columns[x].mdPull</code> 设置平板屏幕靠左的距离占比1 - 12 。</li>\n<li><code>columns[x].mdPush</code> 设置平板屏幕靠右的距离占比1 - 12 。</li>\n<li><code>columns[x].lg</code> 设置 PC 屏幕宽度占比 1 - 12。</li>\n<li><code>columns[x].lgHidden</code> 设置 PC 屏幕是否隐藏。</li>\n<li><code>columns[x].lgOffset</code> 设置 PC 屏幕偏移量 1 - 12。</li>\n<li><code>columns[x].lgPull</code> 设置 PC 屏幕靠左的距离占比1 - 12 。</li>\n<li><code>columns[x].lgPush</code> 设置 PC 屏幕靠右的距离占比1 - 12 。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"grid\",\n \"columns\": [\n {\n \"md\": 3,\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text\"\n }\n ]\n },\n\n {\n \"md\": 9,\n \"type\": \"tpl\",\n \"tpl\": \"其他渲染器类型\"\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Grid(FormItem)",
"fragment": "grid-formitem-",
"fullPath": "#grid-formitem-",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-HBox.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"hbox-formitem-\" href=\"#hbox-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>HBox(FormItem)</h3><p>支持 form 内部再用 HBox 布局,实现左右排列。没错用 <a href=\"#/docs/renderers/Group\">Group</a> 也能实现,所以还是推荐用 <a href=\"#/docs/renderers/Group\">Group</a>。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>hbox</code></li>\n<li><code>columns</code> 数据,用来配置列内容。每个 column 又一个独立的渲染器。</li>\n<li><code>columns[x].columnClassName</code> 配置列的 <code>className</code>。</li>\n<li><code>columns[x].controls</code> 如果配置了表单集合,同时没有指定 type 类型,则优先展示表单集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"columnClassName\": \"w-sm\",\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text\"\n }\n ]\n },\n\n {\n \"type\": \"tpl\",\n \"tpl\": \"其他类型的渲染器\"\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "HBox(FormItem)",
"fragment": "hbox-formitem-",
"fullPath": "#hbox-formitem-",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-List.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"list-formitem-\" href=\"#list-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>List(FormItem)</h3><p>简单的列表选择框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>list</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n<li><code>image</code> 图片的 http 地址。</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>clearable</code> 默认为 <code>true</code>, 表示可以取消选中。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<p>单选</p>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"list\",\n \"name\": \"select\",\n \"label\": \"单选\",\n \"clearable\": true,\n \"options\": [\n {\n \"label\": \"Option A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"Option B\",\n \"value\": \"b\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>多选</p>\n<div class=\"amis-preview\" style=\"height: 480px\"><script type=\"text/schema\" height=\"480\" scope=\"form\">[\n {\n \"type\": \"list\",\n \"name\": \"select\",\n \"label\": \"多选\",\n \"clearable\": true,\n \"multiple\": true,\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>选项带图片</p>\n<div class=\"amis-preview\" style=\"height: 480px\"><script type=\"text/schema\" height=\"480\" scope=\"form\">[\n {\n \"type\": \"list\",\n \"name\": \"select\",\n \"label\": \"图片\",\n \"clearable\": true,\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\",\n \"image\": \"raw:https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\",\n \"image\": \"raw:https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\",\n \"image\": \"raw:https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\",\n \"image\": \"raw:https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "List(FormItem)",
"fragment": "list-formitem-",
"fullPath": "#list-formitem-",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-Panel.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"panel-formitem-\" href=\"#panel-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Panel(FormItem)</h3><p>还是为了布局,可以把一部分 <a href=\"#/docs/renderers/FormItem\">FormItem</a> 合并到一个 panel 里面单独展示。</p>\n<ul>\n<li><code>title</code> panel 标题</li>\n<li><code>body</code> <a href=\"#/docs/renderers/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>bodyClassName</code> body 的 className.</li>\n<li><code>footer</code> <a href=\"#/docs/renderers/Types#container\">Container</a> 可以是其他渲染模型。</li>\n<li><code>footerClassName</code> footer 的 className.</li>\n<li><code>controls</code> 跟 <code>body</code> 二选一,如果设置了 controls 优先显示表单集合。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text\"\n }\n ]\n },\n\n {\n \"columnClassName\": \"w-xl\",\n \"controls\": [\n {\n \"type\": \"panel\",\n \"title\": \"bla bla\",\n \"controls\": [\n {\n \"name\": \"text\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 1\"\n },\n\n {\n \"name\": \"text2\",\n \"type\": \"text\",\n \"label\": false,\n \"placeholder\": \"Text 2\"\n }\n ]\n }\n ]\n }\n ]\n}\n\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Panel(FormItem)",
"fragment": "panel-formitem-",
"fullPath": "#panel-formitem-",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-Service.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"service-formitem-\" href=\"#service-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Service(FormItem)</h3><p>目前看到的配置方式都是静态配置,如果你想动态配置,即配置项由接口决定,那么就使用此渲染器。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>service</code>。</li>\n<li><code>api</code> 数据接口</li>\n<li><code>initFetch</code> 初始是否拉取</li>\n<li><p><code>schemaApi</code> 配置接口,即由接口返回内容区的配置信息。\n正常期待返回是一个渲染器的配置如</p>\n<pre><code class=\"lang-json\">{\n <span class=\"hljs-attr\">\"type\"</span>: <span class=\"hljs-string\">\"tpl\"</span>,\n <span class=\"hljs-attr\">\"tpl\"</span>: <span class=\"hljs-string\">\"这是内容。\"</span>\n}\n</code></pre>\n<p>但是,由于是在 form 里面,支持返回</p>\n<pre><code class=\"lang-json\">{\n <span class=\"hljs-attr\">\"controls\"</span>: [\n // 表单项配置\n ]\n}\n</code></pre>\n</li>\n<li><p><code>initFetchSchema</code> 是否初始拉取配置接口。</p>\n</li>\n<li><code>name</code> 取个名字方便别的组件与之交互。比如某个按钮的 target 设置成次 name, 则会触发重新拉取。</li>\n<li><code>body</code> 内容容器,如果配置 schemaApi 则不需要配置,否则不配置的话,就没有内容展现。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form\">[\n {\n \"name\": \"tpl\",\n \"type\": \"select\",\n \"label\": \"模板\",\n \"inline\": true,\n \"required\": true,\n \"value\": \"tpl1\",\n \"options\": [\n {\n \"label\": \"模板1\",\n \"value\": \"tpl1\"\n },\n {\n \"label\": \"模板2\",\n \"value\": \"tpl2\"\n },\n {\n \"label\": \"模板3\",\n \"value\": \"tpl3\"\n }\n ]\n },\n {\n \"type\": \"service\",\n \"className\": \"m-t\",\n \"initFetchSchemaOn\": \"data.tpl\",\n \"schemaApi\": \"https://houtai.baidu.com/api/mock2/service/form?tpl=$tpl\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Service(FormItem)",
"fragment": "service-formitem-",
"fullPath": "#service-formitem-",
"level": 3
}
],
"level": 0
}
};
});

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
define('docs/renderers/FormItem-Tabs.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"tabs-formitem-\" href=\"#tabs-formitem-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Tabs(FormItem)</h3><p>多个输入框也可以通过选项卡来分组。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>tabs</code></li>\n<li><code>tabs</code> 选项卡数组</li>\n<li><code>tabs[x].title</code> 标题</li>\n<li><code>tabs[x].controls</code> 表单项集合。</li>\n<li><code>tabs[x].body</code> 内容容器,跟 <code>controls</code> 二选一。</li>\n<li><code>tabClassName</code> 选项卡 CSS 类名。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 700px\"><script type=\"text/schema\" height=\"700\" scope=\"form-item\">{\n \"type\": \"tabs\",\n \"tabs\": [\n {\n \"title\": \"基本配置\",\n \"controls\": [\n {\n \"name\": \"a\",\n \"type\": \"text\",\n \"label\": \"文本1\"\n },\n\n {\n \"name\": \"a\",\n \"type\": \"text\",\n \"label\": \"文本2\"\n }\n ]\n },\n\n {\n \"title\": \"其他配置\",\n \"controls\": [\n {\n \"name\": \"c\",\n \"type\": \"text\",\n \"label\": \"文本3\"\n },\n\n {\n \"name\": \"d\",\n \"type\": \"text\",\n \"label\": \"文本4\"\n }\n ]\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Tabs(FormItem)",
"fragment": "tabs-formitem-",
"fullPath": "#tabs-formitem-",
"level": 3
}
],
"level": 0
}
};
});

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
define('docs/renderers/Formula.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"formula\" href=\"#formula\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Formula</h3><p>公式类型,可以设置公式,并将结果设置给目标值。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>formula</code></li>\n<li><code>name</code> 这是变量名,公式结果将作用到此处指定的变量中去。</li>\n<li><code>formula</code> 公式。如: <code>data.var_a + 2</code>,其实就是 JS 表达式。</li>\n<li><code>condition</code> 作用条件。有两种写法<ul>\n<li>用 tpl 语法,把关联的字段写上如: <code>${xxx} ${yyy}</code> 意思是当 xxx 和 yyy 的取值结果变化了就再应用一次公式结果。</li>\n<li>自己写判断如: <code>data.xxx == &quot;a&quot; &amp;&amp; data.xxx !== data.__prev.xxx</code> 当 xxx 变化了,且新的值是字符 &quot;a&quot; 时应用,可以写更加复杂的判断。</li>\n</ul>\n</li>\n<li><code>initSet</code> 初始化时是否设置。默认是 <code>true</code></li>\n<li><code>autoSet</code> 观察公式结果,如果计算结果有变化,则自动应用到变量上。默认为 <code>true</code>。</li>\n<li><code>id</code> 定义个名字,当某个按钮的目标指定为此值后,会触发一次公式应用。这个机制可以在 <code>autoSet</code> 为 false 时用来手动触发。<blockquote>\n<p>为什么不是设置 <code>name</code>?\n因为 name 值已经用来设置目标变量名了,这个表单项肯定已经存在了,所以不是唯一了,不能够被按钮指定。</p>\n</blockquote>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form\">[\n {\n \"type\": \"number\",\n \"name\": \"a\",\n \"label\": \"A\"\n },\n {\n \"type\": \"number\",\n \"name\": \"b\",\n \"label\": \"B\"\n },\n {\n \"type\": \"number\",\n \"name\": \"sum\",\n \"label\": \"和\",\n \"disabled\": true,\n \"description\": \"自动计算 A + B\"\n },\n {\n \"type\": \"formula\",\n \"name\": \"sum\",\n \"value\": 0,\n \"formula\": \"a + b\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Formula",
"fragment": "formula",
"fullPath": "#formula",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Group.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"group\" href=\"#group\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Group</h3><p>表单项集合中,默认都是一行一个,如果想要一行多个,请用 Group 包裹起来。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>group</code></li>\n<li><code>controls</code> 表单项集合。</li>\n<li><code>mode</code> 展示默认,跟 <a href=\"#/docs/renderers/Form\">Form</a> 中的模式一样,选择: <code>normal</code>、<code>horizontal</code>或者<code>inline</code>。</li>\n<li><code>horizontal</code> 当为水平模式时,用来控制左右占比。</li>\n<li><code>horizontal.label</code> 左边 label 的宽度占比。</li>\n<li><code>horizontal.right</code> 右边控制器的宽度占比。</li>\n<li><code>horizontal.offset</code> 当没有设置 label 时,右边控制器的偏移量。</li>\n<li><code>className</code> CSS 类名。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 560px\"><script type=\"text/schema\" height=\"560\" scope=\"body\">{\n \"type\": \"form\",\n \"name\": \"sample2\",\n \"controls\": [\n {\n \"type\": \"text\",\n \"name\": \"test\",\n \"label\": \"Label\",\n \"placeholder\": \"Placeholder\"\n },\n\n {\n \"type\": \"divider\"\n },\n\n {\n \"type\": \"group\",\n \"controls\": [\n {\n \"type\": \"text\",\n \"name\": \"test1\",\n \"label\": \"Label\",\n \"placeholder\": \"Placeholder\"\n },\n\n {\n \"type\": \"text\",\n \"name\": \"test2\",\n \"label\": \"Label\",\n \"placeholder\": \"Placeholder\"\n }\n ]\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Group",
"fragment": "group",
"fullPath": "#group",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Hidden.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"hidden\" href=\"#hidden\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Hidden</h3><p>隐藏字段类型,默认表单提交,只会发送 controls 里面的这些成员,对于隐藏的字段同时又希望提交表单的时候带过去,请把表单项配置成 <code>hidden</code> 类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>hidden</code></li>\n</ul>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Hidden",
"fragment": "hidden",
"fullPath": "#hidden",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Image.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"image\" href=\"#image\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Image</h3><p>图片格式输入,默认 amis 会直接存储在 FEX 的 hiphoto 里面,提交到 form 是直接的图片 url。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>image</code></li>\n<li><code>reciever</code> 默认 <code>/api/upload</code> 如果想自己存储,请设置此选项。</li>\n<li><code>multiple</code> 是否多选。</li>\n<li><code>maxLength</code> 默认没有限制,当设置后,一次只允许上传指定数量文件。</li>\n<li><code>joinValues</code> 多选时是否将多个值用 <code>delimiter</code> 连接起来。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 连接符,默认是 <code>,</code>, 多选时且 <code>joinValues</code> 为 <code>true</code> 时用来连接值。</li>\n<li><code>autoUpload</code> 是否选择完就自动开始上传?默认为 <code>true</code></li>\n<li><code>compress</code> 默认 <code>true</code> 如果想默认压缩请开启。</li>\n<li><code>compressOptions</code><ul>\n<li><code>maxWidth</code> 设置最大宽度。</li>\n<li><code>maxHeight</code> 设置最大高度。</li>\n</ul>\n</li>\n<li><code>showCompressOptions</code> 默认为 false, 开启后,允许用户输入压缩选项。</li>\n<li><code>crop</code> 用来设置是否支持裁剪。<ul>\n<li><code>aspectRatio</code> 浮点型,默认 <code>1</code> 即 <code>1:1</code>,如果要设置 <code>16:9</code> 请设置 <code>1.7777777777777777</code> 即 <code>16 / 9</code>。</li>\n</ul>\n</li>\n<li><code>allowInput</code> 默认都是通过用户选择图片后上传返回图片地址,如果开启此选项,则可以允许用户图片地址。</li>\n<li><code>limit</code> 限制图片大小,超出不让上传。<ul>\n<li><code>width</code> 限制图片宽度。</li>\n<li><code>height</code> 限制图片高度。</li>\n<li><code>minWidth</code> 限制图片最小宽度。</li>\n<li><code>minHeight</code> 限制图片最小高度。</li>\n<li><code>maxWidth</code> 限制图片最大宽度。</li>\n<li><code>maxHeight</code> 限制图片最大高度。</li>\n</ul>\n</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form-item\">{\n \"type\": \"image\",\n \"name\": \"image\",\n \"label\": \"Images\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Image",
"fragment": "image",
"fullPath": "#image",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,7 +1,7 @@
define('docs/renderers/List.md', function(require, exports, module) {
module.exports = {
"html": "<h2><a class=\"anchor\" name=\"list\" href=\"#list\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>List</h2><p>列表展示。</p>\n<table>\n<thead>\n<tr>\n<th>属性名</th>\n<th>类型</th>\n<th>默认值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td><code>string</code></td>\n<td></td>\n<td><code>&quot;list&quot;</code> 指定为列表展示。</td>\n</tr>\n<tr>\n<td>title</td>\n<td><code>string</code></td>\n<td></td>\n<td>标题</td>\n</tr>\n<tr>\n<td>source</td>\n<td><code>string</code></td>\n<td><code>${items}</code></td>\n<td>数据源, 绑定当前环境变量</td>\n</tr>\n<tr>\n<td>placeholder</td>\n<td>string</td>\n<td>‘暂无数据’</td>\n<td>当没数据的时候的文字提示</td>\n</tr>\n<tr>\n<td>className</td>\n<td><code>string</code></td>\n<td></td>\n<td>外层 CSS 类名</td>\n</tr>\n<tr>\n<td>headerClassName</td>\n<td><code>string</code></td>\n<td><code>amis-list-header</code></td>\n<td>顶部外层 CSS 类名</td>\n</tr>\n<tr>\n<td>footerClassName</td>\n<td><code>string</code></td>\n<td><code>amis-list-footer</code></td>\n<td>底部外层 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem</td>\n<td><code>Array</code></td>\n<td></td>\n<td>配置单条信息</td>\n</tr>\n<tr>\n<td>listItem.title</td>\n<td><code>string</code></td>\n<td></td>\n<td>标题,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.titleClassName</td>\n<td><code>string</code></td>\n<td><code>h5</code></td>\n<td>标题 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem.subTitle</td>\n<td><code>string</code></td>\n<td></td>\n<td>副标题,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.avatar</td>\n<td><code>string</code></td>\n<td></td>\n<td>图片地址,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.avatarClassName</td>\n<td><code>string</code></td>\n<td><code>thumb-sm avatar m-r</code></td>\n<td>图片 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem.desc</td>\n<td><code>string</code></td>\n<td></td>\n<td>描述,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.body</td>\n<td><code>Array</code> 或者 <a href=\"#/docs/renderers/Field\">Field</a></td>\n<td></td>\n<td>内容容器,主要用来放置 <a href=\"#/docs/renderers/Field\">Field</a></td>\n</tr>\n<tr>\n<td>listItem.actions</td>\n<td>Array Of <a href=\"#/docs/renderers/Button\">Button</a></td>\n<td></td>\n<td>按钮区域</td>\n</tr>\n</tbody>\n</table>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"body\">{\n \"type\": \"service\",\n \"api\": \"https://houtai.baidu.com/api/sample?perPage=5\",\n \"body\": [\n {\n \"type\": \"panel\",\n \"title\": \"简单 List 示例\",\n \"body\": {\n \"type\": \"list\",\n \"source\": \"$rows\",\n \"listItem\": {\n \"body\": [\n {\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"label\": \"Engine\",\n \"name\": \"engine\"\n },\n\n {\n \"name\": \"version\",\n \"label\": \"Version\"\n }\n ]\n }\n ],\n\n \"actions\": [\n {\n \"type\": \"button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-eye\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"查看详情\",\n \"body\": {\n \"type\": \"form\",\n \"controls\": [\n {\n \"label\": \"Engine\",\n \"name\": \"engine\",\n \"type\": \"static\"\n },\n\n {\n \"name\": \"version\",\n \"label\": \"Version\",\n \"type\": \"static\"\n }\n ]\n }\n }\n }\n ]\n }\n }\n }\n ]\n}\n</script></div>\n",
"html": "<h2><a class=\"anchor\" name=\"list\" href=\"#list\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>List</h2><p>列表展示。</p>\n<table>\n<thead>\n<tr>\n<th>属性名</th>\n<th>类型</th>\n<th>默认值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td><code>string</code></td>\n<td></td>\n<td><code>&quot;list&quot;</code> 指定为列表展示。</td>\n</tr>\n<tr>\n<td>title</td>\n<td><code>string</code></td>\n<td></td>\n<td>标题</td>\n</tr>\n<tr>\n<td>source</td>\n<td><code>string</code></td>\n<td><code>${items}</code></td>\n<td>数据源, 绑定当前环境变量</td>\n</tr>\n<tr>\n<td>placeholder</td>\n<td>string</td>\n<td>‘暂无数据’</td>\n<td>当没数据的时候的文字提示</td>\n</tr>\n<tr>\n<td>className</td>\n<td><code>string</code></td>\n<td></td>\n<td>外层 CSS 类名</td>\n</tr>\n<tr>\n<td>headerClassName</td>\n<td><code>string</code></td>\n<td><code>amis-list-header</code></td>\n<td>顶部外层 CSS 类名</td>\n</tr>\n<tr>\n<td>footerClassName</td>\n<td><code>string</code></td>\n<td><code>amis-list-footer</code></td>\n<td>底部外层 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem</td>\n<td><code>Array</code></td>\n<td></td>\n<td>配置单条信息</td>\n</tr>\n<tr>\n<td>listItem.title</td>\n<td><code>string</code></td>\n<td></td>\n<td>标题,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.titleClassName</td>\n<td><code>string</code></td>\n<td><code>h5</code></td>\n<td>标题 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem.subTitle</td>\n<td><code>string</code></td>\n<td></td>\n<td>副标题,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.avatar</td>\n<td><code>string</code></td>\n<td></td>\n<td>图片地址,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.avatarClassName</td>\n<td><code>string</code></td>\n<td><code>thumb-sm avatar m-r</code></td>\n<td>图片 CSS 类名</td>\n</tr>\n<tr>\n<td>listItem.desc</td>\n<td><code>string</code></td>\n<td></td>\n<td>描述,支持模板语法如: \\${xxx}</td>\n</tr>\n<tr>\n<td>listItem.body</td>\n<td><code>Array</code> 或者 <a href=\"#/docs/renderers/Field\">Field</a></td>\n<td></td>\n<td>内容容器,主要用来放置 <a href=\"#/docs/renderers/Field\">Field</a></td>\n</tr>\n<tr>\n<td>listItem.actions</td>\n<td>Array Of <a href=\"#/docs/renderers/Form/Button\">Button</a></td>\n<td></td>\n<td>按钮区域</td>\n</tr>\n</tbody>\n</table>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"body\">{\n \"type\": \"service\",\n \"api\": \"https://houtai.baidu.com/api/sample?perPage=5\",\n \"body\": [\n {\n \"type\": \"panel\",\n \"title\": \"简单 List 示例\",\n \"body\": {\n \"type\": \"list\",\n \"source\": \"$rows\",\n \"listItem\": {\n \"body\": [\n {\n \"type\": \"hbox\",\n \"columns\": [\n {\n \"label\": \"Engine\",\n \"name\": \"engine\"\n },\n\n {\n \"name\": \"version\",\n \"label\": \"Version\"\n }\n ]\n }\n ],\n\n \"actions\": [\n {\n \"type\": \"button\",\n \"level\": \"link\",\n \"icon\": \"fa fa-eye\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"查看详情\",\n \"body\": {\n \"type\": \"form\",\n \"controls\": [\n {\n \"label\": \"Engine\",\n \"name\": \"engine\",\n \"type\": \"static\"\n },\n\n {\n \"name\": \"version\",\n \"label\": \"Version\",\n \"type\": \"static\"\n }\n ]\n }\n }\n }\n ]\n }\n }\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

View File

@ -1,20 +0,0 @@
define('docs/renderers/Matrix.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"matrix\" href=\"#matrix\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Matrix</h3><p>矩阵类型的输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>matrix</code></li>\n<li><code>columns</code> 列信息, 数组中 <code>label</code> 字段是必须给出的</li>\n<li><code>rows</code> 行信息, 数组中 <code>label</code> 字段是必须给出的</li>\n<li><code>rowLabel</code> 行标题说明</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form-item\">{\n \"type\": \"matrix\",\n \"name\": \"matrix\",\n \"label\": \"Matrix\",\n \"rowLabel\": \"行标题说明\",\n \"columns\": [\n {\n \"label\": \"列1\"\n },\n {\n \"label\": \"列2\"\n }\n ],\n \"rows\": [\n {\n \"label\": \"行1\"\n },\n {\n \"label\": \"行2\"\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Matrix",
"fragment": "matrix",
"fullPath": "#matrix",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/NestedSelect.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"nestedselect\" href=\"#nestedselect\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>NestedSelect</h3><p>树形结构选择框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>nested-select</code></li>\n<li><code>options</code> 类似于 <a href=\"#/docs/renderers/Select\">select</a> 中 <code>options</code>, 并且支持通过 <code>children</code> 无限嵌套。</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"type\": \"nested-select\",\n \"name\": \"nestedSelect\",\n \"label\": \"级联选择器\",\n \"size\": \"sm\",\n \"options\": [\n {\n \"label\": \"A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"B\",\n \"value\": \"b\",\n \"children\": [\n {\n \"label\": \"B-1\",\n \"value\": \"b-1\"\n },\n {\n \"label\": \"B-2\",\n \"value\": \"b-2\"\n },\n {\n \"label\": \"B-3\",\n \"value\": \"b-3\"\n }\n ]\n },\n {\n \"label\": \"C\",\n \"value\": \"c\"\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "NestedSelect",
"fragment": "nestedselect",
"fullPath": "#nestedselect",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Number.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"number\" href=\"#number\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Number</h3><p>数字输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>number</code></li>\n<li><code>min</code> 最小值,支持用<code>${xxx}</code>获取变量</li>\n<li><code>max</code> 最大值,支持用<code>${xxx}</code>获取变量</li>\n<li><code>step</code> 步长</li>\n<li><code>precision</code> 精度</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"number\",\n \"name\": \"text\",\n \"label\": \"数字\",\n \"min\": 1,\n \"max\": 10,\n \"step\": 1\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Number",
"fragment": "number",
"fullPath": "#number",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Password.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"password\" href=\"#password\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Password</h3><p>密码输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>password</code></li>\n<li><code>addOn</code> 输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。</li>\n<li><code>addOn.type</code> 请选择 <code>text</code> 、<code>button</code> 或者 <code>submit</code>。</li>\n<li><code>addOn.label</code> 文字说明</li>\n<li><code>addOn.xxx</code> 其他参数请参考按钮配置部分。</li>\n<li><code>clearable</code> 在有值的时候是否显示一个删除图标在右侧。</li>\n<li><code>resetValue</code> 默认为 <code>&quot;&quot;</code>, 删除后设置此配置项给定的值。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Password",
"fragment": "password",
"fullPath": "#password",
"level": 3
}
],
"level": 0
}
};
});

File diff suppressed because one or more lines are too long

View File

@ -1,20 +0,0 @@
define('docs/renderers/Radios.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"radios\" href=\"#radios\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Radios</h3><p>单选框</p>\n<ul>\n<li><code>type</code> 请设置成 <code>radios</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>columnsCount</code> 默认为 <code>1</code> 可以配置成一行显示多个。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 530px\"><script type=\"text/schema\" height=\"530\" scope=\"form\">[\n {\n \"name\": \"radios\",\n \"type\": \"radios\",\n \"label\": \"Radios\",\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"radios\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Radios",
"fragment": "radios",
"fullPath": "#radios",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Range.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"range\" href=\"#range\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Range</h3><p>范围输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>range</code></li>\n<li><code>min</code> 最小值</li>\n<li><code>max</code> 最大值</li>\n<li><code>step</code> 步长</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form-item\">{\n \"type\": \"range\",\n \"name\": \"range\",\n \"label\": \"数字范围\",\n \"min\": 0,\n \"max\": 20,\n \"step\": 2\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Range",
"fragment": "range",
"fullPath": "#range",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Repeat.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"repeat\" href=\"#repeat\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Repeat</h3><p>可用来设置重复频率</p>\n<ul>\n<li><code>type</code> 请设置成 <code>repeat</code></li>\n<li><code>options</code> 默认: <code>hourly,daily,weekly,monthly</code> 可用配置 <code>secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly</code></li>\n<li><code>placeholder</code> 默认为 <code>不重复</code>, 当不指定值时的说明。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"type\": \"repeat\",\n \"name\": \"repeat\",\n \"label\": \"重复频率\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Repeat",
"fragment": "repeat",
"fullPath": "#repeat",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Rich-Text.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"rich-text\" href=\"#rich-text\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Rich-Text</h3><p>富文本编辑器</p>\n<ul>\n<li><code>type</code> 请设置成 <code>rich-text</code></li>\n<li><code>saveAsUbb</code> 是否保存为 ubb 格式</li>\n<li><code>reciever</code> 默认的图片保存 API <code>/api/upload/image</code></li>\n<li><code>size</code> 框的大小,可以设置成 <code>md</code> 或者 <code>lg</code> 来增大输入框。</li>\n<li><p><code>buttons</code> 默认为</p>\n<pre><code class=\"lang-js\">[\n <span class=\"hljs-symbol\">'paragraphFormat</span>',\n <span class=\"hljs-symbol\">'quote</span>',\n <span class=\"hljs-symbol\">'color</span>',\n '|',\n <span class=\"hljs-symbol\">'bold</span>',\n <span class=\"hljs-symbol\">'italic</span>',\n <span class=\"hljs-symbol\">'underline</span>',\n <span class=\"hljs-symbol\">'strikeThrough</span>',\n '|',\n <span class=\"hljs-symbol\">'formatOL</span>',\n <span class=\"hljs-symbol\">'formatUL</span>',\n <span class=\"hljs-symbol\">'align</span>',\n '|',\n <span class=\"hljs-symbol\">'insertLink</span>',\n <span class=\"hljs-symbol\">'insertImage</span>',\n <span class=\"hljs-symbol\">'insertTable</span>',\n '|',\n <span class=\"hljs-symbol\">'undo</span>',\n <span class=\"hljs-symbol\">'redo</span>',\n <span class=\"hljs-symbol\">'html</span>',\n]<span class=\"hljs-comment\">;</span>\n</code></pre>\n</li>\n<li><p><code>options</code> Object 类型,给富文本的配置信息。请参考 <a href=\"https://www.froala.com/wysiwyg-editor/docs/options\">https://www.froala.com/wysiwyg-editor/docs/options</a></p>\n</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 550px\"><script type=\"text/schema\" height=\"550\" scope=\"form-item\">{\n \"type\": \"rich-text\",\n \"name\": \"html\",\n \"label\": \"Rich Text\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Rich-Text",
"fragment": "rich-text",
"fullPath": "#rich-text",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Select.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"select\" href=\"#select\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Select</h3><p>选项表单。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>select</code></li>\n<li><code>options</code> 选项配置,类型为数组,成员格式如下。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。另外也可以用 <code>$xxxx</code> 来获取当前作用域中的变量。</li>\n<li><code>autoComplete</code> 跟 source 不同的是,每次用户输入都会去接口获取提示。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li><code>clearable</code> 默认为 <code>false</code>, 当设置为 <code>true</code> 时,已选中的选项右侧会有个小 <code>X</code> 用来取消设置。</li>\n<li><code>searchable</code> 默认为 <code>false</code>,表示可以通过输入部分内容检索出选项。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<p>单选</p>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"select\",\n \"name\": \"select\",\n \"label\": \"单选\",\n \"clearable\": true,\n \"options\": [\n {\n \"label\": \"Option A\",\n \"value\": \"a\"\n },\n {\n \"label\": \"Option B\",\n \"value\": \"b\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n<p>多选</p>\n<div class=\"amis-preview\" style=\"height: 480px\"><script type=\"text/schema\" height=\"480\" scope=\"form\">[\n {\n \"type\": \"select\",\n \"name\": \"select\",\n \"label\": \"多选\",\n \"clearable\": true,\n \"multiple\": true,\n \"options\": [\n {\n \"label\": \"OptionA\",\n \"value\": \"a\"\n },\n {\n \"label\": \"OptionB\",\n \"value\": \"b\"\n },\n {\n \"label\": \"OptionC\",\n \"value\": \"c\"\n },\n {\n \"label\": \"OptionD\",\n \"value\": \"d\"\n }\n ]\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Select",
"fragment": "select",
"fullPath": "#select",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/SubForm.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"subform\" href=\"#subform\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>SubForm</h3><p>formItem 还可以是子表单类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>form</code></li>\n<li><code>multiple</code> 默认为 <code>false</code> 配置是否为多选模式</li>\n<li><code>labelField</code> 当值中存在这个字段,则按钮名称将使用此字段的值来展示。</li>\n<li><code>btnLabel</code> 按钮默认名称</li>\n<li><code>minLength</code> 限制最小长度。</li>\n<li><code>maxLength</code> 限制最大长度。</li>\n<li><code>addButtonClassName</code> 新增按钮 CSS 类名 默认:<code>btn-success btn-sm</code>。</li>\n<li><code>editButtonClassName</code> 修改按钮 CSS 类名 默认:<code>btn-info btn-addon btn-sm</code>。</li>\n<li><code>form</code> 字表单的配置\n<code>title</code> 标题\n<code>controls</code> 请参考 <a href=\"#/docs/renderers/Form\">Form</a> 中的配置说明。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"form\">[\n{\n \"type\": \"form\",\n \"name\": \"form\",\n \"label\": \"子Form\",\n \"btnLabel\": \"设置子表单\",\n \"form\": {\n \"title\": \"配置子表单\",\n \"controls\": [\n {\n \"name\": \"a\",\n \"label\": \"A\",\n \"type\": \"text\"\n },\n\n {\n \"name\": \"b\",\n \"label\": \"B\",\n \"type\": \"text\"\n }\n ]\n }\n},\n{\n \"type\": \"static\",\n \"name\": \"form\",\n \"label\": \"当前值\"\n},\n{\n \"type\": \"form\",\n \"name\": \"form2\",\n \"label\": \"多选\",\n \"multiple\": true,\n \"maxLength\":3,\n \"btnLabel\": \"设置子表单\",\n \"form\": {\n \"title\": \"配置子表单\",\n \"controls\": [\n {\n \"name\": \"a\",\n \"label\": \"A\",\n \"type\": \"text\"\n },\n\n {\n \"name\": \"b\",\n \"label\": \"B\",\n \"type\": \"text\"\n }\n ]\n }\n},\n{\n \"type\": \"static\",\n \"name\": \"form2\",\n \"label\": \"当前值\"\n}\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "SubForm",
"fragment": "subform",
"fullPath": "#subform",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Switch.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"switch\" href=\"#switch\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Switch</h3><p>可选框,和 checkbox 完全等价。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>switch</code></li>\n<li><code>option</code> 选项说明</li>\n<li><code>trueValue</code> 默认 <code>true</code></li>\n<li><code>falseValue</code> 默认 <code>false</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"name\": \"switch\",\n \"type\": \"switch\",\n \"label\": \"Switch\",\n \"option\": \"开关说明\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Switch",
"fragment": "switch",
"fullPath": "#switch",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Text.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"text\" href=\"#text\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Text</h3><p>普通的文本输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>text</code></li>\n<li><code>addOn</code> 输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。</li>\n<li><code>addOn.type</code> 请选择 <code>text</code> 、<code>button</code> 或者 <code>submit</code>。</li>\n<li><code>addOn.label</code> 文字说明</li>\n<li><code>addOn.xxx</code> 其他参数请参考按钮配置部分。</li>\n<li><code>clearable</code> 在有值的时候是否显示一个删除图标在右侧。</li>\n<li><code>resetValue</code> 默认为 <code>&quot;&quot;</code>, 删除后设置此配置项给定的值。</li>\n<li><code>options</code> 可选,选项配置,类型为数组,成员格式如下,配置后用户输入内容时会作为选项提示辅助输入。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> 通过 options 只能配置静态数据,如果设置了 source 则会从接口拉取,实现动态效果。</li>\n<li><code>autoComplete</code> 跟 source 不同的是,每次用户输入都会去接口获取提示。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"text\",\n \"name\": \"text\",\n \"label\": \"文本\"\n}\n</script></div>\n<p>带提示功能</p>\n<div class=\"amis-preview\" style=\"height: 440px\"><script type=\"text/schema\" height=\"440\" scope=\"form-item\">{\n \"type\": \"text\",\n \"name\": \"text\",\n \"label\": \"文本\",\n \"clearable\": true,\n \"addOn\": {\n \"type\": \"submit\",\n \"icon\": \"fa fa-search\",\n \"level\": \"primary\"\n },\n \"options\": [\n \"wangzhaojun\",\n \"libai\",\n \"luna\",\n \"zhongkui\"\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Text",
"fragment": "text",
"fullPath": "#text",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Textarea.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"textarea\" href=\"#textarea\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Textarea</h3><p>多行文本输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>textarea</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"textarea\",\n \"name\": \"text\",\n \"label\": \"多行文本\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Textarea",
"fragment": "textarea",
"fullPath": "#textarea",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Time.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"time\" href=\"#time\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Time</h3><p>时间类型。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>time</code></li>\n<li><code>format</code> 默认 <code>X</code> 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.</li>\n<li><code>inputFormat</code> 默认 <code>HH:mm</code> 用来配置显示的时间格式。</li>\n<li><code>placeholder</code> 默认 <code>请选择日期</code></li>\n<li><code>timeConstraints</code> 请参考: <a href=\"https://github.com/YouCanBookMe/react-datetime\">https://github.com/YouCanBookMe/react-datetime</a></li>\n<li><code>value</code> 这里面 value 需要特殊说明一下,因为支持相对值。如:<ul>\n<li><code>-2mins</code> 2 分钟前</li>\n<li><code>+2days</code> 2 天后</li>\n<li><code>-10week</code> 十周前</li>\n</ul>\n</li>\n<li><code>minTime</code> 限制最小时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></li>\n<li><p><code>maxTime</code> 限制最大时间,可用 <code>${xxx}</code> 取值,或者输入相对时间,或者时间戳。如:<code>${start}</code>、<code>+3days</code>、<code>+3days+2hours</code>或者 <code>${start|default:-2days}+3days</code></p>\n<p>可用单位: <code>min</code>、<code>hour</code>、<code>day</code>、<code>week</code>、<code>month</code>、<code>year</code>。所有单位支持复数形式。</p>\n</li>\n<li><p>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></p>\n</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 450px\"><script type=\"text/schema\" height=\"450\" scope=\"form\">[\n {\n \"type\": \"time\",\n \"name\": \"select\",\n \"label\": \"日期\"\n },\n\n {\n \"type\": \"static\",\n \"name\": \"select\",\n \"label\": \"当前值\"\n }\n]\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Time",
"fragment": "time",
"fullPath": "#time",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Tree.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"tree\" href=\"#tree\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Tree</h3><p>树形结构输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>tree</code></li>\n<li><code>options</code> 类似于 <a href=\"#/docs/renderers/Select\">select</a> 中 <code>options</code>, 并且支持通过 <code>children</code> 无限嵌套。</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>hideRoot</code> 默认是会显示一个顶级,如果不想显示,请设置 <code>false</code></li>\n<li><code>rootLabel</code> 默认为 <code>顶级</code>,当 hideRoot 不为 <code>false</code> 时有用,用来设置顶级节点的文字。</li>\n<li><code>showIcon</code> 是否显示投标,默认为 <code>true</code>。</li>\n<li><code>showRadio</code> 是否显示单选按钮multiple 为 <code>false</code> 是有效。</li>\n<li><code>cascade</code> 设置成 <code>true</code> 时当选中父节点时不自动选择子节点。</li>\n<li><code>withChildren</code> 是指成 <code>true</code>,选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"type\": \"tree\",\n \"name\": \"tree\",\n \"label\": \"Tree\",\n \"options\": [\n {\n \"label\": \"Folder A\",\n \"value\": 1,\n \"children\": [\n {\n \"label\": \"file A\",\n \"value\": 2\n },\n {\n \"label\": \"file B\",\n \"value\": 3\n }\n ]\n },\n {\n \"label\": \"file C\",\n \"value\": 4\n },\n {\n \"label\": \"file D\",\n \"value\": 5\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Tree",
"fragment": "tree",
"fullPath": "#tree",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/TreeSelect.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"treeselect\" href=\"#treeselect\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>TreeSelect</h3><p>树形结构选择框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>tree-select</code></li>\n<li><code>options</code> 类似于 <a href=\"#/docs/renderers/Select\">select</a> 中 <code>options</code>, 并且支持通过 <code>children</code> 无限嵌套。</li>\n<li><code>source</code> Api 地址,如果选项不固定,可以通过配置 <code>source</code> 动态拉取。</li>\n<li><code>hideRoot</code> 默认是会显示一个顶级,如果不想显示,请设置 <code>false</code></li>\n<li><code>rootLabel</code> 默认为 <code>顶级</code>,当 hideRoot 不为 <code>false</code> 时有用,用来设置顶级节点的文字。</li>\n<li><code>showIcon</code> 是否显示投标,默认为 <code>true</code>。</li>\n<li><code>showRadio</code> 是否显示单选按钮multiple 为 <code>false</code> 是有效。</li>\n<li><code>cascade</code> 设置成 <code>true</code> 时当选中父节点时不自动选择子节点。</li>\n<li><code>withChildren</code> 是指成 <code>true</code>,选中父节点时,值里面将包含子节点的值,否则只会保留父节点的值。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li><code>joinValues</code> 默认为 <code>true</code></li>\n<li>单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。</li>\n<li>多选模式:选中的多个选项的 <code>value</code> 会通过 <code>delimiter</code> 连接起来,否则直接将以数组的形式提交值。</li>\n<li><code>extractValue</code> 默认为 <code>false</code>, <code>joinValues</code>设置为<code>false</code>时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。</li>\n<li><code>delimiter</code> 默认为 <code>,</code></li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 500px\"><script type=\"text/schema\" height=\"500\" scope=\"form-item\">{\n \"type\": \"tree-select\",\n \"name\": \"tree\",\n \"label\": \"Tree\",\n \"options\": [\n {\n \"label\": \"Folder A\",\n \"value\": 1,\n \"children\": [\n {\n \"label\": \"file A\",\n \"value\": 2\n },\n {\n \"label\": \"file B\",\n \"value\": 3\n }\n ]\n },\n {\n \"label\": \"file C\",\n \"value\": 4\n },\n {\n \"label\": \"file D\",\n \"value\": 5\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "TreeSelect",
"fragment": "treeselect",
"fullPath": "#treeselect",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,20 +0,0 @@
define('docs/renderers/Url.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"url\" href=\"#url\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Url</h3><p>URL 输入框。</p>\n<ul>\n<li><code>type</code> 请设置成 <code>url</code></li>\n<li><code>addOn</code> 输入框附加组件,比如附带一个提示文字,或者附带一个提交按钮。</li>\n<li><code>addOn.type</code> 请选择 <code>text</code> 、<code>button</code> 或者 <code>submit</code>。</li>\n<li><code>addOn.label</code> 文字说明</li>\n<li><code>addOn.xxx</code> 其他参数请参考按钮配置部分。</li>\n<li><code>clearable</code> 在有值的时候是否显示一个删除图标在右侧。</li>\n<li><code>resetValue</code> 默认为 <code>&quot;&quot;</code>, 删除后设置此配置项给定的值。</li>\n<li><code>options</code> 可选,选项配置,类型为数组,成员格式如下,配置后用户输入内容时会作为选项提示辅助输入。<ul>\n<li><code>label</code> 文字</li>\n<li><code>value</code> 值</li>\n</ul>\n</li>\n<li><code>source</code> 通过 options 只能配置静态数据,如果设置了 source 则会从接口拉取,实现动态效果。</li>\n<li><code>autoComplete</code> 跟 source 不同的是,每次用户输入都会去接口获取提示。</li>\n<li><code>multiple</code> 默认为 <code>false</code>, 设置成 <code>true</code> 表示可多选。</li>\n<li>更多配置请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a></li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 400px\"><script type=\"text/schema\" height=\"400\" scope=\"form-item\">{\n \"type\": \"url\",\n \"name\": \"text\",\n \"validateOnChange\": true,\n \"label\": \"Url\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",
"children": [
{
"label": "Url",
"fragment": "url",
"fullPath": "#url",
"level": 3
}
],
"level": 0
}
};
});

View File

@ -1,7 +1,7 @@
define('docs/renderers/Video.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"video\" href=\"#video\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Video</h3><p>视频播放器。</p>\n<table>\n<thead>\n<tr>\n<th>属性名</th>\n<th>类型</th>\n<th>默认值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td><code>string</code></td>\n<td><code>&quot;video&quot;</code></td>\n<td>指定为 video 渲染器</td>\n</tr>\n<tr>\n<td>className</td>\n<td><code>string</code></td>\n<td></td>\n<td>外层 Dom 的类名</td>\n</tr>\n<tr>\n<td>src</td>\n<td><code>string</code></td>\n<td></td>\n<td>视频地址</td>\n</tr>\n<tr>\n<td>poster</td>\n<td><code>string</code></td>\n<td></td>\n<td>视频封面地址</td>\n</tr>\n<tr>\n<td>muted</td>\n<td><code>boolean</code></td>\n<td></td>\n<td>是否静音</td>\n</tr>\n<tr>\n<td>autoPlay</td>\n<td><code>boolean</code></td>\n<td></td>\n<td>是否自动播放</td>\n</tr>\n</tbody>\n</table>\n<div class=\"amis-preview\" style=\"height: 700px\"><script type=\"text/schema\" height=\"700\" scope=\"body\">{\n \"type\": \"video\",\n \"autoPlay\": false,\n \"src\": \"raw:https://media.w3.org/2010/05/sintel/trailer_hd.mp4\",\n \"poster\": \"raw:https://video-react.js.org/assets/poster.png\"\n}\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"video\" href=\"#video\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Video</h3><p>视频播放器。</p>\n<table>\n<thead>\n<tr>\n<th>属性名</th>\n<th>类型</th>\n<th>默认值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td><code>string</code></td>\n<td><code>&quot;video&quot;</code></td>\n<td>指定为 video 渲染器</td>\n</tr>\n<tr>\n<td>className</td>\n<td><code>string</code></td>\n<td></td>\n<td>外层 Dom 的类名</td>\n</tr>\n<tr>\n<td>src</td>\n<td><code>string</code></td>\n<td></td>\n<td>视频地址</td>\n</tr>\n<tr>\n<td>poster</td>\n<td><code>string</code></td>\n<td></td>\n<td>视频封面地址</td>\n</tr>\n<tr>\n<td>muted</td>\n<td><code>boolean</code></td>\n<td></td>\n<td>是否静音</td>\n</tr>\n<tr>\n<td>autoPlay</td>\n<td><code>boolean</code></td>\n<td></td>\n<td>是否自动播放</td>\n</tr>\n<tr>\n<td>rates</td>\n<td><code>array</code></td>\n<td></td>\n<td>倍数,格式为<code>[1.0, 1.5, 2.0]</code></td>\n</tr>\n</tbody>\n</table>\n<div class=\"amis-preview\" style=\"height: 700px\"><script type=\"text/schema\" height=\"700\" scope=\"body\">{\n \"type\": \"video\",\n \"autoPlay\": false,\n \"src\": \"raw:https://media.w3.org/2010/05/sintel/trailer_hd.mp4\",\n \"poster\": \"raw:https://video-react.js.org/assets/poster.png\"\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

View File

@ -1,7 +1,7 @@
define('docs/renderers/Wizard.md', function(require, exports, module) {
module.exports = {
"html": "<h3><a class=\"anchor\" name=\"wizard\" href=\"#wizard\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Wizard</h3><p>表单向导,能够配置多个步骤引导用户一步一步完成表单提交。</p>\n<ul>\n<li><code>type</code> 请设置 <code>wizard</code>。</li>\n<li><code>mode</code> 展示模式,请选择:<code>horizontal</code> 或者 <code>vertical</code>,默认为 <code>horizontal</code>。</li>\n<li><code>api</code> 最后一步保存的接口。</li>\n<li><code>initApi</code> 初始化数据接口。</li>\n<li><code>initFetch</code> 初始是否拉取数据。</li>\n<li><code>initFetchOn</code> 初始是否拉取数据,通过表达式来配置。</li>\n<li><code>actionPrevLabel</code> 上一步按钮名称,默认:<code>上一步</code>。</li>\n<li><code>actionNextLabel</code> 下一步按钮名称<code>下一步</code>。</li>\n<li><code>actionNextSaveLabel</code> 保存并下一步按钮名称,默认:<code>保存并下一步</code>。</li>\n<li><code>actionFinishLabel</code> 完成按钮名称,默认:<code>完成</code>。</li>\n<li><code>className</code> 外层 CSS 类名。</li>\n<li><code>actionClassName</code> 按钮 CSS 类名,默认:<code>btn-sm btn-default</code>。</li>\n<li><code>reload</code> 操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 <code>window</code> 则让当前页面整体刷新。</li>\n<li><code>redirect</code> 操作完后跳转。</li>\n<li><code>target</code> 可以把数据提交给别的组件而不是自己保存。请填写目标组件设置的 name 值,如果填写为 <code>window</code> 则把数据同步到地址栏上,同时依赖这些数据的组件会自动重新刷新。</li>\n<li><code>steps</code> 数组,配置步骤信息。</li>\n<li><code>steps[x].title</code> 步骤标题。</li>\n<li><code>steps[x].mode</code> 展示默认,跟 <a href=\"#/docs/renderers/Form\">Form</a> 中的模式一样,选择: <code>normal</code>、<code>horizontal</code>或者<code>inline</code>。</li>\n<li><code>steps[x].horizontal</code> 当为水平模式时,用来控制左右占比。</li>\n<li><code>steps[x].horizontal.label</code> 左边 label 的宽度占比。</li>\n<li><code>steps[x].horizontal.right</code> 右边控制器的宽度占比。</li>\n<li><code>steps[x].horizontal.offset</code> 当没有设置 label 时,右边控制器的偏移量。</li>\n<li><code>steps[x].api</code> 当前步骤保存接口,可以不配置。</li>\n<li><code>steps[x].initApi</code> 当前步骤数据初始化接口。</li>\n<li><code>steps[x].initFetch</code> 当前步骤数据初始化接口是否初始拉取。</li>\n<li><code>steps[x].initFetchOn</code> 当前步骤数据初始化接口是否初始拉取,用表达式来决定。</li>\n<li><code>steps[x].controls</code> 当前步骤的表单项集合,请参考 <a href=\"#/docs/renderers/FormItem\">FormItem</a>。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"body\">{\n \"type\": \"wizard\",\n \"api\": \"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2\",\n \"mode\": \"vertical\",\n \"steps\": [\n {\n \"title\": \"第一步\",\n \"controls\": [\n {\n \"name\": \"website\",\n \"label\": \"网址\",\n \"type\": \"url\",\n \"required\": true\n },\n {\n \"name\": \"email\",\n \"label\": \"邮箱\",\n \"type\": \"email\",\n \"required\": true\n }\n ]\n },\n {\n \"title\": \"Step 2\",\n \"controls\": [\n {\n \"name\": \"email2\",\n \"label\": \"邮箱\",\n \"type\": \"email\",\n \"required\": true\n }\n ]\n },\n {\n \"title\": \"Step 3\",\n \"controls\": [\n \"这是最后一步了\"\n ]\n }\n ]\n}\n</script></div>\n",
"html": "<h3><a class=\"anchor\" name=\"wizard\" href=\"#wizard\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Wizard</h3><p>表单向导,能够配置多个步骤引导用户一步一步完成表单提交。</p>\n<ul>\n<li><code>type</code> 请设置 <code>wizard</code>。</li>\n<li><code>mode</code> 展示模式,请选择:<code>horizontal</code> 或者 <code>vertical</code>,默认为 <code>horizontal</code>。</li>\n<li><code>api</code> 最后一步保存的接口。</li>\n<li><code>initApi</code> 初始化数据接口。</li>\n<li><code>initFetch</code> 初始是否拉取数据。</li>\n<li><code>initFetchOn</code> 初始是否拉取数据,通过表达式来配置。</li>\n<li><code>actionPrevLabel</code> 上一步按钮名称,默认:<code>上一步</code>。</li>\n<li><code>actionNextLabel</code> 下一步按钮名称<code>下一步</code>。</li>\n<li><code>actionNextSaveLabel</code> 保存并下一步按钮名称,默认:<code>保存并下一步</code>。</li>\n<li><code>actionFinishLabel</code> 完成按钮名称,默认:<code>完成</code>。</li>\n<li><code>className</code> 外层 CSS 类名。</li>\n<li><code>actionClassName</code> 按钮 CSS 类名,默认:<code>btn-sm btn-default</code>。</li>\n<li><code>reload</code> 操作完后刷新目标对象。请填写目标组件设置的 name 值,如果填写为 <code>window</code> 则让当前页面整体刷新。</li>\n<li><code>redirect</code> 操作完后跳转。</li>\n<li><code>target</code> 可以把数据提交给别的组件而不是自己保存。请填写目标组件设置的 name 值,如果填写为 <code>window</code> 则把数据同步到地址栏上,同时依赖这些数据的组件会自动重新刷新。</li>\n<li><code>steps</code> 数组,配置步骤信息。</li>\n<li><code>steps[x].title</code> 步骤标题。</li>\n<li><code>steps[x].mode</code> 展示默认,跟 <a href=\"#/docs/renderers/Form/Form\">Form</a> 中的模式一样,选择: <code>normal</code>、<code>horizontal</code>或者<code>inline</code>。</li>\n<li><code>steps[x].horizontal</code> 当为水平模式时,用来控制左右占比。</li>\n<li><code>steps[x].horizontal.label</code> 左边 label 的宽度占比。</li>\n<li><code>steps[x].horizontal.right</code> 右边控制器的宽度占比。</li>\n<li><code>steps[x].horizontal.offset</code> 当没有设置 label 时,右边控制器的偏移量。</li>\n<li><code>steps[x].api</code> 当前步骤保存接口,可以不配置。</li>\n<li><code>steps[x].initApi</code> 当前步骤数据初始化接口。</li>\n<li><code>steps[x].initFetch</code> 当前步骤数据初始化接口是否初始拉取。</li>\n<li><code>steps[x].initFetchOn</code> 当前步骤数据初始化接口是否初始拉取,用表达式来决定。</li>\n<li><code>steps[x].controls</code> 当前步骤的表单项集合,请参考 <a href=\"#/docs/renderers/Form/FormItem\">FormItem</a>。</li>\n</ul>\n<div class=\"amis-preview\" style=\"height: 600px\"><script type=\"text/schema\" height=\"600\" scope=\"body\">{\n \"type\": \"wizard\",\n \"api\": \"https://houtai.baidu.com/api/mock2/form/saveForm?waitSeconds=2\",\n \"mode\": \"vertical\",\n \"steps\": [\n {\n \"title\": \"第一步\",\n \"controls\": [\n {\n \"name\": \"website\",\n \"label\": \"网址\",\n \"type\": \"url\",\n \"required\": true\n },\n {\n \"name\": \"email\",\n \"label\": \"邮箱\",\n \"type\": \"email\",\n \"required\": true\n }\n ]\n },\n {\n \"title\": \"Step 2\",\n \"controls\": [\n {\n \"name\": \"email2\",\n \"label\": \"邮箱\",\n \"type\": \"email\",\n \"required\": true\n }\n ]\n },\n {\n \"title\": \"Step 3\",\n \"controls\": [\n \"这是最后一步了\"\n ]\n }\n ]\n}\n</script></div>\n",
"toc": {
"label": "目录",
"type": "toc",

View File

@ -22,9 +22,9 @@
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="/amis/pkg/npm_6a07688.js"></script>
<script type="text/javascript" src="/amis/pkg/examples/index.html_map_60402cf.js"></script>
<script type="text/javascript" src="/amis/pkg/app_e61575b.js"></script>
<script src="/amis/pkg/npm_5eaeb69.js"></script>
<script type="text/javascript" src="/amis/pkg/examples/index.html_map_37d6d1e.js"></script>
<script type="text/javascript" src="/amis/pkg/app_84af016.js"></script>
<script type="text/javascript" src="/amis/pkg/rich-text_e6dc6f0.js"></script>
<script type="text/javascript" src="/amis/pkg/rest_cf0b3d4.js"></script>
<script type="text/javascript">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More