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('modal', Modal)
|
||||||
app.component('card', Card)
|
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) => {
|
app.config.errorHandler = (err, vm, info) => {
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
console.error(err, vm, info)
|
console.error(err, vm, info)
|
||||||
|
|
|
@ -75,6 +75,7 @@ import {mapState} from 'vuex'
|
||||||
import Fancycheckbox from '../../components/input/fancycheckbox.vue'
|
import Fancycheckbox from '../../components/input/fancycheckbox.vue'
|
||||||
import {LOADING} from '@/store/mutation-types'
|
import {LOADING} from '@/store/mutation-types'
|
||||||
import ListCard from '@/components/list/partials/list-card.vue'
|
import ListCard from '@/components/list/partials/list-card.vue'
|
||||||
|
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||||
import { setTitle } from '@/helpers/setTitle'
|
import { setTitle } from '@/helpers/setTitle'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -102,6 +103,7 @@ export default defineComponent({
|
||||||
loading: LOADING,
|
loading: LOADING,
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
|
getNamespaceTitle,
|
||||||
saveShowArchivedState() {
|
saveShowArchivedState() {
|
||||||
localStorage.setItem('showArchived', JSON.stringify(this.showArchived))
|
localStorage.setItem('showArchived', JSON.stringify(this.showArchived))
|
||||||
},
|
},
|
||||||
|
|
|
@ -444,8 +444,10 @@ import {CURRENT_LIST} from '@/store/mutation-types'
|
||||||
import {uploadFile} from '@/helpers/attachments'
|
import {uploadFile} from '@/helpers/attachments'
|
||||||
import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue'
|
import ChecklistSummary from '../../components/tasks/partials/checklist-summary.vue'
|
||||||
import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue'
|
import CreatedUpdated from '@/components/tasks/partials/createdUpdated.vue'
|
||||||
import { setTitle } from '@/helpers/setTitle'
|
|
||||||
import type ListModel from '@/models/list'
|
import type ListModel from '@/models/list'
|
||||||
|
import { setTitle } from '@/helpers/setTitle'
|
||||||
|
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
||||||
|
import {getListTitle} from '@/helpers/getListTitle'
|
||||||
|
|
||||||
function scrollIntoView(el) {
|
function scrollIntoView(el) {
|
||||||
if (!el) {
|
if (!el) {
|
||||||
|
@ -581,6 +583,8 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getNamespaceTitle,
|
||||||
|
getListTitle,
|
||||||
attachmentUpload(...args) {
|
attachmentUpload(...args) {
|
||||||
return uploadFile(this.taskId, ...args)
|
return uploadFile(this.taskId, ...args)
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue