forked from iview/iview-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhigang.li
committed
Apr 16, 2018
1 parent
5b3de41
commit d09b980
Showing
13 changed files
with
589 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,4 +82,4 @@ module.exports = merge(webpackBaseConfig, { | |
inject: false | ||
}) | ||
] | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<template> | ||
<div> | ||
<Row :gutter="10"> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar | ||
scroll-y-type="inner" | ||
> | ||
<p v-for="i in 100" :key="`item-${i}`">item - {{ i }}</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar> | ||
<p class="list-item" v-for="i in 6" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar show-all> | ||
<p v-for="i in 100" :key="`item-${i}`">item - {{ i }}</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar show-all> | ||
<p class="list-item" v-for="i in 6" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
</Row> | ||
<Row :style="{marginTop: '10px'}" :gutter="10"> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar show-all dis-scroll-x> | ||
<p class="list-item" v-for="i in 100" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar show-all dis-scroll-y> | ||
<p class="list-item" v-for="i in 100" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar show-all scroll-x="none"> | ||
<p class="list-item" v-for="i in 100" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
<Col span="6"> | ||
<Card :padding="4"> | ||
<div class="scroll-container"> | ||
<scroll-bar> | ||
<p class="list-item" v-for="i in 100" :key="`item-${i}`">item - {{ i }} - item-long-show-x-scrollbar- long-text-make-scroller-x-show-and-useable - item-long-show-x-scrollbar</p> | ||
</scroll-bar> | ||
</div> | ||
</Card> | ||
</Col> | ||
</Row> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import scrollBar from './vue-scroller-bars'; | ||
export default { | ||
name: 'scroll-bar-page', | ||
components: { | ||
scrollBar | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="less"> | ||
.scroll-container{ | ||
height: 260px; | ||
} | ||
.list-item{ | ||
word-break: keep-all; | ||
white-space: nowrap; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
src/views/my-components/scroll-bar/vue-scroller-bars/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import scrollBar from './scroll-bar.vue'; | ||
|
||
export default scrollBar; |
90 changes: 90 additions & 0 deletions
90
src/views/my-components/scroll-bar/vue-scroller-bars/scroll-bar.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@prefix: ~'vue-scroller-bars'; | ||
|
||
.@{prefix}{ | ||
&-wraper{ | ||
height: 100%; | ||
width: 100%; | ||
overflow: hidden; | ||
position: relative; | ||
&.show-when-hover{ | ||
.@{prefix}-scroll{ | ||
opacity: 0; | ||
} | ||
.@{prefix}-place-holder{ | ||
opacity: 0; | ||
} | ||
} | ||
&.show-when-hover:hover{ | ||
.@{prefix}-scroll{ | ||
opacity: 1; | ||
} | ||
.@{prefix}-place-holder{ | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
&-content{ | ||
position: absolute; | ||
min-width: 100%; | ||
left: 0; | ||
top: 0; | ||
} | ||
&-scroll{ | ||
position: relative; | ||
transition: opacity .3s ease .2s; | ||
background: rgba(250, 250, 250, 1); | ||
box-sizing: border-box; | ||
padding: 1px 2px; | ||
z-index: 9999999; | ||
&:hover &-bar{ | ||
background: rgb(100, 100, 100); | ||
} | ||
&-y{ | ||
width: 14px; | ||
height: 100%; | ||
float: right; | ||
border-left: 1px solid rgba(190, 190, 190, .5); | ||
border-right: 1px solid rgba(190, 190, 190, .5); | ||
&.scroll-y-cover{ | ||
position: absolute; | ||
right: 0px; | ||
top: 0px; | ||
} | ||
} | ||
&-x{ | ||
width: 100%; | ||
height: 14px; | ||
float: right; | ||
border-top: 1px solid rgba(190, 190, 190, .5); | ||
border-bottom: 1px solid rgba(190, 190, 190, .5); | ||
&.scroll-x-cover{ | ||
position: absolute; | ||
left: 0px; | ||
bottom: 0px; | ||
} | ||
} | ||
&-bar{ | ||
background: rgba(190, 190, 190, 1); | ||
position: absolute; | ||
border-radius: 4px; | ||
transition: background .2s ease; | ||
&-y{ | ||
width: ~'calc(100% - 4px)'; | ||
min-height: 14px; | ||
} | ||
&-x{ | ||
height: ~'calc(100% - 4px)'; | ||
min-width: 14px; | ||
} | ||
} | ||
} | ||
&-place-holder{ | ||
position: absolute; | ||
transition: opacity .3s ease .2s; | ||
right: 0px; | ||
bottom: 0px; | ||
width: 14px; | ||
height: 14px; | ||
background: rgba(250, 250, 250, 1); | ||
} | ||
} |
Oops, something went wrong.