This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
unknown
committed
Dec 21, 2016
1 parent
fbf4179
commit 8c6c448
Showing
10 changed files
with
581 additions
and
70 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
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,81 @@ | ||
<template> | ||
<md-card> | ||
<md-card-actions v-md-ink-ripple> | ||
<div class="md-subhead"> | ||
<span>Vertical Base Example</span> | ||
</div> | ||
<md-button class="md-icon-button" | ||
target="_blank" | ||
href="https://github.com/surmon-china/vue-drag-zone/tree/master/examples/01-example.vue"> | ||
<md-icon>code</md-icon> | ||
</md-button> | ||
</md-card-actions> | ||
<md-card-media> | ||
<!-- drag-zone --> | ||
<drag-zone class="zone" :options="{ direction: 'vertical' }"> | ||
<div class="item i1">item1</div> | ||
<drag-handle class="handle"></drag-handle> | ||
<div class="item i2">item2</div> | ||
<drag-handle class="handle"></drag-handle> | ||
<div class="item i3">item3</div> | ||
<div class="item i4">item4</div> | ||
<drag-handle class="handle"></drag-handle> | ||
<div class="item i5">item5</div> | ||
</drag-zone> | ||
</md-card-media> | ||
</md-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.zone { | ||
width: 100%; | ||
height: 500px; | ||
margin: 0 auto; | ||
position: relative; | ||
clear: both; | ||
text-align: center; | ||
color: white; | ||
background: #eee; | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
} | ||
.zone .handle { | ||
width: 100%; | ||
height: 10px; | ||
background: #2196f3; | ||
} | ||
.zone .item { | ||
width: 100%; | ||
height: calc((100% - 30px) / 4); | ||
overflow: hidden; | ||
text-align: center; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.zone .item.i1 { | ||
background: #999; | ||
} | ||
.zone .item.i2 { | ||
background: #777; | ||
} | ||
.zone .item.i3 { | ||
background: #555; | ||
} | ||
.zone .item.i4 { | ||
background: #333; | ||
} | ||
.zone .item.i5 { | ||
background: #000; | ||
} | ||
</style> |
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,83 @@ | ||
<template> | ||
<md-card> | ||
<md-card-actions v-md-ink-ripple> | ||
<div class="md-subhead"> | ||
<span>Disabled Example</span> | ||
</div> | ||
<md-button class="md-icon-button" | ||
target="_blank" | ||
href="https://github.com/surmon-china/vue-drag-zone/tree/master/examples/02-example.vue"> | ||
<md-icon>code</md-icon> | ||
</md-button> | ||
</md-card-actions> | ||
<md-card-media> | ||
<!-- drag-zone --> | ||
<drag-zone class="zone"> | ||
<div class="item i1">item1</div> | ||
<drag-handle class="handle">H</drag-handle> | ||
<div class="item i2">item2</div> | ||
<div class="item i3">item3</div> | ||
<drag-handle class="handle">H</drag-handle> | ||
<div class="item i4">item4</div> | ||
<drag-handle class="handle" :disabled="disabledHandle">H</drag-handle> | ||
<div class="item i5">item5</div> | ||
</drag-zone> | ||
</md-card-media> | ||
</md-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
disabledHandle: true | ||
} | ||
}, | ||
mounted() { | ||
setInterval(() => { | ||
this.disabledHandle = !this.disabledHandle | ||
}, 5000) | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.zone { | ||
width: 100%; | ||
height: 500px; | ||
line-height: 180px; | ||
margin: 0 auto; | ||
position: relative; | ||
clear: both; | ||
text-align: center; | ||
color: white; | ||
background: #eee; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.zone .handle { | ||
width: 10px; | ||
height: 180px; | ||
background: #2196f3; | ||
} | ||
.zone .item { | ||
width: calc((100% - 30px) / 4); | ||
height: 180px; | ||
overflow: hidden; | ||
} | ||
.zone .item.i1 { | ||
background: #999; | ||
} | ||
.zone .item.i2 { | ||
background: #777; | ||
} | ||
.zone .item.i3 { | ||
background: #555; | ||
} | ||
.zone .item.i4 { | ||
background: #333; | ||
} | ||
.zone .item.i5 { | ||
background: #000; | ||
} | ||
</style> |
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,81 @@ | ||
<template> | ||
<md-card> | ||
<md-card-actions v-md-ink-ripple> | ||
<div class="md-subhead"> | ||
<span>MinWdith and MaxWidth Example</span> | ||
</div> | ||
<md-button class="md-icon-button" | ||
target="_blank" | ||
href="https://github.com/surmon-china/vue-drag-zone/tree/master/examples/03-example.vue"> | ||
<md-icon>code</md-icon> | ||
</md-button> | ||
</md-card-actions> | ||
<md-card-media> | ||
<!-- drag-zone --> | ||
<drag-zone class="zone"> | ||
<div class="item i1">min 100px && max 30rem</div> | ||
<drag-handle class="handle">H</drag-handle> | ||
<div class="item i2">item2</div> | ||
<drag-handle class="handle">H</drag-handle> | ||
<div class="item i3">item3</div> | ||
<div class="item i4">min 50px</div> | ||
<drag-handle class="handle" disabled>H</drag-handle> | ||
<div class="item i5">min 10em</div> | ||
</drag-zone> | ||
</md-card-media> | ||
</md-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.zone { | ||
width: 100%; | ||
height: 180px; | ||
line-height: 180px; | ||
margin: 0 auto; | ||
position: relative; | ||
clear: both; | ||
text-align: center; | ||
color: white; | ||
background: #eee; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.zone .handle { | ||
width: 10px; | ||
height: 180px; | ||
background: #2196f3; | ||
} | ||
.zone .item { | ||
width: calc((100% - 30px) / 4); | ||
height: 180px; | ||
overflow: hidden; | ||
} | ||
.zone .item.i1 { | ||
min-width: 100px; | ||
max-width: 30rem; | ||
background: #999; | ||
} | ||
.zone .item.i2 { | ||
background: #777; | ||
} | ||
.zone .item.i3 { | ||
background: #555; | ||
} | ||
.zone .item.i4 { | ||
min-width: 50px; | ||
background: #333; | ||
} | ||
.zone .item.i5 { | ||
min-width: 10em; | ||
background: #000; | ||
} | ||
</style> |
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import example01 from './01-example.vue' | ||
import example02 from './02-example.vue' | ||
import example03 from './03-example.vue' | ||
import example04 from './04-example.vue' | ||
// import example05 from './05-example.vue' | ||
// import example06 from './06-example.vue' | ||
|
||
module.exports = { | ||
example01, | ||
example02, | ||
example03 | ||
example03, | ||
example04, | ||
// example05, | ||
// example06 | ||
} |
Oops, something went wrong.