11:02:33.517 [Vue warn]: Failed to resolve component: uni-popup-dialog
11:02:33.537 If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
11:02:33.558 at <DownloadApppageId=1pagePath="pages/downloadApp/downloadApp"pageQuery={} ...>
11:02:33.578 [Vue warn]: Failed to resolve component: uni-popup
11:02:33.599 If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
11:02:33.619 at <DownloadApppageId=1pagePath="pages/downloadApp/downloadApp"pageQuery={} ...>
- 发布:2022-09-13 11:04
- 更新:2022-09-13 17:33
- 阅读:1276
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 3.5.3
HBuilderX类型: 正式
HBuilderX版本号: 3.5.3
手机系统: Android
手机系统版本号: Android 12
手机厂商: 华为
手机机型: iphone11
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
官方案例
官方案例
预期结果:
官方案例成功
官方案例成功
实际结果:
官方案例失败
官方案例失败
bug描述:
<template>
<view>
<button class="button" type="primary" @click="inputDialogToggle">
<text class="button-text">输入对话框</text>
</button>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!" placeholder="请输入内容"
@confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
const inputDialog = ref()
const inputClose = ref()
function inputDialogToggle() {
inputDialog.value.open()
}
function dialogInputConfirm() {
}
</script>
```js
4 个回复
1***@qq.com (作者)
只能 指定路径加载
CODE_XU
如何创建的项目?如何安装的插件?看起来好像 easycom 没有生效。
提供一下完整的 demo。
1***@qq.com (作者)
下面提供了demo
2022-09-13 15:01
1***@qq.com (作者)
我在这个页面写onload 提示:Identifier 'onShow' has already been declared. onshow也是这样
2022-09-13 15:06
1***@qq.com (作者)
demo 左滑或者右滑一下
CODE_XU
你好,测试出这是一个 vue3 环境下的bug,你暂时需要修改一下 pages.json 中 path 的命名方式,不要使用驼峰形式。
1***@qq.com (作者)
好的 谢谢
2022-09-14 08:52
BeforeMount
这个解决了吗
2024-02-21 13:24