Skip to content

Commit

Permalink
fix: optimize the function writing.
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyLeo committed Jan 9, 2025
1 parent b7e350f commit a870123
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/common/component/BlockDeployDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</template>

<script>
import { reactive, ref, watch, computed } from 'vue'
import { reactive, ref, watch } from 'vue'
import {
Checkbox as TinyCheckbox,
Input as TinyInput,
Expand Down Expand Up @@ -174,10 +174,10 @@ export default {
const { setSaved } = useCanvas()
const isSameBlock = computed(() => {
const isSameBlock = () => {
const currentBlock = useBlock().getCurrentBlock()
return props.block?.id === currentBlock?.id
})
}
const deployBlock = async () => {
deployBlockRef.value.validate((valid) => {
Expand All @@ -193,7 +193,7 @@ export default {
}
publishBlock(params)
setVisible(false)
if (formState.needToSave && isSameBlock.value) {
if (formState.needToSave && isSameBlock()) {
setSaved(true)
}
formState.deployInfo = ''
Expand Down

0 comments on commit a870123

Please sign in to comment.