✨ feat(增加script命令): 限制性init:iconfont再执行dev:weapp
This commit is contained in:
+2
-1
@@ -1,12 +1,13 @@
|
||||
import { useGlobalIconFont } from './components/iconfont/helper'
|
||||
export default defineAppConfig({
|
||||
pages: ['pages/user/index',
|
||||
pages: [
|
||||
'pages/index/index',
|
||||
'pages/order/index',
|
||||
'pages/shopping/index',
|
||||
'pages/searchPage/index',
|
||||
'pages/customerPage/index',
|
||||
'pages/saleuserPage/index',
|
||||
'pages/user/index'
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
|
||||
@@ -31,13 +31,13 @@ const CustomTabBar: FC = () => {
|
||||
console.log('sdfasdfa', state)
|
||||
return state.tabBarData
|
||||
})
|
||||
const tabBarIndexMap = useMemo(() => {
|
||||
let map: TabBarIndexMap = {}
|
||||
for (let i = 0; i < tabItem.length; i++) {
|
||||
map[tabItem[i].id] = tabItem[i]
|
||||
}
|
||||
return map
|
||||
}, [tabItem])
|
||||
// const tabBarIndexMap = useMemo(() => {
|
||||
// let map: TabBarIndexMap = {}
|
||||
// for (let i = 0; i < tabItem.length; i++) {
|
||||
// map[tabItem[i].id] = tabItem[i]
|
||||
// }
|
||||
// return map
|
||||
// }, [tabItem])
|
||||
console.log('selectedId', selectedId)
|
||||
|
||||
const dispatch = useDispatch<Dispatch<TabBarAction>>()
|
||||
@@ -52,15 +52,6 @@ const CustomTabBar: FC = () => {
|
||||
dispatch({ type: TabBarType.SET_SELECTED, data: { tabItem, selectedId: id } })
|
||||
}
|
||||
|
||||
// const router = useRouter()
|
||||
// console.log('getCurrentPages==>', router)
|
||||
|
||||
// handleSelectTabItem(tabItem.find((item) => item.pagePath === router.path)?.id!)()
|
||||
|
||||
// useDidShow(() => {
|
||||
// console.log('getCurrentPages==>', router)
|
||||
// })
|
||||
|
||||
return (
|
||||
<View className={styles.customTabBar}>
|
||||
<View className={styles['customTabBar-line']}></View>
|
||||
|
||||
Reference in New Issue
Block a user