|
|
@ -167,28 +167,11 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: () => ({ |
|
|
|
data: () => ({ |
|
|
|
changed: false, |
|
|
|
changed: false, |
|
|
|
destroyed: false |
|
|
|
destroyed: false, |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
|
|
// this.$refs.input.focus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
|
|
|
|
if (this.changed && !(this.isAttachment || this.isEnum || this.isBoolean || this.isSet || this.isTime)) { |
|
|
|
|
|
|
|
this.$emit('change') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.destroyed = true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
syncDataDebounce: debounce(async function(self) { |
|
|
|
syncDataDebounce: debounce(async function(self) { |
|
|
|
await self.syncData() |
|
|
|
await self.syncData() |
|
|
|
}, 1000), |
|
|
|
}, 500) |
|
|
|
syncData() { |
|
|
|
}), |
|
|
|
if (!this.destroyed) { |
|
|
|
|
|
|
|
this.$emit('update') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
localState: { |
|
|
|
localState: { |
|
|
|
get() { |
|
|
|
get() { |
|
|
@ -196,7 +179,10 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
set(val) { |
|
|
|
this.changed = true |
|
|
|
this.changed = true |
|
|
|
if (val !== this.value) { this.syncDataDebounce(this) } |
|
|
|
if (val !== this.value) { |
|
|
|
|
|
|
|
// debugger |
|
|
|
|
|
|
|
this.syncDataDebounce(this) |
|
|
|
|
|
|
|
} |
|
|
|
this.$emit('input', val) |
|
|
|
this.$emit('input', val) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -221,6 +207,23 @@ export default { |
|
|
|
return $listeners |
|
|
|
return $listeners |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
|
|
// this.$refs.input.focus(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
|
|
|
|
if (this.changed && !(this.isAttachment || this.isEnum || this.isBoolean || this.isSet || this.isTime)) { |
|
|
|
|
|
|
|
this.$emit('change') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.destroyed = true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
syncData() { |
|
|
|
|
|
|
|
if (!this.destroyed) { |
|
|
|
|
|
|
|
this.$emit('update') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -232,21 +235,22 @@ div { |
|
|
|
color: var(--v-textColor-base); |
|
|
|
color: var(--v-textColor-base); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-hint{ |
|
|
|
.nc-hint { |
|
|
|
font-size: .61rem; |
|
|
|
font-size: .61rem; |
|
|
|
color:grey; |
|
|
|
color: grey; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-cell { |
|
|
|
.nc-cell { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-locked-overlay { |
|
|
|
.nc-locked-overlay { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
z-index: 2; |
|
|
|
z-index: 2; |
|
|
|
height: 100%; |
|
|
|
height: 100%; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
top:0; |
|
|
|
top: 0; |
|
|
|
left:0; |
|
|
|
left: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
<!-- |
|
|
|
<!-- |
|
|
|