demarches-normaliennes/app/javascript/new_design/administrateur/DraggableList.vue

29 lines
779 B
Vue
Raw Normal View History

2018-11-14 16:26:00 +01:00
<template>
<div class="champs-editor">
<Draggable :list="state.typesDeChamp" :options="{handle:'.handle'}">
<DraggableItem
v-for="(item, index) in state.typesDeChamp"
:state="state"
:index="index"
:item="item"
:key="item.id" />
</Draggable>
2019-02-12 15:50:49 +01:00
<div class="footer"></div>
<div class="buttons">
2019-02-08 17:40:59 +01:00
<button class="button" v-scroll-to="'.footer'" @click.prevent="addChamp">
2018-11-14 16:26:00 +01:00
<template v-if="state.isAnnotation">
Ajouter une annotation
</template>
<template v-else>
Ajouter un champ
</template>
</button>
<button class="button primary" @click.prevent="save">Enregistrer</button>
2018-11-14 16:26:00 +01:00
</div>
</div>
</template>
<script src="./DraggableList.js"></script>