z***@zaxh.cn
z***@zaxh.cn
  • 发布:2024-01-29 10:44
  • 更新:2024-11-16 11:54
  • 阅读:291

【报Bug】自动导入组件失效 easycom。原因:通过运行 npx @dcloudio/uvm@latest 升级之后自动导入组件失效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 13.4

HBuilderX类型: 正式

HBuilderX版本号: 3.99

手机系统: 全部

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

测试过的手机:

所有设备

示例代码:
      <uni-forms  
        ref="formLogin"  
        validate-trigger="submit"  
        class="login_Forms"  
        :modelValue="data_Hooks.formData"  
        label-position="left"  
      >  
        <uni-forms-item name="loginName">  
          <view class="input_Teml">  
            <input  
              class="logn_Input"  
              :class="{ focusStyle: isFocusShowClear === 'loginName' }"  
              type="text"  
              placeholder="请输入用户名"  
              v-model="data_Hooks.formData.loginName"  
              @focus="onfocus($event, 'loginName')"  
              @blur="onBlue"  
            />  
            <view  
              class="clear_Input iconfont icon-icon-clear"  
              v-show="  
                isFocusShowClear === 'loginName' &&  
                data_Hooks.formData.loginName  
              "  
              @click="clearInput('loginName')"  
            ></view>  
          </view>  
        </uni-forms-item>  

        <uni-forms-item name="password">  
          <view class="input_Teml">  
            <input  
              class="logn_Input"  
              :class="{ focusStyle: isFocusShowClear === 'password' }"  
              type="password"  
              placeholder="请输入密码"  
              maxlength="30"  
              v-model="data_Hooks.formData.password"  
              @focus="onfocus($event, 'password')"  
              @blur="onBlue"  
            />  
            <view  
              class="clear_Input iconfont icon-icon-clear"  
              v-show="  
                isFocusShowClear === 'password' && data_Hooks.formData.password  
              "  
              @click="clearInput('password')"  
            ></view>  
          </view>  
        </uni-forms-item>  
        <uni-forms-item name="vcode">  
          <view class="input_Teml">  
            <input  
              class="logn_Input vcode"  
              :class="{ focusStyle: isFocusShowClear === 'vcode' }"  
              type="text"  
              placeholder="验证码"  
              maxlength="30"  
              v-model="data_Hooks.formData.vcode"  
              @focus="onfocus($event, 'vcode')"  
              @blur="onBlue"  
            />  
            <view class="vcode-img" @click="getUid">  
              <image  
                style="width: 76px; height: 28px; background-color: #eeeeee"  
                mode="scaleToFill"  
                :src="`data:image/png;base64,${imgUrl}`"  
              ></image>  
            </view>  
          </view>  
        </uni-forms-item>  
      </uni-forms>
  "easycom": {  
    "autoscan": true,  
    "custom": {  
      "^uni-(.*)": "@/uni_modules/uni-$1/components/uni-$1.vue",  
      "^za-(.*)": "@/components/za-$1/za-$1.vue" // 匹配components目录内的vue文件  
    }  
  }

操作步骤:

无复现步骤

预期结果:

希望生效

实际结果:

希望有效

bug描述:

问题:自动导入组件失效。原因:通过运行npx @dcloudio/uvm@latest 升级之后自动导入组件失效
hbuild版本3.9
vue版本3使用vite模版创建的

2024-01-29 10:44 负责人:无 分享
已邀请:
BeforeMount

BeforeMount

解决了吗

要回复问题请先登录注册