This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

优化滚动条

old
宇天 2021-05-21 15:05:14 +08:00
parent f1b85e8f05
commit a4bfa07649
1 changed files with 6 additions and 6 deletions

View File

@ -1,13 +1,14 @@
<template> <template>
<div class="container"> <div class="container">
<div class="wrapper"><slot /></div> <div class="wrapper"><slot /></div>
</div>
<div class="is-horizontal"><span class="thumb"></span></div> <div class="is-horizontal"><span class="thumb"></span></div>
<div class="is-vertical"><span class="thumb"></span></div> <div class="is-vertical"><span class="thumb"></span></div>
</div>
</template> </template>
<style lang="scss"> <style lang="scss">
:host { :host {
position: relative;
display: block; display: block;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -149,10 +150,9 @@ export default class Scroll {
__init__() { __init__() {
/* render */ /* render */
var elem = this.root.children[1] this.__BOX__ = this.root.children[1].children[0]
this.__BOX__ = elem.children[0] this.__X__ = this.root.children[2].children[0]
this.__X__ = elem.children[1].children[0] this.__Y__ = this.root.children[3].children[0]
this.__Y__ = elem.children[2].children[0]
this.__last__ = 0 this.__last__ = 0
} }