saber中avue-crud中类型为select开启远程搜索,数据回显错误

Saber 未结 1 217
lawsonjin
lawsonjin 剑童 2023-06-29 14:40
projectOption: {
  addBtn: false,
  editBtn: false,
  addRowBtn: false,
  cellBtn: false,
  cancelBtn: false,
  showSummary: true,
  refreshBtn: false,
  columnBtn: false,
  menuWidth: 250,
  column: [{
    label: '项目名称',
    prop: 'projectName',
    cell: true,
    type: 'select',
    allowCreate: true,
    filterable: true,
    remote: true,
    props: {
      label: "name",
      value: "id",
      res: "data.records"
    },
    dicUrl: `/api/blade-repairProject/repairProject/list?status=1&page=0&limit=20000&name={{key}}`,
    change: ({value, column, row}) => {
      this.setProjectThisRowOtherInfo(value, row);
    },
    blur: ({value, column, row}) => {
      this.setProjectThisRowOtherInfo1(value, row);
    },
    rules: [
      {
        required: true,
        message: '请选择项目',
        trigger: 'blur'
      }
    ]
  },

目前存在的问题是先返回的十条数据,选择某一个之后,显示的是项目名称,再远程搜索某一个的项目时,显示的是id


这是远程搜索后,选择某一项,直接变成id

这是页面首次加载时,搜索的十条数据,随便选一个,没问题


1条回答
提交回复