[youzan/vant-weapp]popup组件引入BUG

2024-07-19 157 views
9
重现链接

<van-popup show="{{ show }}" position="top" custom-style="height: 20%;" bind:close="onClose" />

Vant Weapp 版本

1.10.19

描述一下你遇到的问题。

在框架Wepy中,引入popup组件报错

重现步骤

使用 <van-popup show="{{ show }}" position="top" custom-style="height: 20%;" bind:close="onClose" /> 引用如下: { usingComponents: { "van-popup": "module:@vant/weapp/dist/popup/index" } }

设备/浏览器

微信小程序

### Tasks

回答

3

[代码依赖分析] 找到 6 个依赖异常情况,可能会导致对应文件无法加载,请检查。 Couldn't resolve the Wxml file "./popup.wxml" relative to "/$vendor/@vant/weapp/dist/popup/index.wxml:0:0"

Couldn't resolve the Wxml file "./popup.wxml" relative to "/$vendor/@vant/weapp/dist/popup/index.wxml:0:0"

Couldn't resolve the Wxml file "./popup.wxml" relative to "/$vendor/@vant/weapp/dist/popup/index.wxml:0:0"

Couldn't resolve the Wxml file "./overlay.wxml" relative to "/$vendor/@vant/weapp/dist/overlay/index.wxml:0:0"

Couldn't resolve the Wxml file "./overlay.wxml" relative to "/$vendor/@vant/weapp/dist/overlay/index.wxml:0:0"

Couldn't resolve the Wxml file "./overlay.wxml" relative to "/$vendor/@vant/weapp/dist/overlay/index.wxml:0:0"

如需关闭依赖分析请在 project.config.json setting 字段中增加 "ignoreDevUnusedFiles": false 和 "ignoreUploadUnusedFiles": false

1

image 加上这个后 我出现这种,大佬

3

提供代码片段好定位

5

其他框架引入vant-weapp产生的问题暂不支持,请将issue提至对应仓库下。