Global mixins
This commit is contained in:
parent
34bb66bb41
commit
7dfbfa32eb
11
src/main.ts
11
src/main.ts
|
@ -67,17 +67,6 @@ app.component('x-button', Button)
|
|||
app.component('modal', Modal)
|
||||
app.component('card', Card)
|
||||
|
||||
// Mixins
|
||||
import {getNamespaceTitle} from './helpers/getNamespaceTitle'
|
||||
import {getListTitle} from './helpers/getListTitle'
|
||||
|
||||
app.mixin({
|
||||
methods: {
|
||||
getNamespaceTitle,
|
||||
getListTitle,
|
||||
},
|
||||
})
|
||||
|
||||
app.config.errorHandler = (err, vm, info) => {
|
||||
if (import.meta.env.DEV) {
|
||||
console.error(err, vm, info)
|
||||
|
|
|
@ -75,6 +75,7 @@ import {mapState} from 'vuex'
|
|||
import Fancycheckbox from '../../components/input/fancycheckbox.vue'
|
||||
import {LOADING} from '@/store/mutation-types'
|
||||
import ListCard from '@/components/list/partials/list-card.vue'
|
||||
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||
import { setTitle } from '@/helpers/setTitle'
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -102,6 +103,7 @@ export default defineComponent({
|
|||
loading: LOADING,
|
||||
}),
|
||||
methods: {
|
||||
getNamespaceTitle,
|
||||
saveShowArchivedState() {
|
||||
localStorage.setItem('showArchived', JSON.stringify(this.showArchived))
|
||||
},
|
||||
|
|
|
@ -444,8 +444,10 @@ import {CURRENT_LIST} from '@/store/mutation-types'
|
|||
import {uploadFile} from '@/helpers/attachments'
|
||||
import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue'
|
||||
import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue'
|
||||
import { setTitle } from '@/helpers/setTitle'
|
||||
import type ListModel from '@/models/list'
|
||||
import { setTitle } from '@/helpers/setTitle'
|
||||
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||
import {getListTitle} from '@/helpers/getListTitle'
|
||||
|
||||
function scrollIntoView(el) {
|
||||
if (!el) {
|
||||
|
@ -581,6 +583,8 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
getNamespaceTitle,
|
||||
getListTitle,
|
||||
attachmentUpload(...args) {
|
||||
return uploadFile(this.taskId, ...args)
|
||||
},
|
||||
|
|
Reference in New Issue