feat: add isModal prop
This commit is contained in:
parent
e6c660c20b
commit
c3668d961b
|
@ -77,6 +77,7 @@ export function useRouteWithModal() {
|
|||
|
||||
const props = getRouteProps(route)
|
||||
|
||||
props.isModal = true
|
||||
props.backdropRoutePath = backdropRoute.value.fullPath
|
||||
props.onClose = closeModal
|
||||
|
||||
|
|
|
@ -447,8 +447,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {ref, reactive, toRef, shallowReactive, computed, watch, nextTick, type PropType, useAttrs} from 'vue'
|
||||
import {useRouter, type RouteLocation} from 'vue-router'
|
||||
import {ref, reactive, toRef, shallowReactive, computed, watch, nextTick, type PropType} from 'vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {unrefElement} from '@vueuse/core'
|
||||
import cloneDeep from 'lodash.clonedeep'
|
||||
|
@ -507,8 +507,9 @@ const props = defineProps({
|
|||
type: Number as PropType<ITask['id']>,
|
||||
required: true,
|
||||
},
|
||||
backdropRoutePath: {
|
||||
type: String as PropType<RouteLocation['fullPath']>,
|
||||
isModal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -580,8 +581,6 @@ const color = computed(() => {
|
|||
|
||||
const hasAttachments = computed(() => attachmentStore.attachments.length > 0)
|
||||
|
||||
const isModal = computed(() => Boolean(props.backdropRoutePath))
|
||||
|
||||
function attachmentUpload(file: File, onSuccess?: (url: string) => void) {
|
||||
return uploadFile(taskId.value, file, onSuccess)
|
||||
}
|
||||
|
|
Reference in New Issue