This commit is contained in:
bkfox
2022-12-12 03:09:25 +01:00
parent 180cc8bc02
commit a53a37021c
10 changed files with 62 additions and 31 deletions

View File

@ -31,14 +31,6 @@
</template>
</a-row>
</template>
<template v-if="allowCreate">
<a-row :item="extraItem" :cell="{row:items.length, columns}"
@keypress.enter.stop.prevent="validateExtraCell">
<template v-for="[name,slot] of rowSlots" :key="slot" v-slot:[slot]="data">
<slot :name="name" v-bind="data"/>
</template>
</a-row>
</template>
<slot name="tail"/>
</tbody>
</table>
@ -85,13 +77,6 @@ const Component = {
},
methods: {
validateExtraCell() {
if(!this.allowCreate)
return
this.set.push(this.extraItem)
this.extraItem = new this.set.model()
},
onControlKey(event, cell) {
switch(event.key) {
case "ArrowUp": this.focus(-1, 0, cell)