mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
微信登录版
This commit is contained in:
28
wechat_v2/miniprogram_npm/@vant/weapp/index-anchor/index.js
Normal file
28
wechat_v2/miniprogram_npm/@vant/weapp/index-anchor/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
var utils_1 = require('../common/utils');
|
||||
var component_1 = require('../common/component');
|
||||
var relation_1 = require('../common/relation');
|
||||
component_1.VantComponent({
|
||||
relation: relation_1.useParent('index-bar'),
|
||||
props: {
|
||||
useSlot: Boolean,
|
||||
index: null,
|
||||
},
|
||||
data: {
|
||||
active: false,
|
||||
wrapperStyle: '',
|
||||
anchorStyle: '',
|
||||
},
|
||||
methods: {
|
||||
scrollIntoView: function (scrollTop) {
|
||||
var _this = this;
|
||||
utils_1.getRect(this, '.van-index-anchor-wrapper').then(function (rect) {
|
||||
wx.pageScrollTo({
|
||||
duration: 0,
|
||||
scrollTop: scrollTop + rect.top - _this.parent.data.stickyOffsetTop,
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user