Skip to content

Commit 31e120d

Browse files
author
kimwangchong_i
committed
Merge branch 'dev' of https://github.com/didi/cube-ui into dev
2 parents 5afe676 + a2b5d82 commit 31e120d

29 files changed

+79
-45
lines changed

Diff for: docs/example/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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>
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.3411724ebb35f96f9e0b.js></script></body></html>

Diff for: docs/example/js/app.3411724ebb35f96f9e0b.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/example/js/app.4a7497145dcaa9509a7d.js

-1
This file was deleted.

Diff for: docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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>
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.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>

Diff for: docs/js/21.5a95626f892944ce441b.js renamed to docs/js/21.19534637b0693c168009.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/35.8abf3e85f831a05c8b13.js renamed to docs/js/35.98493f4ce51a84e5ada7.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/40.3b3a0e9a78a38f6a1834.js renamed to docs/js/40.12507c5b207ea7ba37f7.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/64.5fa3654dc13ed7ce1b3f.js renamed to docs/js/64.3860de2a569ff89f3b06.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/66.d06cadf3890e07a93166.js renamed to docs/js/66.823b95ac74d60b67566a.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/80.d3f5d07ed3f4fa726aeb.js renamed to docs/js/80.19c94a0ddf0ed2e20c37.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/85.28ec757b39b8a7a933fb.js renamed to docs/js/85.aa58b8b72d71c6764b8a.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/js/manifest.fe9480018cb6a18ac975.js renamed to docs/js/manifest.76739c52888ad08d51b9.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: document/components/docs/en-US/checker.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Checker is more flexible selection component, you can alse customize the layout.
128128
data() {
129129
return {
130130
checkerList: [3],
131-
option: [
131+
options: [
132132
{
133133
value: 1,
134134
text: 'red'
@@ -167,7 +167,7 @@ Checker is more flexible selection component, you can alse customize the layout.
167167
data() {
168168
return {
169169
checkerList: [2],
170-
option: [
170+
options: [
171171
{
172172
value: 1,
173173
text: 'first',
@@ -188,7 +188,6 @@ Checker is more flexible selection component, you can alse customize the layout.
188188
}
189189
```
190190

191-
192191
### Props configuration
193192

194193
| Attribute | Description | Type | Accepted Values | Default |
@@ -218,3 +217,4 @@ Checker is more flexible selection component, you can alse customize the layout.
218217
| - | - | - |
219218
| value | the value of checker item | String/Number |
220219
| text | the text of checker item | String |
220+
| disabled<sup>1.12.19</sup> | disabled state of checker item | Boolean |

Diff for: document/components/docs/en-US/form.md

+7
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,13 @@ CubeForm is a schema-based form generator component.
426426
| 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) | - |
427427
| messages | Validator messages, see <a href="#/en-US/docs/validator#cube-Props-anchor">Validator</a> | String | - | - |
428428

429+
- `options` sub configuration
430+
431+
| Attribute | Description | Type | Accepted Values | Default |
432+
| - | - | - | - | - |
433+
| scrollToInvalidField | Whether to scroll to the first invalid fileld by default | Boolean | true/false | false |
434+
| layout | Form layout style | String | standard/classic/fresh | standard |
435+
429436
#### FormGroup
430437

431438
| Attribute | Description | Type | Accepted Values | Default |

Diff for: document/components/docs/en-US/scroll-nav-bar.md

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Scroll navigation bar component, like DiDi business navigation.
112112
| labels | the collection if all the item's keys | Array | - | [] |
113113
| 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 |
114114
| current | the key of the active item | String/Number | - | '' |
115+
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {} |
115116

116117
### Slot
117118

Diff for: document/components/docs/en-US/scroll.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Scroll components can meet the scrolling needs of most mobile applications. In t
411411
| - | - | - | - | - |
412412
| data | data used for list rendering | Array | - | [] |
413413
| direction | scrolling direction | String | 'vertical', 'horizontal' | 'vertical' |
414-
| 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>} |
414+
| 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>} |
415415
| scrollEvents<sup>1.9.0</sup> | configure which scroll events need be triggered | Array | could include: 'scroll', 'before-scroll-start', 'scroll-end' | [] |
416416
| listenScroll | whether to dispatch scroll event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |
417417
| listenBeforeScroll | whether to dispatch before-scroll-start event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |

Diff for: document/components/docs/zh-CN/checker.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
129129
data() {
130130
return {
131131
checkerList: [3],
132-
option: [
132+
options: [
133133
{
134134
value: 1,
135135
text: 'red'
@@ -167,7 +167,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
167167
data() {
168168
return {
169169
checkerList: [2],
170-
option: [
170+
options: [
171171
{
172172
value: 1,
173173
text: 'first',
@@ -188,8 +188,6 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
188188
}
189189
```
190190

191-
192-
193191
### Props 配置
194192

195193
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
@@ -219,3 +217,4 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
219217
| - | - | - |
220218
| value | 选项的值 | String/Number |
221219
| text | 选项的文本 | String |
220+
| disabled<sup>1.12.19</sup> | 选项是否被禁用 | Boolean |

Diff for: document/components/docs/zh-CN/form.md

+7
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,13 @@
426426
| debounce<sup>1.8.0+</sup> | 控制校验节奏,值为时间,单位 ms。如果 trigger 设置为 blur 则此项配置不生效 | Number/Boolean | >= 0,如果设置为 true,那么时间就是 200(ms) | - |
427427
| messages | 字段的校验消息,参见 <a href="#/zh-CN/docs/validator#cube-Props-anchor">Validator</a> | String | - | - |
428428

429+
- `options` 子配置项
430+
431+
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
432+
| - | - | - | - | - |
433+
| scrollToInvalidField | 是否默认滚动到第一个无效字段位置 | Boolean | true/false | false |
434+
| layout | 表单何种布局方式 | String | standard/classic/fresh | standard |
435+
429436
#### CubeFormGroup
430437

431438
| 参数 | 说明 | 类型 | 可选值 | 默认值 |

Diff for: document/components/docs/zh-CN/scroll-nav-bar.md

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
| labels | 所有的 key 值集合 | Array | - | [] |
111111
| txts | 显示所有文案集合,和 labels 一一对应,每项可以是 HTML 字符串 | Array | - | 默认等于 labes |
112112
| current | 当前 active 的 key 值 | String/Number | - | '' |
113+
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {} |
113114

114115
### 插槽
115116

Diff for: lib/cube.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/form/form.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/form/index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -7346,6 +7346,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
73467346
_this.$emit(EVENT_VALID, _this.validity);
73477347
_this.$emit(EVENT_SUBMIT, e, _this.model, _this.fieldsModel);
73487348
} else {
7349+
if (_this.options.scrollToInvalidField && _this.firstInvalidField) {
7350+
_this.firstInvalidField.$el.scrollIntoView();
7351+
}
73497352
e.preventDefault();
73507353
_this.$emit(EVENT_INVALID, _this.validity);
73517354
}
@@ -7367,11 +7370,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
73677370
var _this2 = this;
73687371

73697372
this.validate(function () {
7370-
if (_this2.invalid) {
7371-
if (_this2.options.scrollToInvalidField && _this2.firstInvalidField) {
7372-
_this2.firstInvalidField.$el.scrollIntoView();
7373-
}
7374-
}
73757373
cb && cb(_this2.valid);
73767374
});
73777375
},

0 commit comments

Comments
 (0)