Skip to content

Commit 594f103

Browse files
committed
0.2.1
1 parent 57a1add commit 594f103

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

dist/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ module.exports = function normalizeComponent (
672672
},
673673
container: {
674674
type: String
675+
},
676+
initScroll: {
677+
type: Boolean,
678+
default: false
675679
}
676680
},
677681
data: function data() {
@@ -806,6 +810,9 @@ module.exports = function normalizeComponent (
806810
init: function init() {
807811
this.bindEvents();
808812
this.updateView();
813+
if (this.initScroll) {
814+
this.handleScroll();
815+
}
809816
}
810817
},
811818
mounted: function mounted() {
@@ -822,7 +829,7 @@ module.exports = function normalizeComponent (
822829
/***/ (function(module, __webpack_exports__, __webpack_require__) {
823830

824831
"use strict";
825-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-data-loading"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_DOWN === _vm.pull.type),expression:"PULL_DOWN === pull.type"}],staticClass:"loading-header",style:({height: _vm.pullHeight + 'px'})},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.pull.available),expression:"!pull.available"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN + '-before',[_vm._v("下拉刷新数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.pull.available && _vm.PULL_DOWN !== _vm.loadingType),expression:"pull.available && PULL_DOWN !== loadingType"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN,[_vm._v("松开刷新数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_DOWN === _vm.loadingType),expression:"PULL_DOWN === loadingType"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN + '-loading',[_vm._v("刷新中...")])],2)]),_vm._v(" "),_c('div',{staticClass:"loading-content"},[_vm._t("default")],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_UP === _vm.pull.type),expression:"PULL_UP === pull.type"}],staticClass:"loading-footer",style:({height: _vm.pullHeight + 'px'})},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.pull.available),expression:"!pull.available"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP + '-before',[_vm._v("上拉加载数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.pull.available && _vm.PULL_UP !== _vm.loadingType),expression:"pull.available && PULL_UP !== loadingType"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP,[_vm._v("松开加载数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_UP === _vm.loadingType),expression:"PULL_UP === loadingType"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP + '-loading',[_vm._v("加载中...")])],2)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading && _vm.INFINITE_SCROLL === _vm.loadingType),expression:"loading && INFINITE_SCROLL === loadingType"}],staticClass:"loading-footer",style:({height: _vm.distance + 'px'})},[_c('div',{staticClass:"footer-text"},[_vm._t(_vm.INFINITE_SCROLL + '-loading',[_vm._v("加载中...")])],2)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.loading && _vm.completed),expression:"!loading && completed"}],staticClass:"loading-footer",style:({height: _vm.distance + 'px'})},[_c('div',{staticClass:"footer-text"},[_vm._t(_vm.completed,[_vm._v("加载完毕")])],2)])])}
832+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"vue-data-loading"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_DOWN === _vm.pull.type),expression:"PULL_DOWN === pull.type"}],staticClass:"loading-header",style:({height: _vm.pullHeight + 'px'})},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.pull.available),expression:"!pull.available"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN + '-before',[_vm._v("下拉刷新数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.pull.available && _vm.PULL_DOWN !== _vm.loadingType),expression:"pull.available && PULL_DOWN !== loadingType"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN + '-ready',[_vm._v("松开刷新数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_DOWN === _vm.loadingType),expression:"PULL_DOWN === loadingType"}],staticClass:"header-text"},[_vm._t(_vm.PULL_DOWN + '-loading',[_vm._v("刷新中...")])],2)]),_vm._v(" "),_c('div',{staticClass:"loading-content"},[_vm._t("default")],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_UP === _vm.pull.type),expression:"PULL_UP === pull.type"}],staticClass:"loading-footer",style:({height: _vm.pullHeight + 'px'})},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.pull.available),expression:"!pull.available"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP + '-before',[_vm._v("上拉加载数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.pull.available && _vm.PULL_UP !== _vm.loadingType),expression:"pull.available && PULL_UP !== loadingType"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP + '-ready',[_vm._v("松开加载数据")])],2),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.PULL_UP === _vm.loadingType),expression:"PULL_UP === loadingType"}],staticClass:"footer-text"},[_vm._t(_vm.PULL_UP + '-loading',[_vm._v("加载中...")])],2)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.loading && _vm.INFINITE_SCROLL === _vm.loadingType),expression:"loading && INFINITE_SCROLL === loadingType"}],staticClass:"loading-footer",style:({height: _vm.distance + 'px'})},[_c('div',{staticClass:"footer-text"},[_vm._t(_vm.INFINITE_SCROLL + '-loading',[_vm._v("加载中...")])],2)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.loading && _vm.completed),expression:"!loading && completed"}],staticClass:"loading-footer",style:({height: _vm.distance + 'px'})},[_c('div',{staticClass:"footer-text"},[_vm._t(_vm.completed,[_vm._v("加载完毕")])],2)])])}
826833
var staticRenderFns = []
827834
var esExports = { render: render, staticRenderFns: staticRenderFns }
828835
/* harmony default export */ __webpack_exports__["a"] = (esExports);

0 commit comments

Comments
 (0)