Eiinu

Results 64 comments of Eiinu

来了来了 我的博客[blog.shuifengche.top](https://blog.shuifengche.top)

> 你好,我这边没有safari的测试条件 > 能否麻烦你去成功案例看一下别人的站,在你那看能否正常访问? > > 然后如果也不能正常访问的话,safari是否可以看报错?给我截个图看一下吧 成功案例里面的也不能正常显示。 控制台信息: ![image](https://user-images.githubusercontent.com/44915689/95289061-77a2a400-089c-11eb-9225-722febbda2d9.png)

可以自己建一个歌单,分享歌单到QQ好友/微信好友,分享链接里面有一串数字是歌单id。

> safari浏览器图片403。head加标签``就能解决了 感谢,这个方法成功了!

请问你最后是怎么解决的呢?

解决方案参考:[3.5.0nutui-taro 无法导入icon](https://github.com/NervJS/taro/issues/12148)

在 `unplugin-vue-components` 插件配置 include 字段中增加 tsx: ``` Components({ include: [ /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx /\.vue$/, /\.vue\?vue/, // .vue ], resolvers: [ AntDesignVueResolver() ] }) ``` include 的默认值是 `[/\.vue$/,...

> > 在 `unplugin-vue-components` 插件配置 include 字段中增加 tsx: > > ``` > > Components({ > > include: [ > > /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx > > /\.vue$/, /\.vue\?vue/,...

> 这样设置了 样式也没有自动引入 可以对比下 stackblitz 中的项目,看看在配置或者使用上有哪些区别,导致了样式引入失败。

遇到了同样的问题。 `unplugin-vue-components` 能够识别 tsx 中使用的 `VanButton` 组件,代码运行没有问题,样式也可以自动引入。 但是它生成的下面这种方式的 vue 全局组件类型,在 tsx 中不能生效,没有类型提示。 ```ts declare module 'vue' { export interface GlobalComponents { VanButton: typeof import('vant/es')['Button'] } } ```