mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
docs: scrollbar manual scroll linkage el-slider (#3309)
This commit is contained in:
@@ -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`
|
||||
},
|
||||
|
||||
@@ -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`
|
||||
},
|
||||
|
||||
@@ -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`
|
||||
},
|
||||
|
||||
@@ -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`
|
||||
},
|
||||
|
||||
@@ -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`
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user