Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElCascader 组件显示正常,但是控制台会报错(modifiersData.arrow.x Cannot set properties of undefined (setting 'x')) #128

Open
yongtaoer opened this issue Oct 12, 2024 · 5 comments

Comments

@yongtaoer
Copy link

版本:"@element-plus/nuxt": "^1.0.7",
问题:ElCascader组件可以正常使用,但是初始化时,控制台会报错
截图
image
image

具体代码:

<template>
<el-cascader
    v-model="parentId"
    :options="categoryOptions"
    filterable
    placeholder="请选择分类"
    :props="cascaderProp"
    clearable
  ></el-cascader>
</template>
<script>
const categoryOptions = [
  {
      "id": "6988033358453547009",
      "name": "Fiber Optic Components",
      "parentId": null,
      "order": 0,
      "isEnabled": 1,
      "cnName": "光纤元件",
      "children": [
          {
              "id": "6988033358650679296",
              "name": "Electrical to Optical Converters",
              "parentId": "6988033358453547009",
              "order": 0,
              "isEnabled": 1,
              "cnName": "电光转换器-修改后"
          },
          {
              "id": "6988033358826840064",
              "name": "Fiber Optic Adapters",
              "parentId": "6988033358453547009",
              "order": 0,
              "isEnabled": 0,
              "cnName": "光纤适配器"
          }
      ]
  }
]
const cascaderProp = {
  multiple: false,
  emitPath: false, 
  value: 'id', 
  label: 'cnName', 
  checkStrictly: true,
  expandTrigger: 'hover'
}
</script>
@tolking
Copy link
Member

tolking commented Oct 27, 2024

你可以检查下你项目中安装的 @popperjs/core 版本。可能与次相关

@yongtaoer
Copy link
Author

你可以检查下你项目中安装的 @popperjs/core 版本。可能与次相关

我刚查看了下,我的版本是2.11.7,应该修改为哪个版本呢?部分内容截图如下:
image

@tolking
Copy link
Member

tolking commented Oct 28, 2024

报错的内容是与 @popperjs/core 的配置相关。看看是不是依赖了不同版本的 @popperjs/core ,或者清空缓存试试

@yongtaoer
Copy link
Author

报错的内容是与 @popperjs/core 的配置相关。看看是不是依赖了不同版本的 @popperjs/core ,或者清空缓存试试

我全局搜索了下,关于popperjs的信息只有这些,貌似是没有存在@popperjs/core不同版本的信息,还有其他的排查方案吗?

@tolking
Copy link
Member

tolking commented Oct 28, 2024

那你可能需要花点时间 增加些断点调试下相关代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants