Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/didi/cube-ui into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwangchong_i committed Nov 1, 2019
2 parents 5afe676 + a2b5d82 commit 31e120d
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 45 deletions.
2 changes: 1 addition & 1 deletion docs/example/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=UTF-8><title>cube-ui lib</title><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover"><link rel="shortcut icon" type=images/x-icon href=//webapp.didistatic.com/static/webapp/shield/Cube-UI_logo.ico><link href=css/app.b36957a7fe332937d57e92a706bb393d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.346dd10710fe9c0348bf.js></script><script type=text/javascript src=js/vendor.29d03d871a4abe1d7f9b.js></script><script type=text/javascript src=js/app.4a7497145dcaa9509a7d.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=UTF-8><title>cube-ui lib</title><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover"><link rel="shortcut icon" type=images/x-icon href=//webapp.didistatic.com/static/webapp/shield/Cube-UI_logo.ico><link href=css/app.b36957a7fe332937d57e92a706bb393d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.346dd10710fe9c0348bf.js></script><script type=text/javascript src=js/vendor.29d03d871a4abe1d7f9b.js></script><script type=text/javascript src=js/app.3411724ebb35f96f9e0b.js></script></body></html>
1 change: 1 addition & 0 deletions docs/example/js/app.3411724ebb35f96f9e0b.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/example/js/app.4a7497145dcaa9509a7d.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><meta name=x5-cache content=disable><meta name=keywords content=CUBE,UI,VUE,COMPONENT,LIB,LIBRARY><link rel="shortcut icon" type=images/x-icon href=//webapp.didistatic.com/static/webapp/shield/Cube-UI_logo.ico><title>cube-ui Document</title><link href=/cube-ui/css/app.eff0dd361031a52994230f4aae1f87da.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.fe9480018cb6a18ac975.js></script><script type=text/javascript src=/cube-ui/js/vendor.d333162a638d46cd8472.js></script><script type=text/javascript src=/cube-ui/js/app.ec660721c2d03ab33e9a.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><meta name=x5-cache content=disable><meta name=keywords content=CUBE,UI,VUE,COMPONENT,LIB,LIBRARY><link rel="shortcut icon" type=images/x-icon href=//webapp.didistatic.com/static/webapp/shield/Cube-UI_logo.ico><title>cube-ui Document</title><link href=/cube-ui/css/app.eff0dd361031a52994230f4aae1f87da.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.76739c52888ad08d51b9.js></script><script type=text/javascript src=/cube-ui/js/vendor.d333162a638d46cd8472.js></script><script type=text/javascript src=/cube-ui/js/app.ec660721c2d03ab33e9a.js></script></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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

6 changes: 3 additions & 3 deletions document/components/docs/en-US/checker.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Checker is more flexible selection component, you can alse customize the layout.
data() {
return {
checkerList: [3],
option: [
options: [
{
value: 1,
text: 'red'
Expand Down Expand Up @@ -167,7 +167,7 @@ Checker is more flexible selection component, you can alse customize the layout.
data() {
return {
checkerList: [2],
option: [
options: [
{
value: 1,
text: 'first',
Expand All @@ -188,7 +188,6 @@ Checker is more flexible selection component, you can alse customize the layout.
}
```


### Props configuration

| Attribute | Description | Type | Accepted Values | Default |
Expand Down Expand Up @@ -218,3 +217,4 @@ Checker is more flexible selection component, you can alse customize the layout.
| - | - | - |
| value | the value of checker item | String/Number |
| text | the text of checker item | String |
| disabled<sup>1.12.19</sup> | disabled state of checker item | Boolean |
7 changes: 7 additions & 0 deletions document/components/docs/en-US/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@ CubeForm is a schema-based form generator component.
| debounce<sup>1.8.0+</sup> | Debounce validating time(ms). If `trigger` is 'blur' then the debounce will be ignored | Number/Boolean | >= 0, if set to true the time will be 200(ms) | - |
| messages | Validator messages, see <a href="#/en-US/docs/validator#cube-Props-anchor">Validator</a> | String | - | - |

- `options` sub configuration

| Attribute | Description | Type | Accepted Values | Default |
| - | - | - | - | - |
| scrollToInvalidField | Whether to scroll to the first invalid fileld by default | Boolean | true/false | false |
| layout | Form layout style | String | standard/classic/fresh | standard |

#### FormGroup

| Attribute | Description | Type | Accepted Values | Default |
Expand Down
1 change: 1 addition & 0 deletions document/components/docs/en-US/scroll-nav-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Scroll navigation bar component, like DiDi business navigation.
| labels | the collection if all the item's keys | Array | - | [] |
| txts | the text of showcases, it's order is correspondence with `labels`, the item can be a HTML string value | Array | - | default equals to `labels` Prop |
| current | the key of the active item | String/Number | - | '' |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {} |

### Slot

Expand Down
2 changes: 1 addition & 1 deletion document/components/docs/en-US/scroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ Scroll components can meet the scrolling needs of most mobile applications. In t
| - | - | - | - | - |
| data | data used for list rendering | Array | - | [] |
| direction | scrolling direction | String | 'vertical', 'horizontal' | 'vertical' |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} |
| scrollEvents<sup>1.9.0</sup> | configure which scroll events need be triggered | Array | could include: 'scroll', 'before-scroll-start', 'scroll-end' | [] |
| listenScroll | whether to dispatch scroll event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |
| listenBeforeScroll | whether to dispatch before-scroll-start event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |
Expand Down
7 changes: 3 additions & 4 deletions document/components/docs/zh-CN/checker.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
data() {
return {
checkerList: [3],
option: [
options: [
{
value: 1,
text: 'red'
Expand Down Expand Up @@ -167,7 +167,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
data() {
return {
checkerList: [2],
option: [
options: [
{
value: 1,
text: 'first',
Expand All @@ -188,8 +188,6 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
}
```



### Props 配置

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
Expand Down Expand Up @@ -219,3 +217,4 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
| - | - | - |
| value | 选项的值 | String/Number |
| text | 选项的文本 | String |
| disabled<sup>1.12.19</sup> | 选项是否被禁用 | Boolean |
7 changes: 7 additions & 0 deletions document/components/docs/zh-CN/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@
| debounce<sup>1.8.0+</sup> | 控制校验节奏,值为时间,单位 ms。如果 trigger 设置为 blur 则此项配置不生效 | Number/Boolean | >= 0,如果设置为 true,那么时间就是 200(ms) | - |
| messages | 字段的校验消息,参见 <a href="#/zh-CN/docs/validator#cube-Props-anchor">Validator</a> | String | - | - |

- `options` 子配置项

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| - | - | - | - | - |
| scrollToInvalidField | 是否默认滚动到第一个无效字段位置 | Boolean | true/false | false |
| layout | 表单何种布局方式 | String | standard/classic/fresh | standard |

#### CubeFormGroup

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
Expand Down
1 change: 1 addition & 0 deletions document/components/docs/zh-CN/scroll-nav-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
| labels | 所有的 key 值集合 | Array | - | [] |
| txts | 显示所有文案集合,和 labels 一一对应,每项可以是 HTML 字符串 | Array | - | 默认等于 labes |
| current | 当前 active 的 key 值 | String/Number | - | '' |
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {} |

### 插槽

Expand Down
4 changes: 2 additions & 2 deletions lib/cube.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/form/form.min.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions lib/form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7346,6 +7346,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_this.$emit(EVENT_VALID, _this.validity);
_this.$emit(EVENT_SUBMIT, e, _this.model, _this.fieldsModel);
} else {
if (_this.options.scrollToInvalidField && _this.firstInvalidField) {
_this.firstInvalidField.$el.scrollIntoView();
}
e.preventDefault();
_this.$emit(EVENT_INVALID, _this.validity);
}
Expand All @@ -7367,11 +7370,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
var _this2 = this;

this.validate(function () {
if (_this2.invalid) {
if (_this2.options.scrollToInvalidField && _this2.firstInvalidField) {
_this2.firstInvalidField.$el.scrollIntoView();
}
}
cb && cb(_this2.valid);
});
},
Expand Down
Loading

0 comments on commit 31e120d

Please sign in to comment.