提交 60b761a6 编写于 作者: H hubvue 提交者: kimwangchong_i

Merge branch 'dev' of https://github.com/didi/cube-ui into dev

<!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>
\ No newline at end of file
<!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>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
<!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>
\ No newline at end of file
<!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>
\ No newline at end of file
!function(e){function a(c){if(b[c])return b[c].exports;var d=b[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,a),d.l=!0,d.exports}var c=window.webpackJsonp;window.webpackJsonp=function(b,f,n){for(var r,t,o,u=0,i=[];u<b.length;u++)t=b[u],d[t]&&i.push(d[t][0]),d[t]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(c&&c(b,f,n);i.length;)i.shift()();if(n)for(u=0;u<n.length;u++)o=a(a.s=n[u]);return o};var b={},d={94:0};a.e=function(e){function c(){r.onerror=r.onload=null,clearTimeout(t);var a=d[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}var b=d[e];if(0===b)return new Promise(function(e){e()});if(b)return b[2];var f=new Promise(function(a,c){b=d[e]=[a,c]});b[2]=f;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,a.nc&&r.setAttribute("nonce",a.nc),r.src=a.p+"js/"+e+"."+{0:"d5ce8696d7817c1ad3a3",1:"34b5857f194e5f1acfb6",2:"6e6975d6a89dd029fad4",3:"12506d2ed3caca26d9b0",4:"415f17002e53bbea6722",5:"df54f9daf110a907159b",6:"895522cc1e070b001975",7:"e73bb330f5aef30e9afc",8:"1af7a1ba5af5bb0d68b2",9:"2b406ccd63b03baac8bd",10:"96da8d597fad20262c6a",11:"03e77abfe8cc11040e9a",12:"599c6a91b0e604847757",13:"238568fdec73355962fb",14:"c3cc516b23ecc8d821aa",15:"f8a45a0f1c77686ee9c1",16:"83d41e7b1a92ce761e7d",17:"89fd481362aaa4141a73",18:"8582310842dae1c00da6",19:"1e36d1ddd1c6b9bebb6b",20:"32b5f56ad8727fdf2c25",21:"5a95626f892944ce441b",22:"acc5973de803597dd39e",23:"3ec33d6c14d434df0bf6",24:"78851d56466f44bf6370",25:"47e41476d32f9fb77ed4",26:"b7a27fb42d8f6fe3d621",27:"1a57a87827780cc93797",28:"4cd01b39b2ba9c992d4a",29:"e21d86280e771e590b54",30:"8ec0a68ed860c372e24c",31:"7e747d10562ce36435e7",32:"26cb266f00278532b844",33:"e955504b121bb834e4f6",34:"f308147228341c7ab800",35:"8abf3e85f831a05c8b13",36:"fb32375e5a60016231d9",37:"2f930ad9e435f595720a",38:"73040cbba669c2f346ad",39:"bd87177f9e7b6aade235",40:"3b3a0e9a78a38f6a1834",41:"7c5d8496ebb8c693c291",42:"32a8cc1a285bed4dd7a3",43:"b7e8d864e0b917164d7a",44:"1cd2ce2e186059cdbab7",45:"87c8d65c6740bc8a7d62",46:"57f0bb37f13714fdb453",47:"42231fd231c11b558a59",48:"e31086d402071e4eaabe",49:"38b72731663b30ba7a14",50:"30d54e5e374954844533",51:"4157f27b05c1bcc31478",52:"eb1222bfcf0bfb35e9a5",53:"4c8a9976d3947b0b27c3",54:"1d541ace9ba0d0e70da4",55:"fb42732889ea5a34394a",56:"7f3fb816e0fe97a65fcc",57:"5927510de4d047fa05f0",58:"883f4cb21727505c6ca7",59:"88509283c0cdfd915d17",60:"77cfecda9e49bec28446",61:"222f6deb479165b9f756",62:"19d6cd6415720462ebf2",63:"ede6b3e598e961142e98",64:"5fa3654dc13ed7ce1b3f",65:"ca97241b2ab4a1cad153",66:"d06cadf3890e07a93166",67:"bded3f7b12f4ce988815",68:"13bbe9d9886bbf9a928e",69:"e4ffa38f45f6e3d75977",70:"c37a95ac4f711510b925",71:"82d94b2284e90e2de387",72:"a5addb632f9ac18563f1",73:"94cc73e7eadfd1860814",74:"327113bc80124a47eb25",75:"69206936a4c953955e84",76:"7aed29fd85396a652aec",77:"b8e88fa81885f2f494ea",78:"282f5242a979d7fd55c3",79:"5e532037283568273584",80:"d3f5d07ed3f4fa726aeb",81:"59dcaffaee7b7596b8f9",82:"67c961a904ed2f52b3b7",83:"4d15621c396625719cee",84:"abe82c1b64c923ed2b19",85:"28ec757b39b8a7a933fb",86:"f749c98106f81fa78f3e",87:"5178a52e7b851546a016",88:"de4a916472f104f61636",89:"f10e96c58d8eb0db1c28",90:"5de2cbb333625c493adb",91:"bafce18b7db27328f409"}[e]+".js";var t=setTimeout(c,12e4);return r.onerror=r.onload=c,n.appendChild(r),f},a.m=e,a.c=b,a.d=function(e,c,b){a.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:b})},a.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(c,"a",c),c},a.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},a.p="/cube-ui/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){function a(c){if(b[c])return b[c].exports;var d=b[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,a),d.l=!0,d.exports}var c=window.webpackJsonp;window.webpackJsonp=function(b,f,n){for(var r,t,o,u=0,i=[];u<b.length;u++)t=b[u],d[t]&&i.push(d[t][0]),d[t]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(c&&c(b,f,n);i.length;)i.shift()();if(n)for(u=0;u<n.length;u++)o=a(a.s=n[u]);return o};var b={},d={94:0};a.e=function(e){function c(){r.onerror=r.onload=null,clearTimeout(t);var a=d[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}var b=d[e];if(0===b)return new Promise(function(e){e()});if(b)return b[2];var f=new Promise(function(a,c){b=d[e]=[a,c]});b[2]=f;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,a.nc&&r.setAttribute("nonce",a.nc),r.src=a.p+"js/"+e+"."+{0:"d5ce8696d7817c1ad3a3",1:"34b5857f194e5f1acfb6",2:"6e6975d6a89dd029fad4",3:"12506d2ed3caca26d9b0",4:"415f17002e53bbea6722",5:"df54f9daf110a907159b",6:"895522cc1e070b001975",7:"e73bb330f5aef30e9afc",8:"1af7a1ba5af5bb0d68b2",9:"2b406ccd63b03baac8bd",10:"96da8d597fad20262c6a",11:"03e77abfe8cc11040e9a",12:"599c6a91b0e604847757",13:"238568fdec73355962fb",14:"c3cc516b23ecc8d821aa",15:"f8a45a0f1c77686ee9c1",16:"83d41e7b1a92ce761e7d",17:"89fd481362aaa4141a73",18:"8582310842dae1c00da6",19:"1e36d1ddd1c6b9bebb6b",20:"32b5f56ad8727fdf2c25",21:"19534637b0693c168009",22:"acc5973de803597dd39e",23:"3ec33d6c14d434df0bf6",24:"78851d56466f44bf6370",25:"47e41476d32f9fb77ed4",26:"b7a27fb42d8f6fe3d621",27:"1a57a87827780cc93797",28:"4cd01b39b2ba9c992d4a",29:"e21d86280e771e590b54",30:"8ec0a68ed860c372e24c",31:"7e747d10562ce36435e7",32:"26cb266f00278532b844",33:"e955504b121bb834e4f6",34:"f308147228341c7ab800",35:"98493f4ce51a84e5ada7",36:"fb32375e5a60016231d9",37:"2f930ad9e435f595720a",38:"73040cbba669c2f346ad",39:"bd87177f9e7b6aade235",40:"12507c5b207ea7ba37f7",41:"7c5d8496ebb8c693c291",42:"32a8cc1a285bed4dd7a3",43:"b7e8d864e0b917164d7a",44:"1cd2ce2e186059cdbab7",45:"87c8d65c6740bc8a7d62",46:"57f0bb37f13714fdb453",47:"42231fd231c11b558a59",48:"e31086d402071e4eaabe",49:"38b72731663b30ba7a14",50:"30d54e5e374954844533",51:"4157f27b05c1bcc31478",52:"eb1222bfcf0bfb35e9a5",53:"4c8a9976d3947b0b27c3",54:"1d541ace9ba0d0e70da4",55:"fb42732889ea5a34394a",56:"7f3fb816e0fe97a65fcc",57:"5927510de4d047fa05f0",58:"883f4cb21727505c6ca7",59:"88509283c0cdfd915d17",60:"77cfecda9e49bec28446",61:"222f6deb479165b9f756",62:"19d6cd6415720462ebf2",63:"ede6b3e598e961142e98",64:"3860de2a569ff89f3b06",65:"ca97241b2ab4a1cad153",66:"823b95ac74d60b67566a",67:"bded3f7b12f4ce988815",68:"13bbe9d9886bbf9a928e",69:"e4ffa38f45f6e3d75977",70:"c37a95ac4f711510b925",71:"82d94b2284e90e2de387",72:"a5addb632f9ac18563f1",73:"94cc73e7eadfd1860814",74:"327113bc80124a47eb25",75:"69206936a4c953955e84",76:"7aed29fd85396a652aec",77:"b8e88fa81885f2f494ea",78:"282f5242a979d7fd55c3",79:"5e532037283568273584",80:"19c94a0ddf0ed2e20c37",81:"59dcaffaee7b7596b8f9",82:"67c961a904ed2f52b3b7",83:"4d15621c396625719cee",84:"abe82c1b64c923ed2b19",85:"aa58b8b72d71c6764b8a",86:"f749c98106f81fa78f3e",87:"5178a52e7b851546a016",88:"de4a916472f104f61636",89:"f10e96c58d8eb0db1c28",90:"5de2cbb333625c493adb",91:"bafce18b7db27328f409"}[e]+".js";var t=setTimeout(c,12e4);return r.onerror=r.onload=c,n.appendChild(r),f},a.m=e,a.c=b,a.d=function(e,c,b){a.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:b})},a.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(c,"a",c),c},a.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},a.p="/cube-ui/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -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'
......@@ -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',
......@@ -188,7 +188,6 @@ Checker is more flexible selection component, you can alse customize the layout.
}
```
### Props configuration
| Attribute | Description | Type | Accepted Values | Default |
......@@ -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 |
......@@ -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 |
......
......@@ -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
......
......@@ -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 |
......
......@@ -129,7 +129,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
data() {
return {
checkerList: [3],
option: [
options: [
{
value: 1,
text: 'red'
......@@ -167,7 +167,7 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
data() {
return {
checkerList: [2],
option: [
options: [
{
value: 1,
text: 'first',
......@@ -188,8 +188,6 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
}
```
### Props 配置
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
......@@ -219,3 +217,4 @@ Checker 是更加灵活的选择组件,可以自定义需要的布局样式。
| - | - | - |
| value | 选项的值 | String/Number |
| text | 选项的文本 | String |
| disabled<sup>1.12.19</sup> | 选项是否被禁用 | Boolean |
......@@ -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
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
......
......@@ -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 | - | {} |
### 插槽
......
此差异已折叠。
此差异已折叠。
......@@ -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);
}
......@@ -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);
});
},
......
此差异已折叠。
此差异已折叠。
{
"name": "cube-ui",
"version": "1.12.30",
"version": "1.12.32",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "cube-ui",
"version": "1.12.30",
"version": "1.12.32",
"description": "A fantastic mobile ui lib implement by Vue",
"main": "lib/index.js",
"module": "src/index.js",
......
......@@ -144,6 +144,10 @@
this.$emit(EVENT_VALID, this.validity)
this.$emit(EVENT_SUBMIT, e, this.model, this.fieldsModel)
} else {
// scrollToInvalidField
if (this.options.scrollToInvalidField && this.firstInvalidField) {
this.firstInvalidField.$el.scrollIntoView()
}
e.preventDefault()
this.$emit(EVENT_INVALID, this.validity)
}
......@@ -164,11 +168,6 @@
},
_submit(cb) {
this.validate(() => {
if (this.invalid) {
if (this.options.scrollToInvalidField && this.firstInvalidField) {
this.firstInvalidField.$el.scrollIntoView()
}
}
cb && cb(this.valid)
})
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册