|
@@ -14,7 +14,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { reactive } from 'vue'
|
|
|
+import { reactive, onBeforeUnmount } from 'vue'
|
|
|
import { toggleMovePath, toggleMoveCube } from '@/utils/map/addLayer'
|
|
|
|
|
|
const options = reactive({
|
|
@@ -30,6 +30,15 @@ function toggleOption(target) {
|
|
|
toggleMoveCube(options[target])
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+function clearStatus() {
|
|
|
+ toggleMovePath(false)
|
|
|
+ toggleMoveCube(false)
|
|
|
+}
|
|
|
+
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ clearStatus()
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|