Created
October 2, 2019 03:23
-
-
Save fazlurr/e700a72437e0c679930dd3980694db1c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<draggable | |
v-model="product.images" | |
v-bind="dragOptions" | |
@start="drag = true" | |
@end="drag = false"> | |
<transition-group | |
class="row small-gutter" | |
type="transition" | |
:name="!drag ? 'flip-list' : null"> | |
<div class="col" v-for="(image, index) in product.images" :key="index + 0"> | |
<div class="pc-image draggable" :class="{ 'is-loading': image === '' }"> | |
<div class="img" :style="{ backgroundImage: `url('${image}')` }"></div> | |
<i class="material-icons" v-tooltip="'Remove'" @click="removeProductImages(index)">close</i> | |
</div> | |
</div> | |
</transition-group> | |
</draggable> |
This file contains hidden or 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
.flip-list-move { | |
transition: transform 0.2s; | |
} | |
.no-move { | |
transition: transform 0; | |
} | |
.sortable-ghost { | |
opacity: 0.5; | |
background: #c8ebfb; | |
} | |
.draggable { | |
cursor: move; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment