docs: scrollbar manual scroll linkage el-slider (#3309)

This commit is contained in:
啝裳
2021-09-09 12:10:26 +08:00
committed by GitHub
parent 60be401c89
commit f6d6df3eb2
5 changed files with 20 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ Used to replace the browser's native scrollbar.
```html
<template>
<el-scrollbar ref="scrollbar" height="400px" always>
<el-scrollbar ref="scrollbar" height="400px" always @scroll="scroll">
<div ref="inner">
<p class="item" v-for="item in 20">{{ item }}</p>
</div>
@@ -103,6 +103,9 @@ Used to replace the browser's native scrollbar.
inputSlider(value) {
this.$refs.scrollbar.setScrollTop(value)
},
scroll({ scrollTop }) {
this.value = scrollTop
},
formatTooltip(value) {
return `${value} px`
},

View File

@@ -74,7 +74,7 @@ Used to replace the browser's native scrollbar.
```html
<template>
<el-scrollbar ref="scrollbar" height="400px" always>
<el-scrollbar ref="scrollbar" height="400px" always @scroll="scroll">
<div ref="inner">
<p class="item" v-for="item in 20">{{ item }}</p>
</div>
@@ -103,6 +103,9 @@ Used to replace the browser's native scrollbar.
inputSlider(value) {
this.$refs.scrollbar.setScrollTop(value)
},
scroll({ scrollTop }) {
this.value = scrollTop
},
formatTooltip(value) {
return `${value} px`
},

View File

@@ -74,7 +74,7 @@ Used to replace the browser's native scrollbar.
```html
<template>
<el-scrollbar ref="scrollbar" height="400px" always>
<el-scrollbar ref="scrollbar" height="400px" always @scroll="scroll">
<div ref="inner">
<p class="item" v-for="item in 20">{{ item }}</p>
</div>
@@ -103,6 +103,9 @@ Used to replace the browser's native scrollbar.
inputSlider(value) {
this.$refs.scrollbar.setScrollTop(value)
},
scroll({ scrollTop }) {
this.value = scrollTop
},
formatTooltip(value) {
return `${value} px`
},

View File

@@ -74,7 +74,7 @@ Used to replace the browser's native scrollbar.
```html
<template>
<el-scrollbar ref="scrollbar" height="400px" always>
<el-scrollbar ref="scrollbar" height="400px" always @scroll="scroll">
<div ref="inner">
<p class="item" v-for="item in 20">{{ item }}</p>
</div>
@@ -103,6 +103,9 @@ Used to replace the browser's native scrollbar.
inputSlider(value) {
this.$refs.scrollbar.setScrollTop(value)
},
scroll({ scrollTop }) {
this.value = scrollTop
},
formatTooltip(value) {
return `${value} px`
},

View File

@@ -74,7 +74,7 @@
```html
<template>
<el-scrollbar ref="scrollbar" height="400px" always>
<el-scrollbar ref="scrollbar" height="400px" always @scroll="scroll">
<div ref="inner">
<p class="item" v-for="item in 20">{{ item }}</p>
</div>
@@ -103,6 +103,9 @@
inputSlider(value) {
this.$refs.scrollbar.setScrollTop(value)
},
scroll({ scrollTop }) {
this.value = scrollTop
},
formatTooltip(value) {
return `${value} px`
},