Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]; [email protected] 图标不显示 #78

Open
mancoxu opened this issue Sep 6, 2022 · 13 comments
Open

[email protected]; [email protected] 图标不显示 #78

mancoxu opened this issue Sep 6, 2022 · 13 comments

Comments

@mancoxu
Copy link

mancoxu commented Sep 6, 2022

版本信息:

  • taro: ^3.5.3;
  • pnpm: ^6.34;
  • react: ^18.0.0;

复现步骤:

  1. 按教程 npx iconfont-taro 生成组件后,pnpm dev:weapp 启动项目,微信工具显示图标正常
  2. 此时关掉项目,重新 pnpm dev:weapp , 微信工具里图标没了,需要再次执行 npx iconfont-taro 后可恢复显示

ps: pnpm^7 版本没有此问题

@liuhui1999
Copy link

我也遇到这个问题 但是我执行npx iconfont-taro 并没有恢复显示

@mancoxu
Copy link
Author

mancoxu commented Sep 7, 2022

我也遇到这个问题 但是我执行npx iconfont-taro 并没有恢复显示

执行后重启下项目会恢复,再重启项目才会不展示,看 wxml, iconfont 标签下会没有节点

@liuhui1999
Copy link

我也遇到这个问题 但是我执行npx iconfont-taro 并没有恢复显示

执行后重启下项目会恢复,再重启项目才会不展示,看 wxml, iconfont 标签下会没有节点

我npx 之后重新build 也没显示
image

貌似没有生成节点

@liuhui1999
Copy link

确定 小程序没有生成节点

@liuhui1999
Copy link

"dependencies": {
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.5.5",
"@tarojs/helper": "3.5.5",
"@tarojs/plugin-framework-react": "3.5.5",
"@tarojs/plugin-platform-alipay": "3.5.5",
"@tarojs/plugin-platform-jd": "3.5.5",
"@tarojs/plugin-platform-qq": "3.5.5",
"@tarojs/plugin-platform-swan": "3.5.5",
"@tarojs/plugin-platform-tt": "3.5.5",
"@tarojs/plugin-platform-weapp": "3.5.5",
"@tarojs/react": "3.5.5",
"@tarojs/router": "3.5.5",
"@tarojs/runtime": "3.5.5",
"@tarojs/shared": "3.5.5",
"@tarojs/taro": "3.5.5",
"@tarojs/taro-h5": "3.5.5",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@lucky-canvas/taro": "^0.0.13",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@tarojs/cli": "3.5.5",
"@tarojs/extend": "^3.5.5",
"@tarojs/mini-runner": "3.5.5",
"@tarojs/webpack-runner": "3.5.5",
"@types/react": "^18.0.0",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"babel-preset-taro": "3.5.5",
"eslint": "^8.12.0",
"eslint-config-taro": "3.5.5",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"react-refresh": "^0.11.0",
"stylelint": "^14.4.0",
"taro-code": "^3.5.2",
"taro-iconfont-cli": "^3.3.0",
"taro-ui": "^3.1.0-beta.3",
"typescript": "^4.1.0",
"webpack": "4.46.0"
}

@mancoxu
Copy link
Author

mancoxu commented Sep 8, 2022

@fwh1990 作者能帮忙看下么?

@HongxuanG
Copy link

确定 小程序没有生成节点

是啊,看了编译后的文件,view wx:if="{{name === xxx}}" 貌似name并没有传进iconfont组件,所以层层if语句并没有一个条件满足,所以不显示 view 标签了

@HongxuanG
Copy link

版本信息:

  • taro: ^3.5.3;
  • pnpm: ^6.34;
  • react: ^18.0.0;

复现步骤:

  1. 按教程 npx iconfont-taro 生成组件后,pnpm dev:weapp 启动项目,微信工具显示图标正常
  2. 此时关掉项目,重新 pnpm dev:weapp , 微信工具里图标没了,需要再次执行 npx iconfont-taro 后可恢复显示

ps: pnpm^7 版本没有此问题

关键是我用yarn 安装 也不行啊,感觉跟包管理工具没关系

@mancoxu
Copy link
Author

mancoxu commented Sep 23, 2022

版本信息:

  • taro: ^3.5.3;
  • pnpm: ^6.34;
  • react: ^18.0.0;

复现步骤:

  1. 按教程 npx iconfont-taro 生成组件后,pnpm dev:weapp 启动项目,微信工具显示图标正常
  2. 此时关掉项目,重新 pnpm dev:weapp , 微信工具里图标没了,需要再次执行 npx iconfont-taro 后可恢复显示

ps: pnpm^7 版本没有此问题

关键是我用yarn 安装 也不行啊,感觉跟包管理工具没关系

@mancoxu mancoxu closed this as completed Sep 23, 2022
@mancoxu mancoxu reopened this Sep 23, 2022
@b-yp
Copy link

b-yp commented Oct 2, 2022

小弟遇到的问题是提示 mini-program-iconfont-cli 下面的文件找不到,pnpm i mini-program-iconfont-cli -D 安装一下就好了

@hzzcc
Copy link

hzzcc commented Nov 25, 2022

跟taro的config/index.js cache配置有关, cache.enable 改成false就行了,开启缓存在第二次编译就没有了

@xqsh
Copy link

xqsh commented Jun 9, 2023

跟taro的config/index.js cache配置有关, cache.enable 改成false就行了,开启缓存在第二次编译就没有了

有效果

@nunuji123
Copy link

跟taro的config/index.js cache配置有关, cache.enable 改成false就行了,开启缓存在第二次编译就没有了

可是本地开发也要开启缓存,wuwu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants