

<script>
/* eslint-disable */
// sd-skip-auto-import
import crossWindowWatcher from"@/common/services/cross-window-watcher";import util from"./util";import components from"./_import-components/sd-full-page-editor-util-import";var _render=function e(){var t=this,a=t._self._c;return a("span")};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdFullPageEditorUtil",components:components,mixins:[util.mixin],data(){return{dataSaved:void 0}},created(){this.updateDataSaved();window.addEventListener("unload",this.onPageUnload);window.addEventListener("beforeunload",this.checkUnsavedData)},destroyed(){window.removeEventListener("unload",this.onPageUnload);window.removeEventListener("beforeunload",this.checkUnsavedData)},methods:{onPageUnload(){crossWindowWatcher.notifyChange(false)},checkUnsavedData(e){if(this.isModified())e.returnValue="您将会丢失未保存的数据"},updateDataSaved(){this.$nextTick((()=>this.dataSaved=JSON.stringify(this.designer.getSaveData())))},isModified(){return this.dataSaved!==JSON.stringify(this.designer.getSaveData())}},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
