<template>
<view class="login-con">
<view class="login-nav" @click="goback">
<text class="login-close">关闭</text>
</view>
<view class="login-main">
<image src="https://h5.jiaoyiyou.com/static/newImage/loginLogo.png" mode="" style="height: 256rpx; width: 194px;"></image>
<uni-forms :modelValue="formData">
<uni-forms-item label="姓名" name="name">
<uni-easyinput type="text" v-model="formData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="年龄" name="age">
<input type="text" v-model="formData.age" placeholder="请输入年龄" />
</uni-forms-item>
</uni-forms>
</view>
<view></view>
</view>
</template>
- 发布:2024-06-21 23:36
- 更新:2024-07-05 09:57
- 阅读:158
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 4.15
浏览器平台: Edge
浏览器版本: 126.0.2592.61
项目创建方式: HBuilderX
示例代码:
操作步骤:
在组件库页面导入uni-ui
新建页面写上述代码
在组件库页面导入uni-ui
新建页面写上述代码
预期结果:
可正常使用
可正常使用
实际结果:
报 SyntaxError: The requested module '/@fs/D:/frame/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-h5-vue/dist/vue.runtime.esm.js' does not provide an export named 'default' (at uni-forms.vue:33:9) 错误
报 SyntaxError: The requested module '/@fs/D:/frame/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/uni-h5-vue/dist/vue.runtime.esm.js' does not provide an export named 'default' (at uni-forms.vue:33:9) 错误
bug描述:
如题
<template>
<view class="login-con">
<view class="login-nav" @click="goback">
<text class="login-close">关闭</text>
</view>
<view class="login-main">
<image src="https://h5.jiaoyiyou.com/static/newImage/loginLogo.png" mode="" style="height: 256rpx; width: 194px;"></image>
<uni-forms :modelValue="formData">
<uni-forms-item label="姓名" name="name">
<uni-easyinput type="text" v-model="formData.name" placeholder="请输入姓名" />
</uni-forms-item>
<uni-forms-item label="年龄" name="age">
<input type="text" v-model="formData.age" placeholder="请输入年龄" />
</uni-forms-item>
</uni-forms>
</view>
<view></view>
</view>
</template>