gpt4 book ai didi

Vue.JS - nextTick 错误 : “TypeError: Cannot read property ‘badInput’ of undefined”

转载 作者:行者123 更新时间:2023-12-04 08:53:03 26 4
gpt4 key购买 nike

我收到这个错误:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in nextTick: "TypeError: Cannot read property 'badInput' of undefined"

found in

---> <MdSelect> at src/components/MdField/MdSelect/MdSelect.vue
<MdField> at src/components/MdField/MdField.vue
<MdCardContent> at src/components/MdCard/MdCardContent/MdCardContent.vue
<MdCard> at src/components/MdCard/MdCard.vue
<MdContent> at src/components/MdContent/MdContent.vue
<MdDialog> at src/components/MdDialog/MdDialog.vue
<Loading> at src/components/Loading.vue
<QuadroHorarioSalaNormal>
<Loading> at src/components/Loading.vue
<MdContent> at src/components/MdContent/MdContent.vue
<MdAppContent> at src/components/MdApp/MdAppContent.vue
<MdAppSideDrawer> at src/components/MdApp/MdAppSideDrawer.vue
<ComSidebarLayout> at src/layouts/ComSideBar.vue
<App> at src/App.vue
<Root>

在select中选择一个选项时会出现这个错误:

<md-dialog :md-active.sync="showInserirDisciplina">
<md-dialog-title><md-icon>article</md-icon> Incluir Disciplina</md-dialog-title>
<md-content>
<form novalidate class="md-layout" style="min-width: 500px;">
<md-card class="md-layout-item md-size-100 md-small-size-100">
<md-card-content>
<md-field>
<label for="disciplina"> Disciplina</label>
<md-select v-model="disciplina" name="disciplina" id="disciplina" @md-selected="carregaDisciplinasEquivalentes" class="filtro" style="color:#6361FB !important">
<md-option :value="0" ></md-option>
<md-option :value="c.codigoDisciplina" v-for="c in dadosDisciplinas">
{{c.disciplina}}
</md-option>
</md-select>
</md-field>

拜托,有人可以帮助我吗?

最好的问候所有回复,

最佳答案

根据 github issue这是 vue Material 代码库中的错误 - 看起来有人提供了 PR,因此您可以通过升级版本来修复。

我个人很快就解决了这个问题,方法是听从用户“bart-src”的建议并简单地更改我的本地代码:

  1. 找到 node_modules\vue-material\dist\vue-material.js
  2. 搜索 isInvalidValue
  3. 换出代码:

旧:

return this.$el.validity.badInput;

新:

return this.$el.validity ? this.$el.validity.badInput : false;

对我来说这是 ~line 1059

关于Vue.JS - nextTick 错误 : “TypeError: Cannot read property ‘badInput’ of undefined”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63994411/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com