refactor: extract navigator into store instead
This commit is contained in:
parent
caa3e59777
commit
6b29d3b017
10 changed files with 68 additions and 76 deletions
|
|
@ -20,7 +20,7 @@ import {
|
|||
import NoData from 'src/components/NoData.vue';
|
||||
import QrCodeUploadDialog from 'src/components/QrCodeUploadDialog.vue';
|
||||
import ItemCard from 'src/components/ItemCard.vue';
|
||||
import useUtilsStore, { dialog, baseUrl } from 'stores/utils';
|
||||
import { dialog, baseUrl } from 'stores/utils';
|
||||
import EmptyAddButton from 'components/AddButton.vue';
|
||||
import TooltipComponent from 'components/TooltipComponent.vue';
|
||||
import StatCard from 'components/StatCardComponent.vue';
|
||||
|
|
@ -49,10 +49,11 @@ import {
|
|||
SaveButton,
|
||||
UndoButton,
|
||||
} from 'components/button';
|
||||
import { useNavigator } from 'src/stores/navigator';
|
||||
|
||||
const $q = useQuasar();
|
||||
const { t } = useI18n();
|
||||
const utilsStore = useUtilsStore();
|
||||
const navigatorStore = useNavigator();
|
||||
const modelCreateTypeBranch = ref<boolean>(false);
|
||||
const typeBranchItem = [
|
||||
{
|
||||
|
|
@ -230,8 +231,8 @@ async function calculateStats(headOfficeId?: string) {
|
|||
}
|
||||
|
||||
onMounted(async () => {
|
||||
utilsStore.currentTitle.title = 'menu.branch';
|
||||
utilsStore.currentTitle.path = [
|
||||
navigatorStore.current.title = 'menu.branch';
|
||||
navigatorStore.current.path = [
|
||||
{
|
||||
text: 'branch.page.captionManage',
|
||||
i18n: true,
|
||||
|
|
@ -914,7 +915,7 @@ watch(
|
|||
);
|
||||
|
||||
watch(currentHq, () => {
|
||||
const tmp: typeof utilsStore.currentTitle.path = [
|
||||
const tmp: typeof navigatorStore.current.path = [
|
||||
{
|
||||
text: 'branch.page.captionManage',
|
||||
i18n: true,
|
||||
|
|
@ -940,7 +941,7 @@ watch(currentHq, () => {
|
|||
|
||||
selectedSubBranche(currentHq.value.id);
|
||||
|
||||
utilsStore.currentTitle.path = tmp;
|
||||
navigatorStore.current.path = tmp;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue