草稿编辑添加返回按钮
This commit is contained in:
parent
d3ea5832c0
commit
265ff0a939
@ -36,7 +36,7 @@
|
||||
</template>
|
||||
</q-btn-toggle>
|
||||
</q-toolbar-title>
|
||||
|
||||
<q-btn color="info" label="返回" @click="backConfirm" />
|
||||
<q-btn dense flat round icon="menu" @click="toggleRightDrawer" />
|
||||
</q-toolbar>
|
||||
<q-resize-observer @resize="onHeaderResize" />
|
||||
@ -138,9 +138,10 @@ import { getDrawApp, loadDrawDatas, saveDrawDatas } from 'src/drawApp';
|
||||
import { JlDrawApp } from 'src/jl-graphic';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const drawStore = useDrawStore();
|
||||
|
||||
@ -245,6 +246,10 @@ function saveAllDrawDatas() {
|
||||
saveDrawDatas(drawApp as JlDrawApp);
|
||||
}
|
||||
|
||||
function backConfirm() {
|
||||
router.go(-1);
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
drawStore.destroy();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user