Skip to content

Commit

Permalink
publish build
Browse files Browse the repository at this point in the history
  • Loading branch information
dolymood committed Apr 3, 2018
1 parent f066361 commit f9879ef
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/cube.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions lib/drawer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5858,6 +5858,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return {
index: -1,
selectedVal: [],
selectedText: [],
selected: [].concat((0, _toConsumableArray3.default)(this.selectedIndex)),
slideStyle: (0, _defineProperty3.default)({}, transform, 'translate3d(0, 0, 0)')
};
Expand Down Expand Up @@ -5917,6 +5918,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.index = panelIndex;
this.selected = this.selected.slice(0, panelIndex);
this.selectedVal = this.selectedVal.slice(0, panelIndex);
this.selectedText = this.selectedText.slice(0, panelIndex);
if (index >= 0) {
this.$set(this.selected, panelIndex, index);
this.changeHandler(panelIndex, this.data[panelIndex][index], index);
Expand Down Expand Up @@ -5958,12 +5960,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
});
},
changeHandler: function changeHandler(panelIndex, item, index) {
this.selectedVal[panelIndex] = typeof item === 'string' ? item : item.value;
if (typeof item === 'string') {
this.selectedVal[panelIndex] = item;
this.selectedText[panelIndex] = item;
} else {
this.selectedVal[panelIndex] = item.value;
this.selectedText[panelIndex] = item.text;
}
this.$set(this.selected, panelIndex, index);
if (panelIndex === this.data.length - 1) {
this.$emit(EVENT_SELECT, this.selectedVal, this.selected);
this.$emit(EVENT_SELECT, this.selectedVal, this.selected, this.selectedText);
this.hide();
} else {
this.$emit(EVENT_CHANGE, panelIndex, item, this.selectedVal, this.selected);
this.$emit(EVENT_CHANGE, panelIndex, item, this.selectedVal, this.selected, this.selectedText);
}
},
drawerClick: function drawerClick() {
Expand Down
2 changes: 1 addition & 1 deletion lib/index-list/index-list.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions lib/index-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5679,6 +5679,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
speed: {
type: Number,
default: 0
},
navbar: {
type: Boolean,
default: true
}
},
data: function data() {
Expand Down Expand Up @@ -6035,7 +6039,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
"select": _vm.selectItem
}
})
}))], 2)])]), _vm._v(" "), _c('div', {
}))], 2)])]), _vm._v(" "), (_vm.navbar) ? _c('div', {
staticClass: "cube-index-list-nav",
on: {
"touchstart": _vm.onShortcutTouchStart,
Expand All @@ -6057,8 +6061,10 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
attrs: {
"data-index": index
}
}, [_vm._v(_vm._s(item))])
}))]), _vm._v(" "), _c('div', {
}, [_vm._t("nav-item", [_vm._v(_vm._s(item))], {
item: item
})], 2)
}))]) : _vm._e(), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
Expand Down
35 changes: 27 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5446,7 +5446,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

var cube = {
version: "1.7.1",
version: "1.7.2",
install: install,
BScroll: _module.BScroll,
createAPI: _module.createAPI
Expand Down Expand Up @@ -7777,6 +7777,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_

var COMPONENT_NAME = 'cube-toast';

var EVENT_TIMEOUT = 'timeout';

exports.default = {
name: COMPONENT_NAME,
mixins: [_api2.default],
Expand Down Expand Up @@ -7830,6 +7832,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (_this.time !== 0) {
_this.timer = setTimeout(function () {
_this.hide();
_this.$emit(EVENT_TIMEOUT);
}, _this.time);
}
});
Expand Down Expand Up @@ -7935,7 +7938,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

function addToast(Vue, Toast) {
(0, _createApi2.default)(Vue, Toast, [], true);
(0, _createApi2.default)(Vue, Toast, ['timeout'], true);
}
module.exports = exports['default'];
});
Expand Down Expand Up @@ -11838,6 +11841,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
speed: {
type: Number,
default: 0
},
navbar: {
type: Boolean,
default: true
}
},
data: function data() {
Expand Down Expand Up @@ -13302,7 +13309,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
"select": _vm.selectItem
}
})
}))], 2)])]), _vm._v(" "), _c('div', {
}))], 2)])]), _vm._v(" "), (_vm.navbar) ? _c('div', {
staticClass: "cube-index-list-nav",
on: {
"touchstart": _vm.onShortcutTouchStart,
Expand All @@ -13324,8 +13331,10 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
attrs: {
"data-index": index
}
}, [_vm._v(_vm._s(item))])
}))]), _vm._v(" "), _c('div', {
}, [_vm._t("nav-item", [_vm._v(_vm._s(item))], {
item: item
})], 2)
}))]) : _vm._e(), _vm._v(" "), _c('div', {
directives: [{
name: "show",
rawName: "v-show",
Expand Down Expand Up @@ -13477,6 +13486,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
type: Number,
default: 2500
},

delay: {
type: Number,
default: 15
Expand Down Expand Up @@ -16141,6 +16151,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return {
index: -1,
selectedVal: [],
selectedText: [],
selected: [].concat((0, _toConsumableArray3.default)(this.selectedIndex)),
slideStyle: (0, _defineProperty3.default)({}, transform, 'translate3d(0, 0, 0)')
};
Expand Down Expand Up @@ -16200,6 +16211,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.index = panelIndex;
this.selected = this.selected.slice(0, panelIndex);
this.selectedVal = this.selectedVal.slice(0, panelIndex);
this.selectedText = this.selectedText.slice(0, panelIndex);
if (index >= 0) {
this.$set(this.selected, panelIndex, index);
this.changeHandler(panelIndex, this.data[panelIndex][index], index);
Expand Down Expand Up @@ -16241,12 +16253,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
});
},
changeHandler: function changeHandler(panelIndex, item, index) {
this.selectedVal[panelIndex] = typeof item === 'string' ? item : item.value;
if (typeof item === 'string') {
this.selectedVal[panelIndex] = item;
this.selectedText[panelIndex] = item;
} else {
this.selectedVal[panelIndex] = item.value;
this.selectedText[panelIndex] = item.text;
}
this.$set(this.selected, panelIndex, index);
if (panelIndex === this.data.length - 1) {
this.$emit(EVENT_SELECT, this.selectedVal, this.selected);
this.$emit(EVENT_SELECT, this.selectedVal, this.selected, this.selectedText);
this.hide();
} else {
this.$emit(EVENT_CHANGE, panelIndex, item, this.selectedVal, this.selected);
this.$emit(EVENT_CHANGE, panelIndex, item, this.selectedVal, this.selected, this.selectedText);
}
},
drawerClick: function drawerClick() {
Expand Down
1 change: 1 addition & 0 deletions lib/time-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5386,6 +5386,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
type: Number,
default: 2500
},

delay: {
type: Number,
default: 15
Expand Down
5 changes: 4 additions & 1 deletion lib/toast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_

var COMPONENT_NAME = 'cube-toast';

var EVENT_TIMEOUT = 'timeout';

exports.default = {
name: COMPONENT_NAME,
mixins: [_api2.default],
Expand Down Expand Up @@ -745,6 +747,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (_this.time !== 0) {
_this.timer = setTimeout(function () {
_this.hide();
_this.$emit(EVENT_TIMEOUT);
}, _this.time);
}
});
Expand Down Expand Up @@ -852,7 +855,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

function addToast(Vue, Toast) {
(0, _createApi2.default)(Vue, Toast, [], true);
(0, _createApi2.default)(Vue, Toast, ['timeout'], true);
}
module.exports = exports['default'];
});
Expand Down
2 changes: 1 addition & 1 deletion lib/toast/toast.min.js

Large diffs are not rendered by default.

0 comments on commit f9879ef

Please sign in to comment.