diff --git a/editor/inspector/components/widget.js b/editor/inspector/components/widget.js
index 2b6fafc719..8c7b0b371a 100644
--- a/editor/inspector/components/widget.js
+++ b/editor/inspector/components/widget.js
@@ -565,6 +565,12 @@ exports.methods = {
this.$refs.summitProp.dispatch('change-dump');
},
+ snapshot() {
+ // next tick snapshot
+ setTimeout(() => {
+ this.$refs.summitProp.dispatch('confirm-dump');
+ });
+ },
getUnit(type) {
const data = this.dump.value;
@@ -661,6 +667,7 @@ exports.methods = {
const { dump } = update(this.dump, true);
this.$refs.summitProp.dump = dump;
this.$refs.summitProp.dispatch('change-dump');
+ this.snapshot();
},
select(event) {
@@ -892,7 +899,7 @@ exports.methods = {
this.dimensionVertical = this.getDimensionVertical();
}
- this.$refs.summitProp.dispatch('confirm-dump');
+ this.snapshot();
},
toggleLock(direction) {
@@ -931,6 +938,7 @@ exports.methods = {
}
this.$refs.summitProp.dispatch('change-dump');
+ this.snapshot();
},
isLock(direction) {
const lockValue = this.dump.value._lockFlags.value;
@@ -1046,7 +1054,9 @@ const template = /* html*/`
@@ -1065,6 +1075,7 @@ const template = /* html*/`
:disabled="!dump.value.isAlignHorizontalCenter.value"
:value="dump.value.editorHorizontalCenter.value"
@change="change('editorHorizontalCenter', $event.target.value)"
+ @confirm="snapshot()"
@unit-click="changeUnit('editorHorizontalCenter')">
@@ -1078,7 +1089,9 @@ const template = /* html*/`
@@ -1121,7 +1134,9 @@ const template = /* html*/`
@@ -1139,6 +1154,7 @@ const template = /* html*/`
@@ -1153,7 +1169,9 @@ const template = /* html*/`