source documents editable-file ok
This commit is contained in:
@@ -20,7 +20,8 @@ export default {
|
||||
props: {
|
||||
can_update: Boolean,
|
||||
links: Array,
|
||||
data: Object
|
||||
data: Object,
|
||||
label: String
|
||||
},
|
||||
emits: ['updated'],
|
||||
data(){
|
||||
@@ -121,15 +122,15 @@ export default {
|
||||
console.warn(`Issue with patch ${this.data.entitytype} ${this.data.bundle}`, error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
},
|
||||
async onDeleteLink(i){
|
||||
console.log(`onDeleteLink ${i}`, this.$refs.links_list.children[i]);
|
||||
// this.links_nb = this.$refs.links_list.children.length;
|
||||
// this.$refs.links_list.children[i].remove();
|
||||
this.links.splice(i,1);
|
||||
await nextTick();
|
||||
this.buildLinkListThenSave(true);
|
||||
}
|
||||
},
|
||||
async onDeleteLink(i){
|
||||
console.log(`onDeleteLink ${i}`, this.$refs.links_list.children[i]);
|
||||
// this.links_nb = this.$refs.links_list.children.length;
|
||||
// this.$refs.links_list.children[i].remove();
|
||||
this.links.splice(i,1);
|
||||
await nextTick();
|
||||
this.buildLinkListThenSave(true);
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SvgIcon,
|
||||
@@ -140,6 +141,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<label>{{ label }}</label>
|
||||
<ul ref="links_list">
|
||||
<li v-for="(link, l) in links" :key="l" :class="{'link-editable':can_update}">
|
||||
<!-- link exists can't update -->
|
||||
|
||||
Reference in New Issue
Block a user