wip
This commit is contained in:
parent
7f01aad576
commit
8f2dd47b4a
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="ulveipgl" :style="{ pointerEvents: closing ? 'none' : 'auto' }">
|
||||
<transition :name="$store.state.device.animation ? 'form-fade' : ''" appear @after-leave="$store.commit('setPostForm', null)">
|
||||
<transition :name="$store.state.device.animation ? 'form-fade' : ''" appear @after-leave="destroy">
|
||||
<div class="bg _modalBg" ref="bg" v-if="!closing" @click="close()"></div>
|
||||
</transition>
|
||||
<div class="main" ref="main" @click.self="close()" @keydown="onKeydown">
|
||||
|
@ -36,6 +36,12 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
props: {
|
||||
destroy: {
|
||||
required: true
|
||||
},
|
||||
emit: {
|
||||
required: true
|
||||
},
|
||||
reply: {
|
||||
type: Object,
|
||||
required: false
|
||||
|
|
|
@ -296,7 +296,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
post() {
|
||||
this.$store.commit('setPostForm', {});
|
||||
os.post();
|
||||
},
|
||||
|
||||
search() {
|
||||
|
|
|
@ -73,7 +73,13 @@ export function dialog(props: Record<string, any>) {
|
|||
|
||||
export function menu(props: Record<string, any>) {
|
||||
return new Promise((res, rej) => {
|
||||
return popup(defineAsyncComponent(() => import('@/components/menu.vue')), props, res);
|
||||
popup(defineAsyncComponent(() => import('@/components/menu.vue')), props, res);
|
||||
});
|
||||
}
|
||||
|
||||
export function post(props: Record<string, any>) {
|
||||
return new Promise((res, rej) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/post-form-dialog.vue')), props, res);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue