优化滚动条
parent
f1b85e8f05
commit
a4bfa07649
|
@ -1,13 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="wrapper"><slot /></div>
|
<div class="wrapper"><slot /></div>
|
||||||
<div class="is-horizontal"><span class="thumb"></span></div>
|
|
||||||
<div class="is-vertical"><span class="thumb"></span></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="is-horizontal"><span class="thumb"></span></div>
|
||||||
|
<div class="is-vertical"><span class="thumb"></span></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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue