Comparing version 0.10.3 to 0.10.4
@@ -43,9 +43,5 @@ 'use strict'; | ||
return _c('van-coupon-item', { key: item.id || item.name, attrs: { "disabled": "", "data": item } }); | ||
}), _vm._m(0)], 2), _c('div', { staticClass: "van-coupon-list__close van-hairline--top", on: { "click": _vm.onClickNotUse } }, [_vm._v(_vm._s(_vm.closeButtonText))])], 1); | ||
}), !_vm.coupons.length && !_vm.disabledCoupons.length ? _c('div', { staticClass: "van-coupon-list__empty" }, [_c('img', { attrs: { "src": "https://b.yzcdn.cn/v2/image/wap/trade/new_order/empty@2x.png" } }), _c('p', [_vm._v("暂无优惠券")])]) : _vm._e()], 2), _c('div', { staticClass: "van-coupon-list__close van-hairline--top", on: { "click": _vm.onClickNotUse } }, [_vm._v(_vm._s(_vm.closeButtonText))])], 1); | ||
}, | ||
staticRenderFns: [function () { | ||
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "van-coupon-list__empty" }, [_c('img', { attrs: { "src": "https://b.yzcdn.cn/v2/image/wap/trade/new_order/empty@2x.png" } }), _c('p', [_vm._v("暂无优惠券")])]); | ||
}], | ||
name: 'van-coupon-list', | ||
@@ -52,0 +48,0 @@ |
@@ -248,3 +248,3 @@ 'use strict'; | ||
var version = '0.10.3'; | ||
var version = '0.10.4'; | ||
var components = [_actionsheet2.default, _addressEdit2.default, _addressList2.default, _area2.default, _badge2.default, _badgeGroup2.default, _button2.default, _card2.default, _cell2.default, _cellGroup2.default, _cellSwipe2.default, _checkbox2.default, _checkboxGroup2.default, _col2.default, _contactCard2.default, _contactEdit2.default, _contactList2.default, _couponCell2.default, _couponList2.default, _datetimePicker2.default, _field2.default, _goodsAction2.default, _goodsActionBigBtn2.default, _goodsActionMiniBtn2.default, _icon2.default, _loading2.default, _navBar2.default, _noticeBar2.default, _numberKeyboard2.default, _panel2.default, _passwordInput2.default, _picker2.default, _popup2.default, _progress2.default, _pullRefresh2.default, _radio2.default, _radioGroup2.default, _row2.default, _search2.default, _sku2.default, _step2.default, _stepper2.default, _steps2.default, _submitBar2.default, _swipe2.default, _swipeItem2.default, _switch2.default, _switchCell2.default, _tab2.default, _tabbar2.default, _tabbarItem2.default, _tabs2.default, _tag2.default, _treeSelect2.default, _uploader2.default]; | ||
@@ -251,0 +251,0 @@ |
@@ -17,5 +17,5 @@ 'use strict'; | ||
render: function render() { | ||
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.showNoticeBar, expression: "showNoticeBar" }], class: ['van-notice-bar', { 'van-notice-bar--withicon': _vm.mode }], on: { "click": function click($event) { | ||
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.showNoticeBar, expression: "showNoticeBar" }], class: ['van-notice-bar', { 'van-notice-bar--withicon': _vm.mode }], style: _vm.barStyle, on: { "click": function click($event) { | ||
_vm.$emit('click'); | ||
} } }, [_c('div', { ref: "contentWrap", staticClass: "van-notice-bar__content-wrap" }, [_c('div', { ref: "content", staticClass: "van-notice-bar__content", style: _vm.contentStyle, on: { "transitionend": _vm.onTransitionEnd } }, [_vm._t("default", [_vm._v(_vm._s(_vm.text))])], 2)]), _vm.iconName ? _c('van-icon', { staticClass: "van-notice-bar__icon", attrs: { "name": _vm.iconName }, on: { "click": _vm.onClickIcon } }) : _vm._e()], 1); | ||
} } }, [_vm.leftIcon ? _c('div', { staticClass: "van-notice-bar__left-icon" }, [_c('img', { attrs: { "src": _vm.leftIcon } })]) : _vm._e(), _c('div', { ref: "contentWrap", staticClass: "van-notice-bar__content-wrap" }, [_c('div', { ref: "content", staticClass: "van-notice-bar__content", style: _vm.contentStyle, on: { "transitionend": _vm.onTransitionEnd } }, [_vm._t("default", [_vm._v(_vm._s(_vm.text))])], 2)]), _vm.iconName ? _c('van-icon', { staticClass: "van-notice-bar__right-icon", attrs: { "name": _vm.iconName }, on: { "click": _vm.onClickIcon } }) : _vm._e()], 1); | ||
}, | ||
@@ -29,2 +29,5 @@ | ||
text: String, | ||
leftIcon: String, | ||
color: String, | ||
background: String, | ||
mode: { | ||
@@ -47,3 +50,3 @@ type: String, | ||
type: Number, | ||
default: 40 | ||
default: 50 | ||
} | ||
@@ -54,2 +57,3 @@ }, | ||
return { | ||
firstRound: true, | ||
duration: 0, | ||
@@ -67,8 +71,13 @@ offsetWidth: 0, | ||
}, | ||
barStyle: function barStyle() { | ||
return { | ||
color: this.color, | ||
background: this.background | ||
}; | ||
}, | ||
contentStyle: function contentStyle() { | ||
return { | ||
transform: 'translate3d(' + -this.offsetWidth + 'px, 0, 0)', | ||
transitionDelay: this.delay + 's', | ||
transitionDuration: this.duration + 's', | ||
transitionProperty: this.diableTransition ? 'none' : 'all' | ||
transitionDelay: (this.firstRound ? this.delay : 0) + 's', | ||
transitionDuration: this.duration + 's' | ||
}; | ||
@@ -82,2 +91,3 @@ } | ||
if (this.scrollable && offsetWidth > wrapWidth) { | ||
this.wrapWidth = wrapWidth; | ||
this.offsetWidth = offsetWidth; | ||
@@ -96,9 +106,12 @@ this.duration = (offsetWidth + wrapWidth) / this.speed; | ||
var offsetWidth = this.offsetWidth; | ||
var offsetWidth = this.offsetWidth, | ||
wrapWidth = this.wrapWidth; | ||
this.diableTransition = true; | ||
this.offsetWidth = 0; | ||
this.firstRound = false; | ||
this.duration = 0; | ||
this.offsetWidth = -this.wrapWidth; | ||
// wait for vue render && dom update | ||
setTimeout(function () { | ||
_this.diableTransition = false; | ||
_this.duration = (offsetWidth + 2 * wrapWidth) / _this.speed; | ||
_this.offsetWidth = offsetWidth; | ||
@@ -105,0 +118,0 @@ }, 50); |
@@ -11,2 +11,6 @@ 'use strict'; | ||
var _scroll = require('../utils/scroll'); | ||
var _scroll2 = _interopRequireDefault(_scroll); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -68,2 +72,7 @@ | ||
mounted: function mounted() { | ||
this.scrollEl = _scroll2.default.getScrollEventTarget(this.$el); | ||
}, | ||
watch: { | ||
@@ -126,3 +135,3 @@ value: function value(val) { | ||
getCeiling: function getCeiling() { | ||
this.ceiling = (window.scrollY || window.pageYOffset) === 0; | ||
this.ceiling = _scroll2.default.getScrollTop(this.scrollEl) === 0; | ||
return this.ceiling; | ||
@@ -129,0 +138,0 @@ }, |
@@ -29,2 +29,3 @@ 'use strict'; | ||
return { | ||
width: 0, | ||
offset: 0, | ||
@@ -37,4 +38,3 @@ startX: 0, | ||
direction: '', | ||
currentDuration: 0, | ||
width: window.innerWidth | ||
currentDuration: 0 | ||
}; | ||
@@ -77,2 +77,3 @@ }, | ||
clearTimeout(this.timer); | ||
this.width = this.$el.getBoundingClientRect().width; | ||
this.active = 0; | ||
@@ -79,0 +80,0 @@ this.currentDuration = 0; |
{ | ||
"name": "vant", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "有赞vue wap组件库", | ||
@@ -5,0 +5,0 @@ "main": "lib/vant.js", |
@@ -62,3 +62,3 @@ import Actionsheet from './actionsheet'; | ||
const version = '0.10.3'; | ||
const version = '0.10.4'; | ||
const components = [ | ||
@@ -65,0 +65,0 @@ Actionsheet, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1270709
20300