dcloudio / uni-ui

基于uni-app的、全端兼容的、高性能UI框架
https://uniapp.dcloud.io/component/uniui/uni-ui.html
Apache License 2.0
1.89k stars 670 forks source link

uni-icons 在 Android 下显示出错 #371

Closed CaoMeiYouRen closed 3 years ago

CaoMeiYouRen commented 3 years ago

具体表现是字体加载失败,只显示一个框。

通过和以前可以正常显示的 uni-icons 组件比对,我猜测原因是提取出来的 "uni.ttf" 文件的载入问题。

另外,从插件市场的评论看,这个问题已经有一段时间了,希望能予以修复。

开发环境如下

> node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js

uni-app v3.2.2
uni-app cli v2.0.0-32220210818002

Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz
  Binaries:
    Node: 14.14.0 - D:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.8 - D:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.1533.0
  npmPackages:
    @dcloudio/types: ^2.5.1 => 2.5.1
    @dcloudio/uni-app-plus: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-app-plus-nvue:  0.0.1
    @dcloudio/uni-app-plus-nvue-v8:  0.0.1
    @dcloudio/uni-automator: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-cli-shared: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-h5: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-helper-json: * => 1.0.13
    @dcloudio/uni-i18n: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-migration: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-360: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-alipay: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-baidu: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-qq: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-toutiao: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-vue: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-mp-weixin: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-quickapp-native: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-quickapp-webview: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-stat: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-template-compiler: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/uni-ui: ^1.4.2 => 1.4.2
    @dcloudio/vue-cli-plugin-hbuilderx: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/vue-cli-plugin-uni: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/vue-cli-plugin-uni-optimize: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/webpack-uni-mp-loader: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @dcloudio/webpack-uni-nvue-loader:  0.0.1
    @dcloudio/webpack-uni-pages-loader: ^2.0.0-32220210818002 => 2.0.0-32220210818002
    @hap-toolkit/dsl-vue:  0.6.13
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1
    @vue/babel-helper-vue-transform-on:  1.0.2
    @vue/babel-plugin-jsx:  1.0.6
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  4.5.13
    @vue/babel-preset-jsx:  1.2.4
    @vue/babel-sugar-composition-api-inject-h:  1.2.1
    @vue/babel-sugar-composition-api-render-instance:  1.2.4
    @vue/babel-sugar-functional-vue:  1.2.2
    @vue/babel-sugar-inject-h:  1.2.2
    @vue/babel-sugar-v-model:  1.2.3
    @vue/babel-sugar-v-on:  1.2.3
    @vue/cli-overlay:  4.5.13
    @vue/cli-plugin-babel: ^4.5.13 => 4.5.13
    @vue/cli-plugin-router:  4.5.13
    @vue/cli-plugin-typescript: ^4.5.13 => 4.5.13
    @vue/cli-plugin-vuex:  4.5.13
    @vue/cli-service: ^4.5.13 => 4.5.13
    @vue/cli-shared-utils:  4.5.13
    @vue/component-compiler-utils:  3.2.0 (3.2.0)
    @vue/composition-api: ^1.1.3 => 1.1.3
    @vue/devtools-api:  6.0.0-beta.15
    @vue/eslint-config-typescript: ^7.0.0 => 7.0.0
    @vue/preload-webpack-plugin:  1.1.2
    @vue/shared: ^3.2.6 => 3.2.6
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^7.16.0 => 7.16.0
    mpvue-page-factory:  1.0.1
    mpvue-template-compiler:  1.0.13
    uni-h5-vue:  2.6.10
    uni-mp-vue:  2.6.10
    vue: ^2.6.14 => 2.6.14
    vue-class-component: ^7.2.6 => 7.2.6
    vue-eslint-parser:  7.6.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.9.5 (16.1.2, 15.9.5)
    vue-property-decorator: ^9.0.2 => 9.1.2
    vue-router:  3.0.1
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.14 => 2.6.14 (2.6.14)
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.6.2 => 3.6.2 (3.6.2)
    vuex-module-decorators: git+https://github.com.cnpmjs.org/CaoMeiYouRen/vuex-module-decorators.git#webpack => 1.0.1
  npmGlobalPackages:
    @vue/cli: Not Found
Fasttian commented 3 years ago

已处理,npm 更新 v1.4.2

superoery commented 2 years ago

你好 npm似乎还没有1.4.2版本 image

mehaotian commented 2 years ago

你好 npm似乎还没有1.4.2版本 image

1.4.2 都好早的版本了,使用新版即可

superoery commented 2 years ago

你好 npm似乎还没有1.4.2版本 image

1.4.2 都好早的版本了,使用新版即可

你好,这边使用1.4.19版本,使用yarn add @dcloudio/uni-ui 的方式引用,非nvue文件,在android端会无法显示图标,显示为方框;使用uni_modules的方式引入则正常。 经观察,发现两个版本的uni-icon引用的.ttf文件应该不同,在App.vue的style部分代码使用@font-face手动引用两个版本的.ttf文件,发现npm引用的在android端无法显示,uni_modules的正常

node_modules uni-ui的版本为1.4.19: yarn.lock相关内容如下:

"@dcloudio/uni-ui@^1.4.19":
  version "1.4.19"
  resolved "https://registry.yarnpkg.com/@dcloudio/uni-ui/-/uni-ui-1.4.19.tgz#52f6db86dd35af3812706455fde3e5583806d42e"
  integrity sha512-cKdiyvLxEmLJX/5XsOM4dxz8JKbQaVYDD71YUPBuN5l5QuG0vCGLAUNcwyXbXLbtNICD5fih/kLhefzW44wPqA==

uni_modules uni-icons的版本为1.3.5: image