✨ feat(增加script命令): 限制性init:iconfont再执行dev:weapp

This commit is contained in:
xuan
2022-09-08 12:04:43 +08:00
parent e9e8864c95
commit 81ca19ee0b
5 changed files with 17 additions and 22 deletions
+2 -1
View File
@@ -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',
+7 -16
View File
@@ -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>