✨ feat(增加script命令): 限制性init:iconfont再执行dev:weapp
This commit is contained in:
parent
e9e8864c95
commit
81ca19ee0b
@ -3,6 +3,7 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"pre"',
|
||||
},
|
||||
outputRoot: 'build',
|
||||
defineConstants: {
|
||||
CURRENT_BASE_URL: '"https://pre.zzfzyc.com/lymarket"',
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: '"production"',
|
||||
},
|
||||
outputRoot: 'build',
|
||||
defineConstants: {
|
||||
CURRENT_BASE_URL: '"https://www.zzfzyc.com/lymarket"',
|
||||
},
|
||||
|
11
package.json
11
package.json
@ -9,7 +9,8 @@
|
||||
"css": "sass"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "npx iconfont-taro && taro build --type weapp",
|
||||
"init:iconfont": "npx iconfont-taro",
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
@ -18,17 +19,17 @@
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:jd": "taro build --type jd",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"dev:weapp": "npx iconfont-taro && npm run build:weapp -- --watch",
|
||||
"dev:weapp": "npm run init:iconfont && npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:h5": "npm run init:iconfont && npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:jd": "npm run build:jd -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"build:weapp:pre": "npx iconfont-taro && cross-env NODE_ENV=pre taro build --type weapp",
|
||||
"dev:weapp:pre": "npx iconfont-taro && cross-env NODE_ENV=pre npm run build:weapp -- --watch"
|
||||
"build:weapp:pre": "npm run init:iconfont && cross-env NODE_ENV=pre taro build --type weapp",
|
||||
"dev:weapp:pre": "npm run init:iconfont && cross-env NODE_ENV=pre npm run build:weapp -- --watch"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 3 versions",
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user