add order on menu

This commit is contained in:
liangping 2023-05-10 18:39:39 +08:00
parent df359ca684
commit d2c82499c0
8 changed files with 16 additions and 8 deletions

View File

@ -97,7 +97,8 @@ const format = useFormatter();
<route> <route>
{ {
meta: { meta: {
i18n: 'blocks' i18n: 'blocks',
order: 5
} }
} }
</route> </route>

View File

@ -47,7 +47,8 @@ const changeTab = (val: '2' | '3' | '4') => {
<route> <route>
{ {
meta: { meta: {
i18n: 'governance' i18n: 'governance',
order: 2
} }
} }
</route> </route>

View File

@ -70,7 +70,8 @@ function color(v: string) {
<route> <route>
{ {
meta: { meta: {
i18n: 'ibc' i18n: 'ibc',
order: 8
} }
} }
</route> </route>

View File

@ -267,7 +267,8 @@ const color= computed(() => {
<route> <route>
{ {
meta: { meta: {
i18n: 'dashboard' i18n: 'dashboard',
order: 1,
} }
} }
</route> </route>

View File

@ -55,7 +55,8 @@ onMounted(() => {
<route> <route>
{ {
meta: { meta: {
i18n: 'parameters' i18n: 'parameters',
order: 10
} }
} }
</route> </route>

View File

@ -276,7 +276,8 @@ const rank = function (position: number) {
<route> <route>
{ {
meta: { meta: {
i18n: 'staking' i18n: 'staking',
order: 3
} }
} }
</route> </route>

View File

@ -162,7 +162,8 @@ watchEffect(() => {
<route> <route>
{ {
meta: { meta: {
i18n: 'uptime' i18n: 'uptime',
order: 8
} }
} }
</route> </route>

View File

@ -68,8 +68,9 @@ export const useBlockchain = defineStore('blockchain', {
to: { path: x.path.replace(':chain', this.chainName) }, to: { path: x.path.replace(':chain', this.chainName) },
icon: { icon: 'mdi-chevron-right', size: '22' }, icon: { icon: 'mdi-chevron-right', size: '22' },
i18n: true, i18n: true,
order: Number(x.meta.order || 100)
})) }))
.sort((a, b) => a.to.path.length - b.to.path.length), .sort((a, b) => a.order - b.order),
}, },
]; ];
} }