diff --git a/docs/cn/README.md b/docs/cn/README.md index 1e9f4f5..4cd555e 100644 --- a/docs/cn/README.md +++ b/docs/cn/README.md @@ -1,5 +1,11 @@ # bricks文档 +像搭积木一样的编写前端应用,bricks希望提供开发者所需的底层显示控件, +开发应用时采用简单的组装和插拔方式完成应用的开发, bricks的API为json格式 +不需要应用开发者掌握前端开发技术。 +使用bricks开发应用的好处 +* 质量和性能可控,开发者开发的应用质量和性能依赖bricks提供的提供底层控件。 +* 简单的开发方式,开发者以编写[json数据文件](descjson.md)的形式开发前端应用 ## [bricks简介](brief.md) ## [bricks安装](install.md) ## [控件介绍](widgets.md) diff --git a/docs/cn/widgets.md b/docs/cn/widgets.md new file mode 100644 index 0000000..7e84f9d --- /dev/null +++ b/docs/cn/widgets.md @@ -0,0 +1,45 @@ +# 控件列表 +Bricks内置许多的显示控件,所有显示控件都继承自JsWidget,容器控件Layout几就继承自JsWidget,其他的容器HBox, VBox继承自Layout + +# 控件继承树 + +# 控件清单 +* [JsWidget](widgets/jswidget.md): 祖先控件,对应于
元素 +* [Accordion](widgets/accordion.md):可折叠控件 +* [AudioPlayer](widgets/audioplayer.md):音频播放器 +* [Button](widgets/button.md):按钮控件 +* [DataGrid](widgets/datagrid.md):数据表格控件 +* [Form](widgets/form.md):输入表单控件 +* [Image](widgets/image.md):图片控件 +* [Icon](widgets/icon.md):图标控件 +* [BlankIcon](widgets/blackicon.js):空白图标控件 +* [HBox](widgets/hbox.md):横向布局器 +* [VBox](widgets/vbox.md):纵向布局器 +* [HFiller](widgets/hfiller.md):横向填充控件 +* [VFiller](widgets/vfiller.md):纵向填充控件 +* [MarkdownViewer](widgets/markdonwviewer.md):markdown文档显示控件 +* [Menu](widgets/menu.md):菜单控件 +* [Message](widgets/message.md):消息控件 +* [Error](widgets/error.md):错误信息控件 +* [PopupForm](widgets/popupform.md):弹出表单控件 +* [MiniForm](widgets/meniform.md):多选单一输入表单 +* [Modal](widgets/modal.md):独占控件 +* [ModalForm](widgets/modalform.md):独占表单 +* [MultipleStateImage](widgets/multiplestateimage.md):多状态图像显示控件 +* [ScrollPanel](widgets/scrollpanel.md):滚动面板 +* [VScrollPanel](widgets/vscrollpanel.md):纵向滚动面板 +* [HScrollPanel](widgets/hscrollpanel.md):横向滚动面板 +* [TabPanel][widgets/tabpanel.md):标签面板控件 +* [Toolbar](widgets/toolbar.md):工具条控件 +* [Tree](widgets/tree.md):树状显示控件 +* [EditableTree](widgets/editabletree.md):可编辑树状显示控件 +* [VideoPlayer](widgets/videoplayer.md):视频播放器控件 +* [Text](widgets/text.md):正文控件 +* [Title1](widgets/title1.md):标题1控件 +* [Title2](widgets/title2.md):标题2控件 +* [Title3](widgets/title3.md):标题3控件 +* [Title4](widgets/title4.md):标题4控件 +* [Title5](widgets/title5.md):标题5控件 +* [Title6](widgets/title6.md):标题6控件 + +# diff --git a/docs/cn/widgets/BoxLayout.md b/docs/cn/widgets/BoxLayout.md new file mode 100644 index 0000000..6ab5277 --- /dev/null +++ b/docs/cn/widgets/BoxLayout.md @@ -0,0 +1,21 @@ +# BoxLayout +Boxlayout is a one direction layout, it layout subwidgets on vertical direction or horizontal direction. + +## use case +none +## inheritance +BoxLayout inherited from Layout +## options +``` +{ + orientation: +} +``` +### orientation +orientation get value of 'vertical' or 'horizontal', means layout child widget in veritcal or horizontal direction + +### +## method +none +## event +none diff --git a/docs/cn/widgets/README.md b/docs/cn/widgets/README.md new file mode 100644 index 0000000..d582e52 --- /dev/null +++ b/docs/cn/widgets/README.md @@ -0,0 +1,43 @@ +# Bricks documentation +[中文文档请看这里](cn/README.md) + +A web application development platform to make the web application development more easy. +It let developments choose the UI components provide by bricks or provide by third parts to construct his or her application just like use bricks to build toys. + +## Installation +## Use Case +## Widget List +[Widgets](widgets.md) + +## UI Components +### Layout +Layout is the base Layout, please click [Layout](layout.md) for more detail. + +### BoxLayout +BoxLayout is a one direction layout, for more information, please click [BoxLayout](boxlayout.md) + + +### HBox +HBox is a layout to layout subwidgets in horizontal direction, please click [HBox](hbox.md) for more information. +### VBox +VBox is a layout to layout its subwidgets in vertical direction, please click [VBox](vbox.md) for more information. +### Text +### Title1 +### Title2 +### Title3 +### Title4 +### Title5 +### Title6 +### Image +Image show image on you dom tree, please click [image](image.md) for more information about Image widget + +### MarkdownViewer +a markdown document viewer widget, for more information, please see [markdownviewer](markdownviewer.md) + +### VideoPlayer +a video player widget base on [indigo-player](https://github.com/matvp91/indigo-player), please look at [videoplayer](videoplayer.md) for more information. + +### Modal +### Toolbar +toolbar component provide user a toobar service, for more information pleaseclick [toolbar](toolbar.md) + diff --git a/docs/cn/widgets/accordion.md b/docs/cn/widgets/accordion.md new file mode 100644 index 0000000..86bcd36 --- /dev/null +++ b/docs/cn/widgets/accordion.md @@ -0,0 +1,94 @@ +# accordion + +## 用法 + +```html + + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\accordion.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------ | ------ | -------- | --------- | ------ | +| widgettype | 控件类型 | String | 是 | Accordion | --- | +| options | 控件的配置项 | Object | 是 | --- | --- | + +### widget.options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| --------- | ------------ | ------ | -------- | ------ | ------ | +| item_size | 控件的高度 | String | 是 | --- | --- | +| items | 控件的配置项 | Array | 是 | --- | --- | + +#### widget.options.items参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------- | ---------------- | ------ | -------- | ------ | ------ | +| name | 原生name属性 | String | 是 | --- | --- | +| icon | 图标 | String | 否 | --- | --- | +| text | 默认显示的文字值 | String | 否 | --- | --- | +| content | 控件内容的配置项 | Objet | 是 | --- | --- | + +##### widget.options.items参数内content参数说明(当content.widgettype值为Text时) + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | ---------------- | ------- | -------- | ---------- | ------ | +| text | 默认显示的文字值 | String | 否 | --- | --- | +| i81n | 是否国际化 | Boolean | 否 | true/false | --- | + diff --git a/docs/cn/widgets/audio.md b/docs/cn/widgets/audio.md new file mode 100644 index 0000000..d8d75b5 --- /dev/null +++ b/docs/cn/widgets/audio.md @@ -0,0 +1,55 @@ +# audio + +## 用法 + +```html + + + + + + + + + +``` + + + +## 效果图 + +![](F:\mh\bricks\docs\images\audio.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------------- | ------ | -------- | ------ | ------ | +| id | 控件的唯一标识 | String | 是 | --- | --- | +| widgettype | 控件类型 | String | 是 | --- | --- | + +### widget.options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| -------- | ------------ | ------- | -------- | ---------- | ------ | +| autoplay | 是否可以暂停 | Boolean | 是t | true/false | --- | +| url | 数据来源地址 | String | 是 | --- | --- | \ No newline at end of file diff --git a/docs/cn/widgets/blankIcon.md b/docs/cn/widgets/blankIcon.md new file mode 100644 index 0000000..56ebfbb --- /dev/null +++ b/docs/cn/widgets/blankIcon.md @@ -0,0 +1,47 @@ +# Blankicon + +此控件是显示图标控件 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +## options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------ | -------- | ------ | -------- | ------ | ------ | +| url | 图标来源 | String | 是 | --- | --- | +| height | 高度 | String | 是 | 百分比 | --- | +| width | 宽度 | String | 是 | 百分比 | --- | + + + diff --git a/docs/cn/widgets/brickindex.md b/docs/cn/widgets/brickindex.md new file mode 100644 index 0000000..01ac71d --- /dev/null +++ b/docs/cn/widgets/brickindex.md @@ -0,0 +1,16 @@ +| 页面名称 | html文件 | js文件 | 说明文件是否完成 | +| ------------ | -------- | ------ | ---------------- | +| accordion | √ | √ | √ | +| audio | √ | √ | √ | +| aggrid | x | √ | x | +| button | √ | √ | √ | +| datagrid | √ | √ | x(html页面报错) | +| docs | √ | x | √ | +| editabletree | √ | √ | √ | +| error | √ | x | x(无html页面) | +| message | √ | √ | √ | +| tab | √ | √ | √ | +| toolbar | √ | √ | √ | +| tree | √ | √ | √ | +| video | √ | √ | √ | + diff --git a/docs/cn/widgets/button.md b/docs/cn/widgets/button.md new file mode 100644 index 0000000..e31ddc9 --- /dev/null +++ b/docs/cn/widgets/button.md @@ -0,0 +1,118 @@ +# button + +## 用法 + +```html + + + + + + + + + + + + + +``` + +## 示例 + +![本地png图片](F:\mh\bricks\docs\images\button.png) + +### widget 参数说明 + +控件实例 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------------- | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | Hbox | --- | +| options | 控件样式 | Object | 否 | --- | --- | +| subwidgets | 控件 | Array | 否 | --- | --- | +| binds | 控件绑定的事件 | Array | 否 | --- | --- | + +#### widget .options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------ | -------- | ------ | -------- | --------- | ------ | +| height | 高度 | String | 是 | auto/100% | --- | +| width | 宽度 | String | 是 | auto/100% | --- | + +#### widget .subwidgets + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------------- | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | Button | --- | +| options | 控件详细配置项 | Object | 是 | --- | --- | + +##### options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ----------- | -------------- | ------- | -------- | ---------- | ---------- | +| name | 控件的属性 | String | 是 | text | --- | +| icon | 图标 | String | 是 | --- | --- | +| label | 默认文本值 | String | 否 | --- | --- | +| tooltip | 提示文本 | String | 否 | --- | --- | +| nonepack | 是否自身有边框 | Boolean | 是 | true/false | --- | +| orientation | 排列方向 | String | 是 | horizontal | horizontal | + +#### widget .binds + +此项为绑定的事件 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------------ | ------ | -------- | ------ | ------ | +| wid | 事件执行的对象 | String | 是 | self | --- | +| event | 事件执行类型 | String | 是 | click | --- | +| actiontype | 事件执行的程序类型 | String | 是 | --- | --- | +| script | 事件执行的具体方法 | String | 是 | --- | --- | + diff --git a/docs/cn/widgets/docs.md b/docs/cn/widgets/docs.md new file mode 100644 index 0000000..16dd01d --- /dev/null +++ b/docs/cn/widgets/docs.md @@ -0,0 +1,44 @@ +# docs + +## 用法 + +```html + + + + + + + + + + +``` + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------- | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | --- | --- | + +### widget.options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| --------- | ---------------- | ------- | -------- | ---------- | ------ | +| navigator | 是否可以导航指向 | Boolean | 是 | true/false | --- | +| md_url | 数据来源地址 | String | 是 | --- | --- | \ No newline at end of file diff --git a/docs/cn/widgets/editabletree.md b/docs/cn/widgets/editabletree.md new file mode 100644 index 0000000..2ae0fcb --- /dev/null +++ b/docs/cn/widgets/editabletree.md @@ -0,0 +1,50 @@ +# editabletree + +## 用法 + +```html + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\editabletree.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ---------- | ------ | -------- | --------- | ------ | +| widgettype | 控件类型 | String | 是 | urlwidget | --- | +| options | 控件配置项 | Object | 是 | --- | --- | + +### options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------- | ------ | -------- | ------ | ------ | +| url | 数据来源 | String | 是 | --- | --- | + +**注意:url可以是个json文件** diff --git a/docs/cn/widgets/error.md b/docs/cn/widgets/error.md new file mode 100644 index 0000000..e164d2e --- /dev/null +++ b/docs/cn/widgets/error.md @@ -0,0 +1,9 @@ +# error + +# 用法 + +```html +``` + + + diff --git a/docs/cn/widgets/form.md b/docs/cn/widgets/form.md new file mode 100644 index 0000000..541adcf --- /dev/null +++ b/docs/cn/widgets/form.md @@ -0,0 +1,377 @@ +# form + +## 用法 + +```html + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\form.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ----------------------------- | ------ | -------- | --------- | ---------------- | +| widgettype | 控件类型 | String | 是 | Vbox/Hbox | --- | +| options | 当前控件的配置项 | Object | 是 | height | 100%/auto/scroll | +| id | 控件的唯一标识 | String | 否 | --- | ---- | +| subwidgets | 表单里的内容,比如表单里的子项 | Object | 否 | --- | --- | +| binds | 绑定的事件 | Object | 否 | --- | --- | + +**注意:** + +**如果没有widget.subwidgets参数的话,表单是一个框架,没有子级,但是还可已继续添加事件** + +### widgent.subeidgets参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------------------------------- | ------ | -------- | --------- | ---------------- | +| widgettype | 控件类型 | String | 是 | Vbox/Hbox | --- | +| options | 当前控件的配置项 | Object | 是 | height | 100%/auto/scroll | +| subwidgets | 表单里的内容的配置项,比如表单里的子项 | Object | 否 | ---- | --- | + +**注意:此处widgettype的值不一样,options的配置项也不相同** + +#### widgettype值为Hbox时,相关配置项的参数说明 + +##### options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------- | ---------------- | ------ | -------- | ---------------- | ------ | +| options | 表单子项的配置项 | object | 是 | {"heigt":"auto"} | --- | + +##### subwidgets配置项参数说明 + +**注意:subwidgets.widgettype的值不一样,相对的options的参数也不相同** + +* widgettype值为"Text"时,options参数说明 + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | ----- | -------------- | ------- | -------- | ---------- | ------ | + | otext | 默认显示的文字 | String | 否 | --- | --- | + | i18n | 是否国家化 | Boolean | 否 | true/false | --- | + +* widgettype值为"Button"时,options参数说明 + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | --------- | -------------- | ------ | -------- | --------- | ------ | + | label | 表单子项的标题 | String | 否 | --- | --- | + | width | 表单子项的宽度 | String | 否 | auto/100% | --- | + | item_rate | 字体的大小 | number | 否 | --- | --- | + +* binds事件参数说明 + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | ---------- | -------------------- | ------ | -------- | ------ | ------ | + | wid | 当前节点的唯一标识 | String | 是 | self | --- | + | event | 事件的类型 | String | 是 | click | --- | + | actiontype | 事件的执行方式 | String | 是 | script | --- | + | target | 事件在哪个载体执行 | String | 是 | --- | --- | + | script | 事件通过哪个方法执行 | String | 是 | --- | --- | + + + +#### widgettype值为Form时,相关配置项的参数说明 + +##### options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ----------- | ------------------------ | ------ | -------- | ------ | ------ | +| submit_url | 接口地址 | String | 是 | --- | --- | +| title | 标题 | String | 否 | --- | --- | +| description | 描述 | String | 否 | --- | --- | +| fields | 表单的子项的具体配置内容 | Array | 否 | --- | --- | + +###### options.fieds参数说明 + +**注意:options.fieds内,每一项的uitype值不一样,其配置项也不同** + +* uitype为email时的参数配置(**注意:email为邮件格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + +* uitype为tel时的参数配置(**注意:tel为手机号格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | pattern | 当前项的正则校验 | String | 否 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + +* uitype为file时的参数配置(**注意:file为上传文件格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + +* uitype为str时的参数配置(**注意:str为文字格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | --------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | minlength | 当前值的最少字符数量 | number | 否 | --- | --- | + | length | 当前值的最大字符数量 | number | 否 | --- | --- | + | value | 当前子项默认显示的值 | String | 否 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + ++ uitype为int时的参数配置(**注意:int为数字格式**) + + **注意:uitype为int时,数值可以点击增加或者减少,且只能填入数字)** + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | --------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | minlength | 当前值的最少字符数量 | number | 否 | --- | --- | + | length | 当前值的最大字符数量 | number | 否 | --- | --- | + | value | 当前子项默认显示的值 | String | 否 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + ++ uitype为float时的参数配置(**注意:float为浮点数字格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | ---------- | -------------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | dec_length | 当前值能显示的最少浮点位数 | number | 否 | --- | --- | + | length | 当前值能显示的最多浮点位数 | number | 否 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + ++ uitype为date时的参数配置(**注意:data为时间格式**) + + **注意:此项可以填写时间,也可以选择时间** + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + +* uitype为password时的参数配置(**注意:password为密码格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | --------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | minlength | 当前值的最少字符数量 | number | 否 | --- | --- | + | length | 当前值的最大字符数量 | number | 否 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + +* uitype为chexkbox时的参数配置(**注意:chexkbox为复选格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ------------------------------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + | value | 当前子项默认显示的值 | number | 否 | --- | --- | + | dataurl | 当前项的值的来源,接口地址或者是JSON文件地址 | String | 是 | --- | --- | + +* uitype为code时的参数配置(**注意:code为下拉选择格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ------------------------------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | + | value | 当前子项默认显示的值 | number | 否 | --- | --- | + | dataurl | 当前项的值的来源,接口地址或者是JSON文件地址 | String | 是 | --- | --- | + +* uitype为text时的参数配置(**注意:text为文本框格式**) + + | 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | + | -------- | ---------------------- | ------- | -------- | ---------- | ------ | + | uitype | 表单子项的类型 | String | 是 | --- | --- | + | value | 当前子项默认显示的值 | String | 否 | --- | --- | + | name | 表单子项的原生name属性 | String | 是 | --- | --- | + | label | 当前子项的标签文本 | String | 否 | --- | --- | + | required | 是否必须 | Boolean | 是 | true/false | --- | diff --git a/docs/cn/widgets/hbox.md b/docs/cn/widgets/hbox.md new file mode 100644 index 0000000..f3d5bb3 --- /dev/null +++ b/docs/cn/widgets/hbox.md @@ -0,0 +1,36 @@ +# HBox +Hbox是一个水平布局小部件,它按水平方向布局子小部件 +## 用法 +```html + + + + + + + + + + + + + +``` + + + +**注意:hbox控件是水平排列的控件,相当于一个容器,可以容纳其他的控件,如button,form等** + diff --git a/docs/cn/widgets/hfiller.md b/docs/cn/widgets/hfiller.md new file mode 100644 index 0000000..8d4e017 --- /dev/null +++ b/docs/cn/widgets/hfiller.md @@ -0,0 +1,14 @@ +# Hfiller + +此控件为容器横向排列时,若宽度过宽,自动填充 + +## option参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------- | -------- | ------ | -------- | ------ | ------ | +| baseURI | 数据路径 | String | 是 | --- | --- | +| tooltip | 提示 | String | 是 | --- | --- | +| css | 样式 | String | 否 | --- | --- | +| csses | 样式 | String | 否 | --- | --- | + +此控件为样式排列控件 \ No newline at end of file diff --git a/docs/cn/widgets/icon.md b/docs/cn/widgets/icon.md new file mode 100644 index 0000000..6b5d4a6 --- /dev/null +++ b/docs/cn/widgets/icon.md @@ -0,0 +1,55 @@ +# Icon + +## 用法 + +```html + + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\icon.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ---------------- | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | Icon | -- | +| options | 控件的详细配置项 | Object | 是 | --- | --- | + +### options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------ | -------- | ------ | -------- | -------- | ------ | +| url | icon来源 | String | 是 | --- | -- | +| height | 高度 | String | 否 | 百分比值 | --- | +| width | 宽度 | String | 否 | 百分比值 | --- | + +**注意:options参数的height和width参数不写,那么这两项的默认值是'100%'** \ No newline at end of file diff --git a/docs/cn/widgets/image.md b/docs/cn/widgets/image.md new file mode 100644 index 0000000..aca5fcb --- /dev/null +++ b/docs/cn/widgets/image.md @@ -0,0 +1,55 @@ +# Image +Image widget show image +# 用法 +```html + + + + + + + + + + + + + +``` +the result is
+![image](F:\mh\bricks\docs\images\image.png) + +## inheritance +Image inherited from JsWidget + +## options +``` +{ + "url": + "width": + "height": +} +``` +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------ | -------- | ------ | -------- | ---------- | ------ | +| url | 照片路径 | String | 是 | --- | --- | +| width | 宽度 | String | 是 | 百分比数值 | --- | +| height | 高度 | String | 是 | 百分比数值 | --- | + diff --git a/docs/cn/widgets/index.md b/docs/cn/widgets/index.md new file mode 100644 index 0000000..42061c0 --- /dev/null +++ b/docs/cn/widgets/index.md @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/docs/cn/widgets/input.md b/docs/cn/widgets/input.md new file mode 100644 index 0000000..f8ea31f --- /dev/null +++ b/docs/cn/widgets/input.md @@ -0,0 +1,79 @@ +# input + +# 用法 + +```html + + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\input.png) + +## options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| -------- | -------------- | ------ | -------- | ------ | ------ | +| name | 控件的原生属性 | String | 是 | --- | --- | +| label | 文本标签 | String | 是 | --- | --- | +| required | 是否必填 | String | 是 | --- | --- | + +**注意:input内容不一样,widgettype的值也不一样.** + +1.字符串:UiStr; + +2.手机号:UiTel; + +3.时间日期:UiDate; + +4.整数:UiInt; + +5.浮点数:UiFloat; + +6.多选:UiCheckBox; + +7.单选:UiCheck; + +8.邮箱:UiEmail; + +9.上传文件:UiFile; + +10.下拉选择:Code; + +11.文本框:UiText; + +12.密码框:UiPassword; + +13.音频:UiAudio; + +14.视频:UiVideo; + + + diff --git a/docs/cn/widgets/layout.md b/docs/cn/widgets/layout.md new file mode 100644 index 0000000..251ff44 --- /dev/null +++ b/docs/cn/widgets/layout.md @@ -0,0 +1,16 @@ +# Layout +Layout is a layout widget for layout widgets inside it +## use case +none +## inheritance +Layout inherited from JsWidget +## options +## method +### add_widget +add_widget(w) append a widget name by w, to the caller +### remove_widget +remove_widget(w) remove widget named by w from caller's children +### clear_widgets +clear_widgets() remove all children widget. +## event +none diff --git a/docs/cn/widgets/markdownviewer.md b/docs/cn/widgets/markdownviewer.md new file mode 100644 index 0000000..61a016e --- /dev/null +++ b/docs/cn/widgets/markdownviewer.md @@ -0,0 +1,58 @@ +# MarkdownView + +**此控件可以完成一个指向md文件的操作** + +# 用法 + +```html + + + + + + +
+ + + + + + +``` + + + +# options + +## md_url + +此属性是指向要打开的md文件,是md文件的路径 + diff --git a/docs/cn/widgets/message.md b/docs/cn/widgets/message.md new file mode 100644 index 0000000..c94549b --- /dev/null +++ b/docs/cn/widgets/message.md @@ -0,0 +1,143 @@ +# Message + +## 用法 + +```html + + + + + + + + + + + + +``` + +## 示例 + +![](F:\mh\bricks\docs\images\message.png) + +## 参数说明 + +### widget.type + +控件的类型.(控件有多种类型,如:Form,Image...等等) + +### widget.options参数说明 + +| 参数 | 说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| --------- | -------------------- | ------- | -------- | ---------- | ------ | +| idField | 当前节点的唯一标识 | String | 是 | --- | --- | +| textField | 当前节点的label | String | 是 | --- | --- | +| is_leaf | 是否可以展开 | Boolean | 否 | true/false | --- | +| data | 文件夹具体信息的集合 | Array | 否 | --- | --- | + +#### options.data参数说明 + +options.data参数的key必须和widget.options参数的value一致,比如widget.options.idField="id",那么options.data参数的key就是"options.data.id" .另外多了一个children参数,是对象形式,参数与options.data的参数保持一致. + +注意:**如果想下写一级目录,就添加children参数对象** + +## 事件 + +none diff --git a/docs/cn/widgets/miniform.md b/docs/cn/widgets/miniform.md new file mode 100644 index 0000000..1927ad6 --- /dev/null +++ b/docs/cn/widgets/miniform.md @@ -0,0 +1,135 @@ +# MiniForm + +## 用法 + +### 写法一: + +```html + + + + + + + + + + + + +``` + +miniform.json: + +```json +{ + "widgettype":"MiniForm", + "options":{ + "label_width":"100px", + "fields":[ + { + "name":"test1", + "label":"姓名", + "uitype":"str" + }, + { + "name":"test2", + "label":"性别", + "uitype":"str" + }, + { + "name":"test3", + "label":"地址", + "uitype":"str" + } + ] + } +} +``` + +### 写法二: + +```html + + + + + + + + + + + + + + +``` + + + +## 效果图 + +![](F:\mh\bricks\docs\images\miniform.png) + +## options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ----------- | ------------------ | ------ | -------- | ------ | ------ | +| label_width | 控件标签的宽度 | String | 是 | --- | --- | +| fields | 控件子项的详细信息 | Array | 是 | --- | --- | + +#### options.fields参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------ | -------------- | ------ | -------- | ----------- | ------ | +| name | 控件的原生属性 | String | 是 | --- | --- | +| label | 文本标签 | String | 否 | --- | --- | +| uitype | 控件类型 | String | 否 | str(字符串) | --- | + + + diff --git a/docs/cn/widgets/modal.md b/docs/cn/widgets/modal.md new file mode 100644 index 0000000..cf619ca --- /dev/null +++ b/docs/cn/widgets/modal.md @@ -0,0 +1,78 @@ +# modal + +# 用法 + +```html + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\modal.png) + +# options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------------------------ | ------- | -------- | ---------- | ------ | +| auto_close | 点击弹窗以外的区域是否关闭弹窗 | Boolean | 是 | true/false | --- | +| auto_close | 是否默认打开弹窗 | Boolean | 是 | true/false | --- | +| width | 宽度 | String | 是 | 百分比 | --- | +| height | 高度 | String | 是 | 百分比 | --- | +| archor | 控件的位置 | String | 是 | --- | --- | +| org_index | 控件图层层级 | String | 是 | --- | --- | + +**注意:archor的值所代表的位置** + +* tl:在屏幕的左上角 + +* tc:在屏幕顶部的中间 + +* tr:在屏幕的右上角 + +* cl:在屏幕中间部分的左侧 + +* cc:在屏幕的中心位置 + +* cr:在屏幕中间部分的右侧 + +* bl:在屏幕的左下角 + +* bc:在屏幕底部的中间 + +* br:在屏幕的右下角 + + diff --git a/docs/cn/widgets/pw.md b/docs/cn/widgets/pw.md new file mode 100644 index 0000000..18b0715 --- /dev/null +++ b/docs/cn/widgets/pw.md @@ -0,0 +1,7 @@ +# Widget Name +description of the Widget +## use case +## inheritance +## options +## method +## event diff --git a/docs/cn/widgets/tab.md b/docs/cn/widgets/tab.md new file mode 100644 index 0000000..8ce64d5 --- /dev/null +++ b/docs/cn/widgets/tab.md @@ -0,0 +1,113 @@ +# tab + +此函数用于创建tab组件 + +## 用法 + +```html + + + + + + + + + + + + +``` + + + +## 示例 + +![本地png图片](F:\mh\bricks\docs\images\tab.png) + +## widget.options参数说明 + +| 参数 | 说明 | 类型 | 可选值 | 默认值 | +| -------- | ---- | ------ | --------------------- | ------ | +| tab_wide | 尺寸 | string | auto | auto | +| height | 高 | string | ---- | ---- | +| tab_long | 宽 | string | ---- | ---- | +| tab_pos | 位置 | string | top/bottom/left/right | ----- | + +### options.items参数说明 + +一个items为一个tab项 + +| 参数 | 说明 | 类型 | 可选值 | 默认值 | +| --------- | ------------------------------------------------- | ------- | ------ | ------ | +| name | 与选项卡绑定值 value 对应的标识符,表示选项卡别名 | string | ---- | ---- | +| label | 选项卡标题 | string | ---- | ---- | +| removable | 是否移除选项卡 | boolean | ---- | false | +| content | 选项卡的内容 | | | | + +## 事件 + +none + diff --git a/docs/cn/widgets/text.md b/docs/cn/widgets/text.md new file mode 100644 index 0000000..dc25db0 --- /dev/null +++ b/docs/cn/widgets/text.md @@ -0,0 +1,153 @@ +# Text + +Text is a widget to show text +## 用法 + +```html + + + + + + + + + + + + +``` + + + +## 效果图 + +![](F:\mh\bricks\docs\images\text.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------------- | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | --- | --- | +| options | 控件的配置项 | Object | 是 | --- | --- | +| subwidgets | 控件子项的配置 | Object | 否 | --- | --- | + +### widget.subwidgets参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------ | ------ | -------- | ------ | ------ | +| widgettype | 控件类型 | String | 是 | --- | --- | +| options | 控件的配置项 | Object | 是 | --- | --- | + +#### options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | ------------ | ------- | -------- | ---------- | ------ | +| text | 默认显示的值 | String | 否 | --- | --- | +| i18n | 是否国际化 | Boolean | 否 | true/false | --- | diff --git a/docs/cn/widgets/title1.md b/docs/cn/widgets/title1.md new file mode 100644 index 0000000..a500885 --- /dev/null +++ b/docs/cn/widgets/title1.md @@ -0,0 +1,92 @@ +# title1 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/title2.md b/docs/cn/widgets/title2.md new file mode 100644 index 0000000..d4e7a52 --- /dev/null +++ b/docs/cn/widgets/title2.md @@ -0,0 +1,92 @@ +# title2 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/title3.md b/docs/cn/widgets/title3.md new file mode 100644 index 0000000..7cba634 --- /dev/null +++ b/docs/cn/widgets/title3.md @@ -0,0 +1,92 @@ +# title3 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/title4.md b/docs/cn/widgets/title4.md new file mode 100644 index 0000000..0b6ea80 --- /dev/null +++ b/docs/cn/widgets/title4.md @@ -0,0 +1,92 @@ +# title4 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/title5.md b/docs/cn/widgets/title5.md new file mode 100644 index 0000000..6737d29 --- /dev/null +++ b/docs/cn/widgets/title5.md @@ -0,0 +1,92 @@ +# title5 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/title6.md b/docs/cn/widgets/title6.md new file mode 100644 index 0000000..b00ddc5 --- /dev/null +++ b/docs/cn/widgets/title6.md @@ -0,0 +1,92 @@ +# title6 + +此控件是标题控件,标题也有大小 + +# 用法 + +```html + + + + + + + + + + + + + +``` + +# 效果图 + +![](F:\mh\bricks\docs\images\title.png) + +# options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | -------------- | ------- | -------- | ---------- | ------ | +| text | 标题的文本内容 | String | 是 | --- | --- | +| i18n | 是否国际化 | Boolean | 是 | true/false | --- | + diff --git a/docs/cn/widgets/toolbar.md b/docs/cn/widgets/toolbar.md new file mode 100644 index 0000000..09d9030 --- /dev/null +++ b/docs/cn/widgets/toolbar.md @@ -0,0 +1,105 @@ +# Toolbar +The Toolbar widget provides a toolbar componets which provide a tool bar interface service, and you can add, delete tool at runtime dynamicly. +## use case +``` + + + + + + + + + + +``` +and the result like this:
+![toolbar screenshot](toolbar.png) + +## inheritance +Toolbar inherited from BoxLayout + +## options +``` + { + orientation: + tools: + } +``` +### orientation +should be 'vertical' means tool widgets will arrange in vertical or 'horizontal' means tool widgets will arrange in horizontal +### tools: +a array contains a list of tool objects + +### tool object +tool object has following properties: +``` + { + icon: + name: + label: + removable: + } +``` +#### icon is a image url, it is optional, if present, the tool will show a icon before the tool's text +#### name +name is a itendify field for the tools, it should be unique in this tools of this options scope. +#### label +label will translate by i18n for the language user used, and the result will be show. if label is miss, use the name of the tool object. +#### removable +if removable is true, the tool widget will append a delete image widget, and will remove the tool widget if user click the delete image widget. + + +## method +### createTool +createTool(toolOptions) + +createTool create a tool widget and append the to end of the toolbar. + +## event +toolbar has some events other widgets can bind to, they are: +### ready +after constructor call finished, and all the tools built, toolbar will fire this event + +### command +after user click on one of the tool widgets, toolbar will fire this event with the tool's options used to construct it as the parameters, can get the parameters using "event.params" +. +### remove +after user click delete image widget, toolbar delete the tool widget from toolbar, and fire this event. diff --git a/docs/cn/widgets/toolbarNew.md b/docs/cn/widgets/toolbarNew.md new file mode 100644 index 0000000..3eba0cf --- /dev/null +++ b/docs/cn/widgets/toolbarNew.md @@ -0,0 +1,88 @@ +# Toolbar + +## 用法 + +```html + + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\toolbar.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ------------ | ------ | -------- | ------- | ------ | +| widgettype | 控件类型 | String | 是 | Toolbar | --- | +| options | 控件的配置项 | Object | 是 | --- | --- | + +### widget.options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ----------- | ------------------ | ------ | -------- | ------------------- | ------ | +| target | 参数返回值 | String | 否 | --- | --- | +| orientation | 控件的方向 | Object | 是 | horizontal/vertical | --- | +| tool_margin | 控件子项间的距离 | String | 否 | --- | --- | +| tools | 控件子项的具体信息 | Array | 否 | --- | --- | + +#### tools参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ----- | -------- | ------ | -------- | ------- | ------ | +| name | 原生属性 | String | 是 | Toolbar | --- | +| Label | 标签文本 | String | 是 | --- | --- | +| icon | 图标 | String | 是 | --- | --- | + +**icon可以指向一个相对路径或者绝对路径的图标,若引入图标,则会显示在tools的前面.若没有label属性,则显示的文本是name属性的值** + diff --git a/docs/cn/widgets/tree.md b/docs/cn/widgets/tree.md new file mode 100644 index 0000000..27a6cb6 --- /dev/null +++ b/docs/cn/widgets/tree.md @@ -0,0 +1,52 @@ +# Tree + +## 用法 + +```html + + + + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\tree.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | ---------- | ------ | -------- | --------- | ------ | +| widgettype | 控件类型 | String | 是 | urlwidget | --- | +| options | 控件配置项 | Object | 是 | --- | --- | + +**options为树形结构的数据来源** + +### options + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---- | ------------ | ------ | -------- | ------ | ------ | +| url | 控件数据来源 | String | 是 | --- | --- | + diff --git a/docs/cn/widgets/vbox.md b/docs/cn/widgets/vbox.md new file mode 100644 index 0000000..d059f73 --- /dev/null +++ b/docs/cn/widgets/vbox.md @@ -0,0 +1,11 @@ +# VBox +Vbox is a vertical layout widget, it layout subwidgeta in vertical direction +## use case +## inheritance +VBox inherited fromm BoxLayout +## options + +## method +none +## event +none diff --git a/docs/cn/widgets/vfiller.md b/docs/cn/widgets/vfiller.md new file mode 100644 index 0000000..de6389f --- /dev/null +++ b/docs/cn/widgets/vfiller.md @@ -0,0 +1,14 @@ +# Vfiller + +此控件为容器纵向排列时,若宽度过宽,自动填充 + +## option参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ------- | -------- | ------ | -------- | ------ | ------ | +| baseURI | 数据路径 | String | 是 | --- | --- | +| tooltip | 提示 | String | 是 | --- | --- | +| css | 样式 | String | 否 | --- | --- | +| csses | 样式 | String | 否 | --- | --- | + +此控件为样式排列控件 \ No newline at end of file diff --git a/docs/cn/widgets/video.md b/docs/cn/widgets/video.md new file mode 100644 index 0000000..22bd8c9 --- /dev/null +++ b/docs/cn/widgets/video.md @@ -0,0 +1,52 @@ +# video + +## 用法 + +```html + + + + + + + + + +``` + +## 效果图 + +![](F:\mh\bricks\docs\images\video.png) + +## widget参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| ---------- | -------------- | ------ | -------- | ----------- | ------ | +| id | 控件的唯一标识 | String | 是 | --- | --- | +| widgettype | 控件的类型 | String | 是 | VideoPlayer | --- | +| options | 详细配置项 | Object | 是 | --- | --- | + +### options参数说明 + +| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 | +| -------- | ---------------- | ------- | -------- | ---------- | ------ | +| autoplay | 视频是否可以暂停 | Boolean | 是 | true/false | --- | +| url | 视频来源地址 | String | 是 | --- | --- | +| type | 视频类型 | String | 是 | mp4 | --- | diff --git a/docs/cn/widgets/videoplayer.md b/docs/cn/widgets/videoplayer.md new file mode 100644 index 0000000..acaf002 --- /dev/null +++ b/docs/cn/widgets/videoplayer.md @@ -0,0 +1,87 @@ +# VideoPlayer + +## Usage +### play a mp4 file +``` + + + + + + + + +``` +### play a m3u8 stream +``` + + + + + + + + + +``` +you will see ti like this +![example video](m3u8.png "see it?") +## options +to be a VideoPlayer instance, you need to provide a options with contains +following attributes +### source +the url of a video resouce, VideoPlayer can play mp4, m3u8 video +### srctype +specify the source type, should be 'mp4' or 'hls' for m3u8 'dash' for play a Dash manifest +## play avi file +!v[sample video](http://kimird.com/video/sample-avi-file.avi) +## play flv file +!v[sample video](http://kimird.com/video/sample-flv-file.flv) +## play mkv file +!v[sample video](http://kimird.com/video/sample-mkv-file.mkv) +## play mov file +!v[sample video](http://kimird.com/video/sample-mov-file.mov) +## play mp4 file +!v[sample video](http://kimird.com/video/sample-mp4-file.mp4) +## play webm file +!v[sample video](http://kimird.com/video/sample-webm-file.webm) +## play m3u8 file +!v[abc news TV](https://abc-iview-mediapackagestreams-2.akamaized.net/out/v1/6e1cc6d25ec0480ea099a5399d73bc4b/index.m3u8) diff --git a/docs/cn/widgets/widgets.md b/docs/cn/widgets/widgets.md new file mode 100644 index 0000000..585d97b --- /dev/null +++ b/docs/cn/widgets/widgets.md @@ -0,0 +1,52 @@ +# Bricks widgets +## Accordion (完成) +## AudioPlayer (完成) +## BlankIcon (完成) +## BoxLayout +[boxlayout](BoxLayout.md) + +## Button (完成) +## DataGrid (完成) +## EditableTree (完成) +## Error +## Form (完成) +## HBox (完成) +[hbox](HBox.md) + +## HFiller (完成) +## HScrollPanel +## Icon (完成) +## Image (完成) +[image](image.md) + +## MarkdownViewer (完成) +(markdown viewer](markdownviewer.md) +## Menu +## Message (完成) +## MiniForm (完成) +## Modal (完成) +## ModalForm +## MultipleStateImage +## PopupForm +## TabForm +## TabPanel (完成) +## Text (完成) +[text](text.md) +## Title1 (完成) +## Title2 (完成) +## Title3 (完成) +## Title4 (完成) +## Title5 (完成) +## Title6 (完成) +## Toolbar (完成) +[Toolbar](toolbar.md) +## Tree (完成) +## VBox (完成) +[VBox](vbox.md) + +## VFiller (完成) +## VScrollPanel +## Video (完成) +## VideoPlayer (与video一样) +[VideoPlayer](videoplayer.md) +## XTerminal(没有js文件) diff --git a/docs/cn/widgettypes.md b/docs/cn/widgettypes.md deleted file mode 100644 index 960d1db..0000000 --- a/docs/cn/widgettypes.md +++ /dev/null @@ -1,45 +0,0 @@ -# 控件列表 -Bricks内置许多的显示控件,所有显示控件都继承自JsWidget,容器控件Layout几就继承自JsWidget,其他的容器HBox, VBox继承自Layout - -# 控件继承树 - -# 控件清单 -* [JsWidget](jswidget.md): 祖先控件,对应于
元素 -* [Accordion](accordion.md):可折叠控件 -* [AudioPlayer](audioplayer.md):音频播放器 -* [Button](button.md):按钮控件 -* [DataGrid](datagrid.md):数据表格控件 -* [Form](form.md):输入表单控件 -* [Image](image.md):图片控件 -* [Icon](icon.md):图标控件 -* [BlankIcon](blackicon.js):空白图标控件 -* [HBox](hbox.md):横向布局器 -* [VBox](vbox.md):纵向布局器 -* [HFiller](hfiller.md):横向填充控件 -* [VFiller](vfiller.md):纵向填充控件 -* [MarkdownViewer](markdonwviewer.md):markdown文档显示控件 -* [Menu](menu.md):菜单控件 -* [Message](message.md):消息控件 -* [Error](error.md):错误信息控件 -* [PopupForm](popupform.md):弹出表单控件 -* [MiniForm](meniform.md):多选单一输入表单 -* [Modal](modal.md):独占控件 -* [ModalForm](modalform.md):独占表单 -* [MultipleStateImage](multiplestateimage.md):多状态图像显示控件 -* [ScrollPanel](scrollpanel.md):滚动面板 -* [VScrollPanel](vscrollpanel.md):纵向滚动面板 -* [HScrollPanel](hscrollpanel.md):横向滚动面板 -* [TabPanel][tabpanel.md):标签面板控件 -* [Toolbar](toolbar.md):工具条控件 -* [Tree](tree.md):树状显示控件 -* [EditableTree](editabletree.md):可编辑树状显示控件 -* [VideoPlayer](videoplayer.md):视频播放器控件 -* [Text](text.md):正文控件 -* [Title1](title1.md):标题1控件 -* [Title2](title2.md):标题2控件 -* [Title3](title3.md):标题3控件 -* [Title4](title4.md):标题4控件 -* [Title5](title5.md):标题5控件 -* [Title6](title6.md):标题6控件 - -#