[new feature] IndexBar: add sticky prop (#3402)

This commit is contained in:
neverland
2019-05-30 11:50:09 +08:00
committed by GitHub
parent 74124246f6
commit 82134fe402
14 changed files with 263 additions and 60 deletions
+10
View File
@@ -70,3 +70,13 @@ export function later(delay: number = 0): Promise<void> {
export function transitionStub(): void {
Vue.component('transition', TransitionStub as any);
}
export function mockGetBoundingClientRect(rect: ClientRect | DOMRect): Function {
const originMethod = Element.prototype.getBoundingClientRect;
Element.prototype.getBoundingClientRect = <any> jest.fn(() => rect);
return function () {
Element.prototype.getBoundingClientRect = originMethod;
};
}