From 53b4853eccc7ca675911d4ac71cf4b8a6c199fec Mon Sep 17 00:00:00 2001 From: RickCole21 Date: Wed, 5 Aug 2020 15:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20gh-pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gh-pages/docs/components/action.html | 6 +- gh-pages/docs/components/action_2f938dc.js | 155 +++++++++++++++++ gh-pages/docs/components/action_d8e6841.js | 163 ------------------ gh-pages/docs/components/alert.html | 6 +- gh-pages/docs/components/audio.html | 6 +- gh-pages/docs/components/button.html | 6 +- gh-pages/docs/components/buttongroup.html | 6 +- gh-pages/docs/components/card.html | 6 +- gh-pages/docs/components/cards.html | 6 +- gh-pages/docs/components/carousel.html | 6 +- gh-pages/docs/components/chart.html | 6 +- gh-pages/docs/components/collapse.html | 6 +- gh-pages/docs/components/color.html | 6 +- gh-pages/docs/components/component.html | 6 +- gh-pages/docs/components/container.html | 6 +- gh-pages/docs/components/crud.html | 6 +- gh-pages/docs/components/date.html | 6 +- gh-pages/docs/components/dialog.html | 6 +- gh-pages/docs/components/divider.html | 6 +- gh-pages/docs/components/drawer.html | 6 +- gh-pages/docs/components/dropdown-button.html | 6 +- gh-pages/docs/components/each.html | 6 +- gh-pages/docs/components/form/array.html | 6 +- .../docs/components/form/button-group.html | 6 +- .../docs/components/form/button-toolbar.html | 6 +- gh-pages/docs/components/form/button.html | 6 +- .../docs/components/form/chain-select.html | 6 +- gh-pages/docs/components/form/checkbox.html | 6 +- gh-pages/docs/components/form/checkboxes.html | 6 +- gh-pages/docs/components/form/city.html | 6 +- gh-pages/docs/components/form/color.html | 6 +- gh-pages/docs/components/form/combo.html | 6 +- gh-pages/docs/components/form/date-range.html | 6 +- gh-pages/docs/components/form/date.html | 6 +- .../docs/components/form/datetime-range.html | 6 +- gh-pages/docs/components/form/datetime.html | 6 +- .../docs/components/form/diff-editor.html | 6 +- gh-pages/docs/components/form/editor.html | 6 +- gh-pages/docs/components/form/fieldset.html | 6 +- gh-pages/docs/components/form/file.html | 6 +- gh-pages/docs/components/form/formitem.html | 6 +- gh-pages/docs/components/form/formula.html | 6 +- gh-pages/docs/components/form/grid.html | 6 +- gh-pages/docs/components/form/group.html | 6 +- gh-pages/docs/components/form/hbox.html | 6 +- gh-pages/docs/components/form/hidden.html | 6 +- gh-pages/docs/components/form/image.html | 6 +- gh-pages/docs/components/form/index.html | 6 +- .../docs/components/form/input-group.html | 6 +- gh-pages/docs/components/form/list.html | 6 +- gh-pages/docs/components/form/matrix.html | 6 +- .../docs/components/form/nestedselect.html | 6 +- gh-pages/docs/components/form/number.html | 6 +- gh-pages/docs/components/form/options.html | 6 +- gh-pages/docs/components/form/panel.html | 6 +- gh-pages/docs/components/form/picker.html | 6 +- gh-pages/docs/components/form/radios.html | 6 +- gh-pages/docs/components/form/range.html | 6 +- gh-pages/docs/components/form/rating.html | 6 +- gh-pages/docs/components/form/repeat.html | 6 +- gh-pages/docs/components/form/rich-text.html | 6 +- gh-pages/docs/components/form/select.html | 6 +- gh-pages/docs/components/form/service.html | 6 +- gh-pages/docs/components/form/static.html | 6 +- gh-pages/docs/components/form/subform.html | 6 +- gh-pages/docs/components/form/switch.html | 6 +- gh-pages/docs/components/form/table.html | 6 +- .../docs/components/form/tabs-transfer.html | 6 +- gh-pages/docs/components/form/tabs.html | 6 +- gh-pages/docs/components/form/tag.html | 6 +- gh-pages/docs/components/form/text.html | 6 +- gh-pages/docs/components/form/textarea.html | 6 +- gh-pages/docs/components/form/time.html | 6 +- gh-pages/docs/components/form/transfer.html | 6 +- gh-pages/docs/components/form/tree.html | 6 +- gh-pages/docs/components/form/treeselect.html | 6 +- gh-pages/docs/components/grid.html | 6 +- gh-pages/docs/components/hbox.html | 6 +- gh-pages/docs/components/html.html | 6 +- gh-pages/docs/components/icon.html | 6 +- gh-pages/docs/components/iframe.html | 6 +- gh-pages/docs/components/image.html | 6 +- gh-pages/docs/components/images.html | 6 +- gh-pages/docs/components/json.html | 6 +- gh-pages/docs/components/link.html | 6 +- gh-pages/docs/components/list.html | 6 +- gh-pages/docs/components/mapping.html | 6 +- gh-pages/docs/components/nav.html | 6 +- gh-pages/docs/components/page.html | 6 +- gh-pages/docs/components/panel.html | 6 +- gh-pages/docs/components/progress.html | 6 +- gh-pages/docs/components/qrcode.html | 6 +- gh-pages/docs/components/remark.html | 6 +- gh-pages/docs/components/service.html | 6 +- gh-pages/docs/components/spinner.html | 6 +- gh-pages/docs/components/status.html | 6 +- gh-pages/docs/components/switch.html | 6 +- gh-pages/docs/components/table.html | 6 +- gh-pages/docs/components/tabs.html | 6 +- gh-pages/docs/components/tasks.html | 6 +- gh-pages/docs/components/tpl.html | 6 +- gh-pages/docs/components/video.html | 6 +- gh-pages/docs/components/wizard.html | 6 +- gh-pages/docs/components/wrapper.html | 6 +- gh-pages/docs/concepts/action.html | 6 +- gh-pages/docs/concepts/data-mapping.html | 6 +- .../concepts/datascope-and-datachain.html | 6 +- gh-pages/docs/concepts/expression.html | 6 +- gh-pages/docs/concepts/linkage.html | 6 +- gh-pages/docs/concepts/schema.html | 6 +- gh-pages/docs/concepts/style.html | 6 +- gh-pages/docs/concepts/template.html | 6 +- gh-pages/docs/index.html | 6 +- gh-pages/docs/start/custom.html | 6 +- gh-pages/docs/start/getting-started.html | 6 +- gh-pages/docs/types/api.html | 6 +- gh-pages/docs/types/schemanode.html | 6 +- gh-pages/examples/audio.html | 6 +- gh-pages/examples/carousel.html | 6 +- gh-pages/examples/chart.html | 6 +- gh-pages/examples/crud/aside.html | 6 +- gh-pages/examples/crud/columns.html | 6 +- gh-pages/examples/crud/fixed.html | 6 +- gh-pages/examples/crud/footable.html | 6 +- gh-pages/examples/crud/grid.html | 6 +- gh-pages/examples/crud/header-group.html | 6 +- gh-pages/examples/crud/header-hide.html | 6 +- gh-pages/examples/crud/item-actions.html | 6 +- gh-pages/examples/crud/jump-next.html | 6 +- gh-pages/examples/crud/keyboards.html | 6 +- gh-pages/examples/crud/list.html | 6 +- gh-pages/examples/crud/load-more.html | 6 +- gh-pages/examples/crud/load-once.html | 6 +- gh-pages/examples/crud/merge-cell.html | 6 +- gh-pages/examples/crud/nested.html | 6 +- gh-pages/examples/crud/table.html | 6 +- gh-pages/examples/dialog/drawer.html | 6 +- gh-pages/examples/dialog/simple.html | 6 +- gh-pages/examples/form/combo.html | 6 +- gh-pages/examples/form/custom.html | 6 +- gh-pages/examples/form/definitions.html | 6 +- gh-pages/examples/form/fields-tabs.html | 6 +- gh-pages/examples/form/fieldset.html | 6 +- gh-pages/examples/form/formula.html | 6 +- gh-pages/examples/form/full.html | 6 +- gh-pages/examples/form/hint.html | 6 +- gh-pages/examples/form/ide.html | 6 +- gh-pages/examples/form/mode.html | 6 +- gh-pages/examples/form/picker.html | 6 +- gh-pages/examples/form/reaction.html | 6 +- gh-pages/examples/form/remote.html | 6 +- gh-pages/examples/form/rich-text.html | 6 +- gh-pages/examples/form/static.html | 6 +- gh-pages/examples/form/sub-form.html | 6 +- gh-pages/examples/form/table.html | 6 +- gh-pages/examples/form/tabs.html | 6 +- gh-pages/examples/form/transfer.html | 6 +- gh-pages/examples/form/validation.html | 6 +- gh-pages/examples/horizontal.html | 6 +- gh-pages/examples/iframe.html | 6 +- gh-pages/examples/linkpage/crud.html | 6 +- gh-pages/examples/linkpage/form.html | 6 +- gh-pages/examples/linkpage/form2.html | 6 +- gh-pages/examples/linkpage/options-local.html | 6 +- gh-pages/examples/linkpage/options.html | 6 +- gh-pages/examples/linkpage/page.html | 6 +- gh-pages/examples/pages/error.html | 6 +- gh-pages/examples/pages/form.html | 6 +- gh-pages/examples/pages/simple.html | 6 +- gh-pages/examples/sdk.html | 6 +- gh-pages/examples/services/data.html | 6 +- gh-pages/examples/services/form.html | 6 +- gh-pages/examples/services/schema.html | 6 +- gh-pages/examples/tabs/form.html | 6 +- gh-pages/examples/tabs/normal.html | 6 +- gh-pages/examples/tabs/tab1.html | 6 +- gh-pages/examples/tabs/tab2.html | 6 +- gh-pages/examples/tabs/tab3.html | 6 +- gh-pages/examples/task.html | 6 +- gh-pages/examples/video.html | 6 +- gh-pages/examples/wizard.html | 6 +- gh-pages/index.html | 6 +- .../pkg/{app_3986bd4.js => app_4fc0b57.js} | 2 +- ...p_52efd8e.js => index.html_map_8c0e9f9.js} | 4 +- ...js => sdk-placeholder.html_map_08e0430.js} | 2 +- .../pkg/{rest_a42f484.js => rest_ec2f976.js} | 2 +- gh-pages/sdk-placeholder.html | 6 +- 187 files changed, 703 insertions(+), 711 deletions(-) create mode 100644 gh-pages/docs/components/action_2f938dc.js delete mode 100644 gh-pages/docs/components/action_d8e6841.js rename gh-pages/pkg/{app_3986bd4.js => app_4fc0b57.js} (99%) rename gh-pages/pkg/examples/{index.html_map_52efd8e.js => index.html_map_8c0e9f9.js} (99%) rename gh-pages/pkg/examples/{sdk-placeholder.html_map_0601d77.js => sdk-placeholder.html_map_08e0430.js} (99%) rename gh-pages/pkg/{rest_a42f484.js => rest_ec2f976.js} (80%) diff --git a/gh-pages/docs/components/action.html b/gh-pages/docs/components/action.html index 3d65afae..b9df736b 100644 --- a/gh-pages/docs/components/action.html +++ b/gh-pages/docs/components/action.html @@ -36,10 +36,10 @@
- - + + - + \n

样式

尺寸

配置size,显示不同尺寸

\n
\n

主题

可以配置level或者primary,显示不同样式。

\n
\n

图标

可以配置icon配置项,实现按钮显示图标

\n
\n

如果label配置为空字符串,可以只显示icon

\n
\n

操作前确认

可以通过配置confirmText,实现在任意操作前,弹出提示框确认是否进行该操作。

\n
\n

ajax 请求

通过配置"actionType":"ajax"api,可以实现 ajax 请求。

\n
\n

请求成功后,跳转至某个页面

配置相对路径,实现单页跳转
\n
配置完整路径,直接跳转指定路径
\n

请求成功后,显示反馈弹框

\n

更多内容查看Dialog 文档

\n

自定义 toast 文字

可以通过配置messages,自定义接口返回toast信息

\n
\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
apiApi-请求地址,参考 api 格式说明。
redirect模板字符串-指定当前请求结束后跳转的路径,可用 ${xxx} 取值。
feedbackDialogObject-如果 ajax 类型的,当 ajax 返回正常后,还能接着弹出一个 dialog 做其他交互。返回的数据可用于这个 dialog 中。格式可参考Dialog
messagesobject-success:ajax 操作成功后提示,可以不指定,不指定时以 api 返回为准。failed:ajax 操作失败提示。
\n

跳转链接

单页跳转

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringlink单页跳转
linkstringlink用来指定跳转地址,跟 url 不同的是,这是单页跳转方式,不会渲染浏览器,请指定 amis 平台内的页面。可用 ${xxx} 取值。
\n

直接跳转

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringurl页面跳转
urlstring-按钮点击后,会打开指定页面。可用 ${xxx} 取值。
blankbooleanfalse如果为 true 将在新 tab 页面打开。
\n

注意:由于 amis 平台内 http 地址会被替换成 proxy 地址,所以在 amis 平台内使用请加上 raw: 作为前缀。 比如:raw:http://www.baidu.com

\n

弹框

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdialog点击后显示一个弹出框
dialogstringDialogObject-指定弹框内容,格式可参考Dialog
nextConditionboolean-可以用来设置下一条数据的条件,默认为 true
\n

抽屉

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdrawer点击后显示一个侧边栏
drawerstringDrawerObject-指定弹框内容,格式可参考Drawer
\n

复制文本

\n

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringcopy复制一段内容到粘贴板
content模板-指定复制的内容。可用 ${xxx} 取值。
\n

刷新其他组件

属性表

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringreload刷新目标组件
targetstring-需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
\n

组件特有的行为类型

表单中表格添加一行

该 actionType 为FormItem-Table专用行为

\n

重置表单

在 form 中,配置"type": "reset"的按钮,可以实现重置表单数据的功能

\n
\n

通用属性表

所有actionType都支持的通用配置项

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringaction指定为 Page 渲染器。
actionTypestring-【必填】这是 action 最核心的配置,来指定该 action 的作用类型,支持:ajaxlinkurldrawerdialogconfirmcancelprevnextcopyclose
labelstring-按钮文本。可用 ${xxx} 取值。
levelstringdefault按钮样式,支持:linkprimarysecondaryinfosuccesswarningdangerlightdarkdefault
sizestring-按钮大小,支持:xssmmdlg
iconstring-设置图标,例如fa fa-plus
iconClassNamestring-给图标上添加类名。
activeboolean-按钮是否高亮。
activeLevelstring-按钮高亮时的样式,配置支持同level
activeClassNamestringis-active给按钮高亮添加类名。
blockboolean-display:"block"来显示按钮。
confirmText模板-当设置后,操作在开始前会询问用户。可用 ${xxx} 取值。
reloadstring-指定此次操作完后,需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
tooltipstring-鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
disabledTipstring-被禁用后鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
tooltipPlacementstringtop如果配置了tooltip或者disabledTip,指定提示信息位置,可配置topbottomleftright
closeboolean-action配置在dialogdraweractions中时,配置为true指定此次操作完后关闭当前dialogdrawer
requiredArray<string>-配置字符串数组,指定在form中进行操作之前,需要指定的字段名的表单项通过验证
\n", + "toc": { + "label": "目录", + "type": "toc", + "children": [ + { + "label": "基本用法", + "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", + "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", + "level": 2 + }, + { + "label": "样式", + "fragment": "%E6%A0%B7%E5%BC%8F", + "fullPath": "#%E6%A0%B7%E5%BC%8F", + "level": 2, + "children": [ + { + "label": "尺寸", + "fragment": "%E5%B0%BA%E5%AF%B8", + "fullPath": "#%E5%B0%BA%E5%AF%B8", + "level": 3 + }, + { + "label": "主题", + "fragment": "%E4%B8%BB%E9%A2%98", + "fullPath": "#%E4%B8%BB%E9%A2%98", + "level": 3 + }, + { + "label": "图标", + "fragment": "%E5%9B%BE%E6%A0%87", + "fullPath": "#%E5%9B%BE%E6%A0%87", + "level": 3 + } + ] + }, + { + "label": "操作前确认", + "fragment": "%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", + "fullPath": "#%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", + "level": 2 + }, + { + "label": "ajax 请求", + "fragment": "ajax-%E8%AF%B7%E6%B1%82", + "fullPath": "#ajax-%E8%AF%B7%E6%B1%82", + "level": 2, + "children": [ + { + "label": "请求成功后,跳转至某个页面", + "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", + "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", + "level": 3 + }, + { + "label": "请求成功后,显示反馈弹框", + "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", + "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", + "level": 3 + }, + { + "label": "自定义 toast 文字", + "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", + "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", + "level": 3 + } + ] + }, + { + "label": "跳转链接", + "fragment": "%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", + "fullPath": "#%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", + "level": 2, + "children": [ + { + "label": "单页跳转", + "fragment": "%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", + "fullPath": "#%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", + "level": 3 + }, + { + "label": "直接跳转", + "fragment": "%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", + "fullPath": "#%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", + "level": 3 + } + ] + }, + { + "label": "弹框", + "fragment": "%E5%BC%B9%E6%A1%86", + "fullPath": "#%E5%BC%B9%E6%A1%86", + "level": 2 + }, + { + "label": "抽屉", + "fragment": "%E6%8A%BD%E5%B1%89", + "fullPath": "#%E6%8A%BD%E5%B1%89", + "level": 2 + }, + { + "label": "复制文本", + "fragment": "%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", + "fullPath": "#%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", + "level": 2 + }, + { + "label": "刷新其他组件", + "fragment": "%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", + "fullPath": "#%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", + "level": 2 + }, + { + "label": "组件特有的行为类型", + "fragment": "%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", + "fullPath": "#%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", + "level": 2, + "children": [ + { + "label": "表单中表格添加一行", + "fragment": "%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", + "fullPath": "#%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", + "level": 3 + }, + { + "label": "重置表单", + "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", + "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", + "level": 3 + } + ] + }, + { + "label": "通用属性表", + "fragment": "%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", + "fullPath": "#%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", + "level": 2 + } + ], + "level": 0 + } + }; + +}); diff --git a/gh-pages/docs/components/action_d8e6841.js b/gh-pages/docs/components/action_d8e6841.js deleted file mode 100644 index 02b957ce..00000000 --- a/gh-pages/docs/components/action_d8e6841.js +++ /dev/null @@ -1,163 +0,0 @@ -amis.define('docs/components/action.md', function(require, exports, module, define) { - - module.exports = { - "title": "Action 行为按钮", - "description": null, - "type": 0, - "group": "⚙ 组件", - "menuName": "Action 行为按钮", - "icon": null, - "order": 26, - "html": "

Action 行为按钮,是触发页面行为的主要方法之一

\n

基本用法

我们这里简单实现一个点击按钮弹框的交互。

\n
\n

样式

尺寸

配置size,显示不同尺寸

\n
\n

主题

可以配置level或者primary,显示不同样式。

\n
\n

图标

可以配置icon配置项,实现按钮显示图标

\n
\n

如果label配置为空字符串,可以只显示icon

\n
\n

操作前确认

可以通过配置confirmText,实现在任意操作前,弹出提示框确认是否进行该操作。

\n
\n

ajax 请求

通过配置"actionType":"ajax"api,可以实现 ajax 请求。

\n
\n

请求成功后,跳转至某个页面

配置相对路径,实现单页跳转
\n
配置完整路径,直接跳转指定路径
\n

请求成功后,显示反馈弹框

\n

更多内容查看Dialog 文档

\n

自定义 toast 文字

可以通过配置messages,自定义接口返回toast信息

\n
\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
apiApi-请求地址,参考 api 格式说明。
redirect模板字符串-指定当前请求结束后跳转的路径,可用 ${xxx} 取值。
feedbackDialogObject-如果 ajax 类型的,当 ajax 返回正常后,还能接着弹出一个 dialog 做其他交互。返回的数据可用于这个 dialog 中。格式可参考Dialog
messagesobject-success:ajax 操作成功后提示,可以不指定,不指定时以 api 返回为准。failed:ajax 操作失败提示。
\n

跳转链接

单页跳转

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringlink单页跳转
linkstringlink用来指定跳转地址,跟 url 不同的是,这是单页跳转方式,不会渲染浏览器,请指定 amis 平台内的页面。可用 ${xxx} 取值。
\n

直接跳转

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringurl页面跳转
urlstring-按钮点击后,会打开指定页面。可用 ${xxx} 取值。
blankbooleanfalse如果为 true 将在新 tab 页面打开。
\n

注意:由于 amis 平台内 http 地址会被替换成 proxy 地址,所以在 amis 平台内使用请加上 raw: 作为前缀。 比如:raw:http://www.baidu.com

\n

弹框

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdialog点击后显示一个弹出框
dialogstringDialogObject-指定弹框内容,格式可参考Dialog
nextConditionboolean-可以用来设置下一条数据的条件,默认为 true
\n

抽屉

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringdrawer点击后显示一个侧边栏
drawerstringDrawerObject-指定弹框内容,格式可参考Drawer
\n

复制文本

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringcopy复制一段内容到粘贴板
content模板-指定复制的内容。可用 ${xxx} 取值。
\n

刷新其他组件

基本使用

xxx

\n
属性表
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
actionTypestringreload刷新目标组件
targetstring-需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
\n

组件特有的行为类型

表单中表格添加一行

该 actionType 为FormItem-Table专用行为

\n

重置表单

在 form 中,配置"type": "reset"的按钮,可以实现重置表单数据的功能

\n
\n

通用属性表

所有actionType都支持的通用配置项

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
属性名类型默认值说明
typestringaction指定为 Page 渲染器。
actionTypestring-【必填】这是 action 最核心的配置,来指定该 action 的作用类型,支持:ajaxlinkurldrawerdialogconfirmcancelprevnextcopyclose
labelstring-按钮文本。可用 ${xxx} 取值。
levelstringdefault按钮样式,支持:linkprimarysecondaryinfosuccesswarningdangerlightdarkdefault
sizestring-按钮大小,支持:xssmmdlg
iconstring-设置图标,例如fa fa-plus
iconClassNamestring-给图标上添加类名。
activeboolean-按钮是否高亮。
activeLevelstring-按钮高亮时的样式,配置支持同level
activeClassNamestringis-active给按钮高亮添加类名。
blockboolean-display:"block"来显示按钮。
confirmText模板-当设置后,操作在开始前会询问用户。可用 ${xxx} 取值。
reloadstring-指定此次操作完后,需要刷新的目标组件名字(组件的name值,自己配置的),多个请用 , 号隔开。
tooltipstring-鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
disabledTipstring-被禁用后鼠标停留时弹出该段文字,也可以配置对象类型:字段为titlecontent。可用 ${xxx} 取值。
tooltipPlacementstringtop如果配置了tooltip或者disabledTip,指定提示信息位置,可配置topbottomleftright
closeboolean-action配置在dialogdraweractions中时,配置为true指定此次操作完后关闭当前dialogdrawer
requiredArray<string>-配置字符串数组,指定在form中进行操作之前,需要指定的字段名的表单项通过验证
\n", - "toc": { - "label": "目录", - "type": "toc", - "children": [ - { - "label": "基本用法", - "fragment": "%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95", - "level": 2 - }, - { - "label": "样式", - "fragment": "%E6%A0%B7%E5%BC%8F", - "fullPath": "#%E6%A0%B7%E5%BC%8F", - "level": 2, - "children": [ - { - "label": "尺寸", - "fragment": "%E5%B0%BA%E5%AF%B8", - "fullPath": "#%E5%B0%BA%E5%AF%B8", - "level": 3 - }, - { - "label": "主题", - "fragment": "%E4%B8%BB%E9%A2%98", - "fullPath": "#%E4%B8%BB%E9%A2%98", - "level": 3 - }, - { - "label": "图标", - "fragment": "%E5%9B%BE%E6%A0%87", - "fullPath": "#%E5%9B%BE%E6%A0%87", - "level": 3 - } - ] - }, - { - "label": "操作前确认", - "fragment": "%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", - "fullPath": "#%E6%93%8D%E4%BD%9C%E5%89%8D%E7%A1%AE%E8%AE%A4", - "level": 2 - }, - { - "label": "ajax 请求", - "fragment": "ajax-%E8%AF%B7%E6%B1%82", - "fullPath": "#ajax-%E8%AF%B7%E6%B1%82", - "level": 2, - "children": [ - { - "label": "请求成功后,跳转至某个页面", - "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", - "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E8%B7%B3%E8%BD%AC%E8%87%B3%E6%9F%90%E4%B8%AA%E9%A1%B5%E9%9D%A2", - "level": 3 - }, - { - "label": "请求成功后,显示反馈弹框", - "fragment": "%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "fullPath": "#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E6%98%BE%E7%A4%BA%E5%8F%8D%E9%A6%88%E5%BC%B9%E6%A1%86", - "level": 3 - }, - { - "label": "自定义 toast 文字", - "fragment": "%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", - "fullPath": "#%E8%87%AA%E5%AE%9A%E4%B9%89-toast-%E6%96%87%E5%AD%97", - "level": 3 - } - ] - }, - { - "label": "跳转链接", - "fragment": "%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", - "fullPath": "#%E8%B7%B3%E8%BD%AC%E9%93%BE%E6%8E%A5", - "level": 2, - "children": [ - { - "label": "单页跳转", - "fragment": "%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", - "fullPath": "#%E5%8D%95%E9%A1%B5%E8%B7%B3%E8%BD%AC", - "level": 3 - }, - { - "label": "直接跳转", - "fragment": "%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", - "fullPath": "#%E7%9B%B4%E6%8E%A5%E8%B7%B3%E8%BD%AC", - "level": 3 - } - ] - }, - { - "label": "弹框", - "fragment": "%E5%BC%B9%E6%A1%86", - "fullPath": "#%E5%BC%B9%E6%A1%86", - "level": 2 - }, - { - "label": "抽屉", - "fragment": "%E6%8A%BD%E5%B1%89", - "fullPath": "#%E6%8A%BD%E5%B1%89", - "level": 2 - }, - { - "label": "复制文本", - "fragment": "%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", - "fullPath": "#%E5%A4%8D%E5%88%B6%E6%96%87%E6%9C%AC", - "level": 2 - }, - { - "label": "刷新其他组件", - "fragment": "%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "fullPath": "#%E5%88%B7%E6%96%B0%E5%85%B6%E4%BB%96%E7%BB%84%E4%BB%B6", - "level": 2, - "children": [ - { - "label": "基本使用", - "fragment": "%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "fullPath": "#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8", - "level": 3 - } - ] - }, - { - "label": "组件特有的行为类型", - "fragment": "%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", - "fullPath": "#%E7%BB%84%E4%BB%B6%E7%89%B9%E6%9C%89%E7%9A%84%E8%A1%8C%E4%B8%BA%E7%B1%BB%E5%9E%8B", - "level": 2, - "children": [ - { - "label": "表单中表格添加一行", - "fragment": "%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", - "fullPath": "#%E8%A1%A8%E5%8D%95%E4%B8%AD%E8%A1%A8%E6%A0%BC%E6%B7%BB%E5%8A%A0%E4%B8%80%E8%A1%8C", - "level": 3 - }, - { - "label": "重置表单", - "fragment": "%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "fullPath": "#%E9%87%8D%E7%BD%AE%E8%A1%A8%E5%8D%95", - "level": 3 - } - ] - }, - { - "label": "通用属性表", - "fragment": "%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", - "fullPath": "#%E9%80%9A%E7%94%A8%E5%B1%9E%E6%80%A7%E8%A1%A8", - "level": 2 - } - ], - "level": 0 - } - }; - -}); diff --git a/gh-pages/docs/components/alert.html b/gh-pages/docs/components/alert.html index 3d65afae..b9df736b 100644 --- a/gh-pages/docs/components/alert.html +++ b/gh-pages/docs/components/alert.html @@ -36,10 +36,10 @@
- - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - +