Skip to content

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

@yongtaoer

Description

@yongtaoer

版本:"@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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions