@@ -1461,8 +1461,7 @@ __webpack_require__.g.currentInject = {
14611461};
14621462__webpack_require__.g.currentInject.render = function (createElement, getComponent) {
14631463 return createElement(getComponent("mpx-view"), null, createElement(getComponent("mpx-view"), null, createElement(getComponent("mpx-inline-text"), null, this.pos)), createElement(getComponent("cube-sticky"), {
1464- pos: this.pos,
1465- offset: 60
1464+ pos: this.pos
14661465}, createElement(getComponent("mpx-scroll-view"), {
14671466 "scroll-y": true,
14681467 bindscroll: this.onScroll,
@@ -1550,9 +1549,10 @@ __webpack_require__.g.currentInject.render = function (createElement, getCompone
15501549 ishost: true,
15511550 style: this.__getStyle("mpx-root-view host-_5575c544", "", "", "")
15521551}, createElement(getComponent("mpx-view"), {
1552+ ref: this.__getRefVal('node', [[".", this.__getClass("cube-sticky", "")]], "ref_fn_1"),
15531553 style: this.__getStyle("cube-sticky", "", "", this.containerStyle)
15541554}, this.__getSlot(), createElement(getComponent("mpx-view"), {
1555- ref: this.__getRefVal('node', [["", "fixedEle"]], "ref_fn_1 "),
1555+ ref: this.__getRefVal('node', [["", "fixedEle"]], "ref_fn_2 "),
15561556 style: this.__getStyle("cube-sticky-fixed", "", "", this.fixedEleStyle)
15571557})));
15581558};
@@ -14477,7 +14477,6 @@ var EVENT_DIFF_CHANGE = 'diff-change';
1447714477 fixedEleHeight: 0,
1447814478 positions: [],
1447914479 heights: [],
14480- _refreshTimer: null,
1448114480 eles: []
1448214481 },
1448314482 computed: {
@@ -14529,7 +14528,7 @@ var EVENT_DIFF_CHANGE = 'diff-change';
1452914528 right: this.rootRect.right + 'px',
1453014529 width: this.rects[newIndex].width + 'px'
1453114530 });
14532- console.log(newEle.setStyle , this.rootRect, this.rects[newIndex]);
14531+ console.log(newEle.setContentStyle , this.rootRect, this.rects[newIndex]);
1453314532 }
1453414533 },
1453514534 currentDiff: function currentDiff(newVal) {
@@ -14546,33 +14545,25 @@ var EVENT_DIFF_CHANGE = 'diff-change';
1454614545 }
1454714546 },
1454814547 methods: {
14549- _scheduleRefresh: function _scheduleRefresh() {
14550- var _this2 = this;
14551- clearTimeout(this._refreshTimer);
14552- this._refreshTimer = setTimeout(function () {
14553- _this2.refresh();
14554- }, 0);
14555- },
1455614548 _getEles: function _getEles() {
1455714549 var nodes = this.getRelationNodes((_sticky_ele_index_mpx_resolve__WEBPACK_IMPORTED_MODULE_1___default()));
1455814550 return nodes || [];
1455914551 },
1456014552 // @vuese
1456114553 // 刷新 sticky 内部元素位置与高度
1456214554 refresh: function refresh() {
14563- var _this3 = this;
14555+ var _this2 = this;
1456414556 this.$nextTick(function () {
14565- _this3 .eles = _this3 ._getEles();
14566- _this3 .eles.forEach(function (ele) {
14557+ _this2 .eles = _this2 ._getEles();
14558+ _this2 .eles.forEach(function (ele) {
1456714559 return ele.refresh && ele.refresh();
1456814560 });
14569- _this3 ._calculateHeight(function () {
14570- _this3 .computeCurrentSticky(_this3 .pos);
14561+ _this2 ._calculateHeight(function () {
14562+ _this2 .computeCurrentSticky(_this2 .pos);
1457114563 });
1457214564 });
1457314565 },
1457414566 computeCurrentSticky: function computeCurrentSticky(scrollY) {
14575- console.log(scrollY);
1457614567 scrollY += this.offset;
1457714568 var positions = this.positions;
1457814569 var heights = this.heights;
@@ -14608,38 +14599,40 @@ var EVENT_DIFF_CHANGE = 'diff-change';
1460814599 this.diff = 0;
1460914600 },
1461014601 _updateFixedEleHeight: function _updateFixedEleHeight() {
14611- var _this4 = this;
14602+ var _this3 = this;
1461214603 var query = this.createSelectorQuery();
1461314604 query.select('.cube-sticky-fixed').boundingClientRect(function (rect) {
14614- _this4 .fixedEleHeight = (rect === null || rect === void 0 ? void 0 : rect.height) || 0;
14605+ _this3 .fixedEleHeight = (rect === null || rect === void 0 ? void 0 : rect.height) || 0;
1461514606 });
1461614607 query.exec();
1461714608 },
1461814609 _calculateHeight: function _calculateHeight(done) {
14619- var _this5 = this;
14610+ var _this4 = this;
1462014611 var nodes = this._getEles();
1462114612 var rootTop = 0;
1462214613 this.positions = [];
1462314614 this.heights = [];
1462414615 this.rects = [];
14616+ // query.select('.cube-sticky').boundingClientRect((rootRect: any) => {
1462514617 var query = this.createSelectorQuery();
1462614618 query.select('.cube-sticky').boundingClientRect(function (rootRect) {
14627- _this5 .rootRect = rootRect;
14619+ _this4 .rootRect = rootRect;
1462814620 rootTop = (rootRect === null || rootRect === void 0 ? void 0 : rootRect.top) || 0;
14629- _this5 .rootTop = rootTop;
14621+ _this4 .rootTop = rootTop;
1463014622 });
1463114623 nodes.forEach(function (node, index) {
1463214624 query.in(node);
1463314625 query.selectAll('.cube-sticky-ele').boundingClientRect(function (rects) {
14626+ console.log(rects);
1463414627 (rects || []).forEach(function (rect) {
14635- _this5 .rects.push(rect);
14636- _this5 .positions[index] = ((rect === null || rect === void 0 ? void 0 : rect.top) || 0) - rootTop;
14637- _this5 .heights[index] = (rect === null || rect === void 0 ? void 0 : rect.height) || 0;
14628+ _this4 .rects.push(rect);
14629+ _this4 .positions[index] = ((rect === null || rect === void 0 ? void 0 : rect.top) || 0) - rootTop;
14630+ _this4 .heights[index] = (rect === null || rect === void 0 ? void 0 : rect.height) || 0;
1463814631 });
1463914632 });
1464014633 });
1464114634 query.exec(function () {
14642- _this5 ._updateFixedEleHeight();
14635+ _this4 ._updateFixedEleHeight();
1464314636 done && done();
1464414637 });
1464514638 }
@@ -41922,11 +41915,13 @@ __webpack_require__.g.currentInject.render = function (createElement, getCompone
4192241915 ishost: true,
4192341916 style: this.__getStyle("mpx-root-view host-_25af18f9", "", "", "")
4192441917}, createElement(getComponent("mpx-view"), {
41918+ ref: this.__getRefVal('node', [[".", this.__getClass("cube-sticky-ele", "")]], "ref_fn_1"),
4192541919 style: this.__getStyle("cube-sticky-ele", "", "", this.eleHeightStyle)
4192641920}, createElement(getComponent("mpx-view"), {
4192741921 style: this.__getStyle("cube-sticky-ele-content", "", "", this.eleContentStyle)
4192841922}, this.__getSlot())));
4192941923};
41924+ __webpack_require__.g.currentInject.getRefsData = function () {return [];};
4193041925__webpack_require__.g.currentInject.injectOptions = {"disableMemo":true};
4193141926/* styles */
4193241927
@@ -42893,7 +42888,7 @@ _ScrollView.displayName = 'MpxScrollView';
4289342888
4289442889"use strict";
4289542890__webpack_require__.r(__webpack_exports__);
42896- /* harmony import */ var _mpxjs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(646 );
42891+ /* harmony import */ var _mpxjs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1037 );
4289742892
4289842893(0,_mpxjs_core__WEBPACK_IMPORTED_MODULE_0__["default"])({
4289942894 options: {
0 commit comments