feat: 把hello项目文件搬过来
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
import pagesJson from '@/pages.json'
|
||||
import { translate as t } from '@/locale/index'
|
||||
|
||||
console.log(pagesJson)
|
||||
|
||||
/** 判断当前页面是否是tabbar页 */
|
||||
export const getIsTabbar = () => {
|
||||
if (!Object.keys(pagesJson).includes('tabBar')) {
|
||||
return false
|
||||
}
|
||||
const pages = getCurrentPages()
|
||||
const currPath = pages.at(-1).route
|
||||
return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath)
|
||||
}
|
||||
|
||||
/**
|
||||
* test i18n in not .vue file
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user