Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components): fix multi gantt component in one page problem
ISSUES CLOSED: #10
- Loading branch information
1 parent
8893b0b
commit 8f1f9db
Showing
20 changed files
with
295 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { ref } from 'vue'; | ||
|
||
const rootEmit = ref(); | ||
import { useStore } from '@/store'; | ||
|
||
export default (emit: any) => { | ||
rootEmit.value = emit; | ||
const store = useStore(); | ||
store.rootEmit.value = emit; | ||
return {}; | ||
}; | ||
|
||
export function useGetRootEmit() { | ||
return rootEmit; | ||
const store = useStore(); | ||
return store.rootEmit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { ref } from 'vue'; | ||
|
||
const ganttRef = ref<HTMLDivElement>(); | ||
import { useStore } from '@/store'; | ||
|
||
export function useInitGanttRef() { | ||
return { ganttRef }; | ||
const store = useStore(); | ||
return { ganttRef: store.ganttRef }; | ||
} | ||
|
||
export default () => { | ||
return { ganttRef }; | ||
const store = useStore(); | ||
return { ganttRef: store.ganttRef }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { ref, readonly } from 'vue'; | ||
|
||
const rootRef = ref<HTMLDivElement>(); | ||
import { readonly } from 'vue'; | ||
import { useStore } from '@/store'; | ||
|
||
export function useInitRootRef() { | ||
return { rootRef }; | ||
const store = useStore(); | ||
return { rootRef: store.rootRef }; | ||
} | ||
|
||
export default () => { | ||
return { rootRef: readonly(rootRef) }; | ||
const store = useStore(); | ||
return { rootRef: readonly(store.rootRef) }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { reactive, readonly } from 'vue'; | ||
|
||
const showDateList = reactive<Date[]>([]); | ||
import { readonly } from 'vue'; | ||
import { useStore } from '@/store'; | ||
|
||
export default () => { | ||
const store = useStore(); | ||
|
||
function clearShowDateList() { | ||
showDateList.length = 0; | ||
store.showDateList.length = 0; | ||
} | ||
|
||
function addShowDate(showDate: Date) { | ||
showDateList.push(showDate); | ||
store.showDateList.push(showDate); | ||
} | ||
|
||
return { | ||
clearShowDateList, | ||
addShowDate, | ||
|
||
showDateList: readonly(showDateList) | ||
showDateList: readonly(store.showDateList) | ||
}; | ||
}; |
Oops, something went wrong.