Compare commits
No commits in common. "20069bfe848d9e0405dd526e505847079b169b5f" and "59b138be5e69c9b1e0cf6bb199329747ebeb80d2" have entirely different histories.
20069bfe84
...
59b138be5e
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="panel-block" v-bind:class="{'disabled': element.loading}">
|
||||
<span class="icon is-pulled-left handle" v-if="canMove">
|
||||
<span class="icon is-pulled-left" v-if="canMove">
|
||||
<ion-icon name="move-outline"></ion-icon>
|
||||
</span>
|
||||
|
||||
<input type="checkbox" v-model="element.checked" v-on:change="updateCheckbox(element)">
|
||||
<input type="checkbox" v-model="element.checked" v-on:change="updateItem(element)">
|
||||
<div class="field is-horizontal has-addons">
|
||||
<div class="control">
|
||||
<input class="input" type="text" v-bind:disabled="element.checked" v-model="element.content"
|
||||
v-on:blur="updateContent(element)">
|
||||
v-on:blur="updateItem(element)">
|
||||
</div>
|
||||
<div class="control">
|
||||
<a class="button is-danger" v-on:click="deleteElement(element)">
|
||||
@ -29,12 +29,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateCheckbox: function () {
|
||||
updateItem: function () {
|
||||
this.$emit('updateItem', {id: this.element.id, checked: this.element.checked}, true)
|
||||
},
|
||||
updateContent: function () {
|
||||
this.$emit('updateItem', {id: this.element.id, content: this.element.content}, true)
|
||||
},
|
||||
deleteElement: function () {
|
||||
this.$emit('deleteElement', this.element.id)
|
||||
}
|
||||
|
@ -29,8 +29,7 @@
|
||||
v-model="searchResults"
|
||||
group="listItems"
|
||||
@change="onChange"
|
||||
item-key="id" v-if="searchQ.length <= 0"
|
||||
handle=".handle">
|
||||
item-key="id" v-if="searchQ.length <= 0">
|
||||
<template #item="{element}">
|
||||
<ListItem v-bind:item="element" v-bind:can-move="!element.checked" v-on:updateItem="updateItem" v-on:deleteElement="deleteElement"></ListItem>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user