Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Updateding...
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Dec 21, 2016
1 parent fbf4179 commit 8c6c448
Show file tree
Hide file tree
Showing 10 changed files with 581 additions and 70 deletions.
8 changes: 4 additions & 4 deletions examples/01-example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<md-card>
<md-card-actions v-md-ink-ripple>
<div class="md-subhead">
<span>Base Example</span>
<span>Horizontal Base Example</span>
</div>
<md-button class="md-icon-button"
target="_blank"
Expand All @@ -14,12 +14,12 @@
<!-- drag-zone -->
<drag-zone class="zone">
<div class="item i1">item1</div>
<drag-handle class="handle">H</drag-handle>
<drag-handle class="handle"></drag-handle>
<div class="item i2">item2</div>
<drag-handle class="handle">H</drag-handle>
<drag-handle class="handle"></drag-handle>
<div class="item i3">item3</div>
<div class="item i4">item4</div>
<drag-handle class="handle" disabled>H</drag-handle>
<drag-handle class="handle"></drag-handle>
<div class="item i5">item5</div>
</drag-zone>
</md-card-media>
Expand Down
8 changes: 4 additions & 4 deletions examples/02-example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<md-card>
<md-card-actions v-md-ink-ripple>
<div class="md-subhead">
<span>Disabled Example</span>
<span>Horizontal Disabled Example</span>
</div>
<md-button class="md-icon-button"
target="_blank"
Expand All @@ -14,12 +14,12 @@
<!-- drag-zone -->
<drag-zone class="zone">
<div class="item i1">item1</div>
<drag-handle class="handle">H</drag-handle>
<drag-handle class="handle"></drag-handle>
<div class="item i2">item2</div>
<div class="item i3">item3</div>
<drag-handle class="handle">H</drag-handle>
<drag-handle class="handle"></drag-handle>
<div class="item i4">item4</div>
<drag-handle class="handle" :disabled="disabledHandle">H</drag-handle>
<drag-handle class="handle" :disabled="disabledHandle"></drag-handle>
<div class="item i5">item5</div>
</drag-zone>
</md-card-media>
Expand Down
16 changes: 8 additions & 8 deletions examples/03-example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<md-card>
<md-card-actions v-md-ink-ripple>
<div class="md-subhead">
<span>MinWdith and MaxWidth Example</span>
<span>Horizontal MinWdith and MaxWidth Example</span>
</div>
<md-button class="md-icon-button"
target="_blank"
Expand All @@ -13,14 +13,14 @@
<md-card-media>
<!-- drag-zone -->
<drag-zone class="zone">
<div class="item i1">min 100px && max 300px</div>
<drag-handle class="handle">H</drag-handle>
<div class="item i1">min 100px && max 30rem</div>
<drag-handle class="handle"></drag-handle>
<div class="item i2">item2</div>
<drag-handle class="handle">H</drag-handle>
<drag-handle class="handle"></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 100px</div>
<drag-handle class="handle" disabled></drag-handle>
<div class="item i5">min 10em</div>
</drag-zone>
</md-card-media>
</md-card>
Expand Down Expand Up @@ -61,7 +61,7 @@
}
.zone .item.i1 {
min-width: 100px;
max-width: 300px;
max-width: 30rem;
background: #999;
}
.zone .item.i2 {
Expand All @@ -75,7 +75,7 @@
background: #333;
}
.zone .item.i5 {
min-width: 100px;
min-width: 10em;
background: #000;
}
</style>
81 changes: 81 additions & 0 deletions examples/04-example.vue
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>
83 changes: 83 additions & 0 deletions examples/05-example.vue
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>
81 changes: 81 additions & 0 deletions examples/06-example.vue
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>
8 changes: 7 additions & 1 deletion examples/index.js
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
}
Loading

0 comments on commit 8c6c448

Please sign in to comment.